COIN-OR::LEMON - Graph Library

Changeset 177:40f3006fba2e in glemon-0.x for mapstorage.cc


Ignore:
Timestamp:
10/30/06 15:57:48 (15 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@3032
Message:

Redesign parameters can now be saved and loaded.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mapstorage.cc

    r174 r177  
    2424#include <gtkmm.h>
    2525
    26 MapStorage::MapStorage() : modified(false), file_name(""), arrow_pos_read_ok(false)
     26const double i_d=20;
     27const double a_d=0.05;
     28const double p_d=40000;
     29
     30MapStorage::MapStorage() : modified(false), file_name(""), arrow_pos_read_ok(false), iterations(i_d), attraction(a_d), propulsation(p_d)
    2731{
    2832  nodemap_storage["coordinates_x"] = new Graph::NodeMap<double>(graph);
     
    149153}
    150154
    151 MapStorage::Signal_Prop MapStorage::signal_prop_ch()
     155sigc::signal<void, bool, int> MapStorage::signal_prop_ch()
    152156{
    153157  return signal_prop;
     
    486490      signal_map_win.emit(true, i, "");
    487491    }
     492
     493  attraction=a_d;
     494  propulsation=p_d;
     495  iterations=i_d;
     496
     497  signal_design_win.emit(attraction, propulsation, iterations);
    488498}
    489499
     
    516526    }
    517527}
     528
     529void MapStorage::get_design_data(double & attraction_p, double & propulsation_p, int & iterations_p)
     530{
     531  attraction_p=attraction;
     532  propulsation_p=propulsation;
     533  iterations_p=iterations;
     534}
     535
     536void MapStorage::set_attraction(double attraction_p)
     537{
     538  attraction=attraction_p;
     539}
     540
     541void MapStorage::set_propulsation(double propulsation_p)
     542{
     543  propulsation=propulsation_p;
     544}
     545
     546void MapStorage::set_iteration(int iterations_p)
     547{
     548  iterations=iterations_p;
     549}
     550
     551void MapStorage::redesign_data_changed()
     552{
     553  signal_design_win.emit(attraction, propulsation, iterations);
     554}
Note: See TracChangeset for help on using the changeset viewer.