X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/b0310cfcc64d94e1b9c31856e1053a6da0431127..a5853e30ca27518a7a3a33e4f97588f7b1e9ffe3:/Constructor/src/item.cpp diff --git a/Constructor/src/item.cpp b/Constructor/src/item.cpp index d9e5035..7607502 100644 --- a/Constructor/src/item.cpp +++ b/Constructor/src/item.cpp @@ -17,7 +17,7 @@ CItem::CItem() Glib::RefPtr ref; ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "item_pty_wnd"); ref->get_widget_derived("item_pty_wnd",property_wnd); - caudal_max = 0.0; + caudal_max = 10.0; is_union = true; is_connected = false; is_logic =false; @@ -61,7 +61,7 @@ bool CItem::on_expose_event(GdkEventExpose* event) // XXX Esto no deberia ser necesario! en todo caso devolves false en // vez de true para que siga llamando a los otros handlers :) //Gtk::DrawingArea::on_expose_event(event); - if (logic_connect) { + if (CItem::logic_connect) { draw_connectors(); } return true; @@ -80,10 +80,6 @@ void CItem::on_menu_popup_eliminar() workplace->delete_item(ID); } -void CItem::on_menu_popup_conectar() -{ -} - int CItem::get_position_x() { return x; @@ -113,6 +109,7 @@ Glib::ustring CItem::get_name() Glib::ustring CItem::get_other_name(int _id) { std::list::iterator i = listaItems->begin(); + std::cout << name << " " << _id << std::endl; while ( i != listaItems->end() ) { if ( (*i)->get_id() == _id ) return (*i)->get_name(); @@ -147,6 +144,14 @@ void CItem::set_name(Glib::ustring _name) name = _name; } +void CItem::set_out_connected(bool _o) +{ +} + +void CItem::set_in_connected(bool _o) +{ +} + bool CItem::is_occupied_area(int _a, int _b) { if ( ( _a >= x ) && ( _a < x+image->get_width()) && (_b >= y) && (_b < y+image->get_height()) ) @@ -189,6 +194,11 @@ void CItem::get_out_logic_connect_position(int& _a, int& _b) _b = y; } +bool CItem::get_out_logic_connect() +{ + return false; +} + void CItem::update_logic_position() { } @@ -207,4 +217,3 @@ void CItem::draw_connectors() queue_draw(); } } -