COIN-OR::LEMON - Graph Library

Changeset 155:74065e83844d in glemon-0.x


Ignore:
Timestamp:
09/28/06 11:26:48 (18 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@2960
Message:

Small modification in node view settings.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • graph_displayer_canvas-node.cc

    r154 r155  
    22#include <cmath>
    33
     4const int minimum_node_radius=0;
    45
    56int GraphDisplayerCanvas::changeNodeRadius (std::string mapname, Node node)
     
    2526              else
    2627                {
    27                   w=(int)(radius_min+(v-min)/(max-min)*(radius_max-radius_min));
     28                  w=(int)(minimum_node_radius+(v-min)/(max-min)*(radius_max-minimum_node_radius));
    2829                }
    2930            }
    3031          else
    3132            {
    32               w=5+(int)(v/radius_unit);
    33             }
     33              w=(int)(v*radius_max);
     34            }
     35
     36          if(w<5)
     37            {
     38              w=5;
     39            }
     40
    3441          if(w>=0)
    3542            {
  • main_win.cc

    r154 r155  
    211211 
    212212  Gtk::Label * unit_label= new Gtk::Label("Unit:");
    213   table2.attach(*unit_label, 2,3,0,1);
     213//   table2.attach(*unit_label, 2,3,0,1);
    214214 
    215215  Gtk::Adjustment * adjustment_unit=new Gtk::Adjustment(20, 5, 200, 5, 10);
     
    217217  radius_unit = new Gtk::SpinButton(*adjustment_unit, 5,0);
    218218  radius_unit->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged));
    219   table2.attach(*radius_unit, 3,4,0,1);
     219//   table2.attach(*radius_unit, 3,4,0,1);
    220220
    221221  Gtk::Label * min_label= new Gtk::Label("Min:");
    222   table2.attach(*min_label, 0,1,1,2);
     222//   table2.attach(*min_label, 0,1,1,2);
    223223 
    224224  Gtk::Adjustment * adjustment_min=new Gtk::Adjustment(20, 5, 200, 5, 10);
     
    226226  radius_min = new Gtk::SpinButton(*adjustment_min, 5,0);
    227227  radius_min->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged));
    228   table2.attach(*radius_min, 1,2,1,2);
    229 
    230   Gtk::Label * max_label= new Gtk::Label("Max:");
     228//   table2.attach(*radius_min, 1,2,1,2);
     229
     230  Gtk::Label * max_label= new Gtk::Label("Size:");
    231231  table2.attach(*max_label, 2,3,1,2);
    232232 
    233   Gtk::Adjustment * adjustment_max=new Gtk::Adjustment(20, 5, 200, 5, 10);
     233  Gtk::Adjustment * adjustment_max=new Gtk::Adjustment(20, 0, 200, 5, 10);
    234234
    235235  radius_max = new Gtk::SpinButton(*adjustment_max, 5,0);
Note: See TracChangeset for help on using the changeset viewer.