COIN-OR::LEMON - Graph Library

Changeset 160:14a76109b561 in glemon-0.x for nbtab.cc


Ignore:
Timestamp:
10/12/06 13:39:29 (13 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@2982
Message:

Node antigravity and edge elasticity based graph layout redesigner.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nbtab.cc

    r157 r160  
    11#include <nbtab.h>
    22
    3 NoteBookTab::NoteBookTab():mapwinexists(false)
     3NoteBookTab::NoteBookTab():mapwinexists(false), designwinexists(false)
    44{
    55  Gtk::ScrolledWindow *pScrolledWindow = manage(new Gtk::ScrolledWindow);
     
    208208}
    209209
     210void NoteBookTab::createDesignWin(std::string name)
     211{
     212  if(!designwinexists)
     213    {
     214      double attraction, propulsation;
     215      int iterations;
     216      gd_canvas->get_design_data(attraction, propulsation, iterations);
     217      designwin=new DesignWin("Design Setup - "+name, attraction, propulsation, iterations);
     218
     219      designwin->signal_attraction().connect(sigc::mem_fun(*this, &NoteBookTab::attraction_ch));
     220      designwin->signal_propulsation().connect(sigc::mem_fun(*this, &NoteBookTab::propulsation_ch));
     221      designwin->signal_iteration().connect(sigc::mem_fun(*gd_canvas, &GraphDisplayerCanvas::set_iteration));
     222      designwin->close_run().connect(sigc::mem_fun(*gd_canvas, &GraphDisplayerCanvas::reDesignGraph));
     223
     224      designwin->signal_delete_event().connect(sigc::mem_fun(*this, &NoteBookTab::closeDesignWin));
     225
     226      designwin->show();
     227      designwinexists=true;
     228    }
     229}
     230
    210231void NoteBookTab::closeMapWin()
    211232{
     
    214235}
    215236
     237bool NoteBookTab::closeDesignWin(GdkEventAny * e)
     238{
     239  if(e->type==GDK_DELETE)
     240    {
     241      designwinexists=false;
     242      delete designwin;
     243    }
     244}
     245
    216246sigc::signal<void, std::string> NoteBookTab::signal_title_ch()
    217247{
     
    228258  gd_canvas->getView(autoscale, zoomtrack, width, radius);
    229259}
     260
     261void NoteBookTab::reDesignGraph()
     262{
     263  gd_canvas->reDesignGraph();
     264}
     265
     266void NoteBookTab::attraction_ch(double v)
     267{
     268  gd_canvas->set_attraction(v);
     269}
     270
     271void NoteBookTab::propulsation_ch(double v)
     272{
     273  gd_canvas->set_propulsation(v);
     274}
     275
     276void NoteBookTab::iteration_ch(int v)
     277{
     278  gd_canvas->set_iteration(v);
     279}
     280
Note: See TracChangeset for help on using the changeset viewer.