X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/44b4462a9330a34738100db1408ba6517a29a299..43fc1b3f57852f2af098fa7411e83220015aaa6f:/Constructor/item.cpp diff --git a/Constructor/item.cpp b/Constructor/item.cpp index 79515ff..c08f894 100644 --- a/Constructor/item.cpp +++ b/Constructor/item.cpp @@ -13,6 +13,7 @@ CItem::CItem() ref = Gnome::Glade::Xml::create("constructor.glade", "item_pty_wnd"); ref->get_widget_derived("item_pty_wnd",property_wnd); caudal_max = 0.0; + is_union = true; property_wnd->item = this; menu_image_propiedades.set(Gtk::Stock::PREFERENCES, Gtk::ICON_SIZE_MENU); menu_image_delete.set(Gtk::Stock::CANCEL, Gtk::ICON_SIZE_MENU); @@ -126,9 +127,26 @@ int CItem::get_conector_out() return conector_out; } +int CItem::get_img_actual() +{ + return imgActual; +} + bool CItem::is_occupied_area(int _a, int _b) { if ( ( _a >= x ) && ( _a < x+image->get_width()) && (_b >= y) && (_b < y+image->get_height()) ) return true; else return false; } + +bool CItem::is_other_connection_area(int _a, int _b) +{ + std::list::iterator i = listaItems->begin(); + while ( i != listaItems->end() ){ + CItem *temp = *i; + if ( temp->is_connection_area(_a,_b) ) + return true; + i++; + } + return false; +}