Changeset 196:c220f9de6545 in glemon-0.x
- Timestamp:
- 03/01/07 14:33:46 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@3207
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
design_win.cc
r194 r196 17 17 */ 18 18 19 #include <nbtab.h>20 19 #include <design_win.h> 21 20 … … 29 28 } 30 29 31 DesignWin::DesignWin(const std::string& title, double attraction_v, double propulsation_v, int iterations_v , NoteBookTab & mw):mytab(mw)30 DesignWin::DesignWin(const std::string& title, double attraction_v, double propulsation_v, int iterations_v) 32 31 { 33 32 set_title(title); 34 33 35 mytab.signal_title_ch().connect(sigc::mem_fun(*this, &DesignWin::set_title));34 //mytab.signal_title_ch().connect(sigc::mem_fun(*this, &DesignWin::set_title)); 36 35 37 36 signal_key_press_event().connect(sigc::mem_fun(*this, &DesignWin::closeIfEscapeIsPressed)); -
design_win.h
r194 r196 20 20 #define DESWIN_H 21 21 22 class NoteBookTab;23 24 22 #include <all_include.h> 25 23 #include <libgnomecanvasmm.h> … … 29 27 { 30 28 private: 31 ///\ref NoteBookTab to that the \ref MapWin belongs to.32 NoteBookTab & mytab;33 34 29 Gtk::SpinButton * attraction; 35 30 Gtk::SpinButton * propulsation; … … 55 50 56 51 ///It builds the window. 57 DesignWin(const std::string&, double, double, int , NoteBookTab & mw);52 DesignWin(const std::string&, double, double, int); 58 53 59 54 sigc::signal<void, double> signal_attraction(){return signal_attraction_ch;}; -
eps_win.cc
r194 r196 17 17 */ 18 18 19 #include <nbtab.h>20 19 #include <eps_win.h> 21 20 #include <set> … … 30 29 } 31 30 32 EpsWin::EpsWin(const std::string& title , NoteBookTab & mw):Gtk::Dialog(title, true, true),mytab(mw)31 EpsWin::EpsWin(const std::string& title):Gtk::Dialog(title, true, true) 33 32 { 34 33 set_default_size(200, 50); … … 37 36 38 37 signal_key_press_event().connect(sigc::mem_fun(*this, &EpsWin::closeIfEscapeIsPressed)); 39 40 mytab.signal_title_ch().connect(sigc::mem_fun(*this, &EpsWin::set_title));41 38 42 39 table=new Gtk::Table(EPS_PROPERTY_NUM, 1, false); … … 77 74 { 78 75 event=event; 79 mytab.closeEpsWin();76 signal_eps_close.emit(); 80 77 return true; 81 78 } … … 91 88 values[i]=options[i]->get_active(); 92 89 } 93 mytab.exportGraphToEPS(values, name.get_text());90 signal_eps_details.emit(values, name.get_text()); 94 91 } 95 92 on_delete_event(NULL); -
eps_win.h
r194 r196 20 20 #define EPS_WIN_H 21 21 22 class NoteBookTab;23 24 22 #include <all_include.h> 25 23 #include <libgnomecanvasmm.h> … … 34 32 { 35 33 protected: 36 ///\ref NoteBookTab to that the \ref EpsWin belongs to.37 NoteBookTab & mytab;38 39 34 ///Designing element 40 35 Gtk::Table * table; … … 64 59 ///\param nml nodemap list 65 60 ///\param mw the owner \ref NoteBookTab (\ref mytab) 66 EpsWin(const std::string& title , NoteBookTab & mw);61 EpsWin(const std::string& title); 67 62 68 63 ///Deregistrates \ref EpsWin in its \ref NoteBookTab (\ref mytab) … … 80 75 virtual void on_response(int response_id); 81 76 77 ///indicates that user is ready to export EPS file 78 sigc::signal<void, std::vector<bool>, std::string > signal_eps_details; 79 80 ///returns \ref signal_eps_details 81 sigc::signal<void, std::vector<bool>, std::string > signal_eps_details_ch(){return signal_eps_details;}; 82 83 ///indicates that the windows can be closed 84 sigc::signal<void> signal_eps_close; 85 86 ///returns \ref signal_eps_close 87 sigc::signal<void> signal_eps_close_ch(){return signal_eps_close;}; 88 89 82 90 }; 83 91 -
nbtab.cc
r195 r196 54 54 mapwin->update(mapstorage->getEdgeMapList(), mapstorage->getNodeMapList()); 55 55 } 56 signal_title.emit(Glib::filename_display_basename(file));56 title_changed(Glib::filename_display_basename(file)); 57 57 } 58 58 … … 83 83 mapwin->update(mapstorage->getEdgeMapList(), mapstorage->getNodeMapList()); 84 84 } 85 signal_title.emit("unsaved file");85 title_changed("unsaved file"); 86 86 } 87 87 … … 123 123 mapwin->update(mapstorage->getEdgeMapList(), mapstorage->getNodeMapList()); 124 124 } 125 signal_title.emit(Glib::filename_display_basename(filename));125 title_changed(Glib::filename_display_basename(filename)); 126 126 } 127 127 } … … 137 137 mapstorage->writeToFile(mapstorage->file_name); 138 138 mapstorage->modified = false; 139 signal_title.emit(Glib::filename_display_basename(mapstorage->file_name));139 title_changed(Glib::filename_display_basename(mapstorage->file_name)); 140 140 } 141 141 } … … 152 152 mapstorage->writeToFile(filename); 153 153 mapstorage->modified = false; 154 signal_title.emit(Glib::filename_display_basename(filename));154 title_changed(Glib::filename_display_basename(filename)); 155 155 } 156 156 } … … 182 182 mapwin->update(mapstorage->getEdgeMapList(), mapstorage->getNodeMapList()); 183 183 } 184 signal_title.emit("unsaved file");184 title_changed("unsaved file"); 185 185 } 186 186 … … 241 241 if(!epswinexists) 242 242 { 243 epswin=new EpsWin("Export to EPS - "+name , *this);243 epswin=new EpsWin("Export to EPS - "+name); 244 244 epswin->show(); 245 245 epswinexists=true; 246 epswin->signal_eps_details_ch().connect(sigc::mem_fun(*this, &NoteBookTab::exportGraphToEPS)); 247 epswin->signal_eps_close_ch().connect(sigc::mem_fun(*this, &NoteBookTab::closeEpsWin)); 246 248 } 247 249 } … … 255 257 int iterations; 256 258 mapstorage->get_design_data(attraction, propulsation, iterations); 257 designwin=new DesignWin("Design Setup - "+name, attraction, propulsation, iterations , *this);259 designwin=new DesignWin("Design Setup - "+name, attraction, propulsation, iterations); 258 260 259 261 designwin->signal_attraction().connect(sigc::mem_fun(mapstorage, &MapStorage::set_attraction)); … … 323 325 mapstorage->exportGraphToEPS(options, filename); 324 326 } 327 328 void NoteBookTab::title_changed(std::string newtitle) 329 { 330 signal_title.emit(newtitle); 331 if(epswinexists) 332 { 333 epswin->set_title(newtitle); 334 } 335 if(designwinexists) 336 { 337 designwin->set_title(newtitle); 338 } 339 } -
nbtab.h
r194 r196 235 235 236 236 private: 237 ///Called when title of tab has changed 238 void title_changed(std::string); 239 237 240 ///Signal connection from \ref MapStorage to \ref MapWin 238 241
Note: See TracChangeset
for help on using the changeset viewer.