COIN-OR::LEMON - Graph Library

Changeset 1884:9c061834b33b in lemon-0.x for gui/algobox.cc


Ignore:
Timestamp:
01/06/06 17:07:08 (18 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2459
Message:

In algorithm window maps can be selected and reated through MapSelector? widget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/algobox.cc

    r1879 r1884  
    7474  for(int i=0;i<(int)nodemapcbts.size();i++)
    7575    {
    76       update_cbt(nml, *(nodemapcbts[i]));
     76      (nodemapcbts[i])->update_list(nml);
     77      //update_cbt(nml, *(nodemapcbts[i]));
    7778    }
    7879  for(int i=0;i<(int)edgemapcbts.size();i++)
    7980    {
    80       update_cbt(eml, *(edgemapcbts[i]));
     81      (edgemapcbts[i])->update_list(eml);
     82      //update_cbt(eml, *(edgemapcbts[i]));
    8183    }
    8284}
     
    107109  pack_start(*(new Gtk::HSeparator()));
    108110
    109   label=new Gtk::Label("Specific part for each algorithm.");
     111  Gtk::Label * label=new Gtk::Label("Specific part for each algorithm.");
    110112     
    111113  pack_start(*label);
     
    119121  for(int i=0;i<(int)nodemapcbts.size();i++)
    120122    {
    121       Gtk::HBox * hbox=new Gtk::HBox();
     123      std::vector<std::string> empty_vector;
    122124
    123125      std::ostringstream o;
    124126      o << "NodeInput " << i+1 << ":";
    125       label=new Gtk::Label(o.str());
    126127
    127       nodemapcbts[i]=new Gtk::ComboBoxText();
     128      nodemapcbts[i]=new MapSelector(empty_vector,"",o.str(),false, false);
     129      nodemapcbts[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &AlgoBox::emit_new_map_signal));
    128130
    129       hbox->pack_start(*label);
    130       hbox->pack_start(*(nodemapcbts[i]));
    131       pack_start(*hbox);
     131      pack_start(*(nodemapcbts[i]));
    132132    }
    133133
     
    137137  for(int i=0;i<(int)edgemapcbts.size();i++)
    138138    {
    139       Gtk::HBox * hbox=new Gtk::HBox();
     139      std::vector<std::string> empty_vector;
    140140
    141141      std::ostringstream o;
    142142      o << "EdgeInput " << i+1 << ":";
    143       label=new Gtk::Label(o.str());
    144143
    145       edgemapcbts[i]=new Gtk::ComboBoxText();
     144      edgemapcbts[i]=new MapSelector(empty_vector,"",o.str(),true, false);
     145      edgemapcbts[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &AlgoBox::emit_new_map_signal));
    146146
    147       hbox->pack_start(*label);
    148       hbox->pack_start(*(edgemapcbts[i]));
    149       pack_start(*hbox);
     147      pack_start(*(edgemapcbts[i]));
    150148    }
    151149
     
    171169    }
    172170}
     171
     172void AlgoBox::emit_new_map_signal(bool itisedge)
     173{
     174  signal_newmapwin_need.emit(tabcbt.get_active_text(), itisedge);
     175}
Note: See TracChangeset for help on using the changeset viewer.