Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "cistern_pty_wnd");
ref->get_widget_derived("cistern_pty_wnd",cistern_pty_wnd);
cistern_pty_wnd->cistern = this;
+ cistern_pty_wnd->set_title("Propiedades del Tanque");
}
Cistern::~Cistern()
imgActual = 0;
image = imageN;
set_size_request(image->get_width(), image->get_height());
+ property_wnd->set_title("Propiedades del Tubo");
}
Conduct::~Conduct()
imgActual = 0;
image = imageO;
set_size_request(image->get_width(), image->get_height());
+ property_wnd->set_title("Propiedades del Codo");
}
Splitter::~Splitter()
menu_popup.popup(event->button, event->time);
return true; //It has been handled.
}
+
+ if ((event->type == GDK_2BUTTON_PRESS) && ( event->button == 1)){
+ property_wnd->spin_caudal->set_value( caudal_max );
+ property_wnd->txt_item_name->set_text( name );
+ property_wnd->show();
+ }
return true;
}
void Splitter::on_menu_popup_rotar()
{
GdkEventButton event;
- event.type = GDK_BUTTON_PRESS;
- event.button = 2;
+ event.type = GDK_BUTTON_PRESS;
+ event.button = 2;
+ Splitter::on_button_press_event(&event);
+}
+
+void Splitter::on_menu_popup_propiedades()
+{
+ GdkEventButton event;
+ event.type = GDK_2BUTTON_PRESS;
+ event.button = 1;
Splitter::on_button_press_event(&event);
}
virtual ~Splitter();
virtual bool on_button_press_event(GdkEventButton *event);
virtual void on_menu_popup_rotar();
+ virtual void on_menu_popup_propiedades();
private:
int imgActual;
imgActual = 0;
image = imageN;
set_size_request(image->get_width(), image->get_height());
+ property_wnd->set_title("Propiedades del Empalme");
}
Union::~Union()
menu_popup.popup(event->button, event->time);
return true; //It has been handled.
}
+
+ if ((event->type == GDK_2BUTTON_PRESS) && ( event->button == 1)){
+ property_wnd->spin_caudal->set_value( caudal_max );
+ property_wnd->txt_item_name->set_text( name );
+ property_wnd->show();
+ }
return true;
}
void Union::on_menu_popup_rotar()
{
GdkEventButton event;
- event.type = GDK_BUTTON_PRESS;
- event.button = 2;
+ event.type = GDK_BUTTON_PRESS;
+ event.button = 2;
+ Union::on_button_press_event(&event);
+}
+
+void Union::on_menu_popup_propiedades()
+{
+ GdkEventButton event;
+ event.type = GDK_2BUTTON_PRESS;
+ event.button = 1;
Union::on_button_press_event(&event);
}
virtual ~Union();
virtual bool on_button_press_event(GdkEventButton *event);
virtual void on_menu_popup_rotar();
+ virtual void on_menu_popup_propiedades();
private:
int imgActual;