X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/b7745587e67846353ff872a3bc3b3ea5a84706ac..3a8788fb198a1e0590823745f39fbff81056db09:/Constructor/item.h?ds=sidebyside diff --git a/Constructor/item.h b/Constructor/item.h index 5aef5c6..cf9b714 100644 --- a/Constructor/item.h +++ b/Constructor/item.h @@ -1,27 +1,62 @@ +#ifndef _ITEM_H_ +#define _ITEM_H_ - -#ifndef GTKMM_EXAMPLE_DRAWINGAREALINES_H -#define GTKMM_EXAMPLE_DRAWINGAREALINES_H - +#include #include +#include #include #include #include +#include +#include +#include "itemptywnd.h" +class WorkPlace; + class CItem:public Gtk::DrawingArea { public: CItem(); CItem(const char *filename); - ~CItem(); + virtual ~CItem(); virtual bool on_expose_event(GdkEventExpose* event); - virtual void on_menu_popup_opcion(); + virtual void on_menu_popup_propiedades(); virtual void on_menu_popup_rotar(); virtual void on_menu_popup_eliminar(); + virtual void on_menu_popup_conectar(); Glib::RefPtr get_image() { return image; } + int get_position_x(); + int get_position_y(); + int get_id(); + int get_conector_in(); + int get_conector_out(); + int get_img_actual(); + double get_caudal(); + void set_position(int _x, int _y); + void set_id(int _id); + void set_caudal(double _caudal); + void set_name(Glib::ustring _name); + void set_conector_in(int _in); + void set_conector_out(int _out); + bool is_occupied_area(int _a, int _b); + bool is_other_connection_area(int _a, int _b); + virtual void save(FILE *archivo) = 0; + virtual bool check_connection()=0; + virtual bool is_connection_area(int _a, int _b)=0; + Glib::ustring get_name(); + WorkPlace *workplace; + Gtk::Entry *combo_entry; + std::list *listaItems; + bool is_union; protected: + int imgActual; + int ID, conector_in, conector_out; + Glib::ustring name; + double caudal_max; Gtk::Menu menu_popup; - Gtk::Image menu_image; + Gtk::Image menu_image_delete, menu_image_rotar, menu_image_propiedades, menu_image_linea; Glib::RefPtr image; + ItemPtyWnd *property_wnd; + int x, y; }; #endif