X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/a2567db67c5d678c5e71bfadc555f8319ee835a8..d9d84e57f677206a3070de3285220dcdf05872f0:/Client/include/item.h diff --git a/Client/include/item.h b/Client/include/item.h index 02e62b9..df6d3ba 100644 --- a/Client/include/item.h +++ b/Client/include/item.h @@ -2,12 +2,20 @@ #define _ITEM_H_ #include +#include #include #include #include #include #include +/** Estructura para guardar las lineas de conexión */ +typedef struct { + std::string dst; ///< Destino de la línea + bool is_tank; ///< Define si es un tanque + bool is_tank_lower; ///< Define si esta conectado abajo +} t_Linea; + class ViewItem:public Gtk::EventBox { public: ViewItem(Glib::ustring _name); @@ -25,16 +33,26 @@ public: inline void set_color(const Gdk::Color &c) { color = c; } inline Gdk::Color get_color() { return color; } - std::string get_actual_flow(); + virtual std::string get_actual_flow(); virtual std::string get_cap_flow() { return "Flujo Actual :"; } virtual std::string get_cap_extra() { return ""; } virtual std::string get_extra() { return ""; } + + std::list out_lines; // lineas que salen de una compuerta + std::list in_lines; // lineas que entran a una compuerta + + // Coordenadas para los conectores + int x,y; + int in_x, in_y; + int out_x, out_y; + int offset_x, offset_y; + int item_offset_x, item_offset_y; protected: Glib::ustring name; Gtk::Image image; Gdk::Color color; Glib::RefPtr gc; - int x, y, m_or; + int m_or; float actual_flow, extra; bool open; };