00001 #ifndef _TYPICALFOURSTATE_H 00002 #define _TYPICALFOURSTATE_H 00003 // ------------------------------------------------------------------------- 00004 #include <map> 00005 #include <global_macros.h> 00006 #include <objects/StateLogic.h> 00007 #include <objects/ShowLogic.h> 00008 #include <typical/AbstractTypical.h> 00009 // ------------------------------------------------------------------------- 00010 namespace UniWidgets 00011 { 00012 class Image; 00024 class TypicalFourState : public AbstractTypical 00025 { 00026 public: 00027 TypicalFourState(); 00028 explicit TypicalFourState(AbstractTypical::BaseObjectType* gobject); 00029 virtual ~TypicalFourState(); 00030 00031 /* FIXME: Move this types to private or into include/types.h */ 00032 /* Types */ 00033 typedef std::map<long, Image*> ModeImageMap; 00034 typedef std::pair<long, Image*> ModeImagePair; 00035 typedef std::map<long, Glib::ustring > ModePathMap; 00036 typedef std::pair<long, Glib::ustring > ModePathPair; 00038 /* Methods */ 00039 void configure(); 00041 void set_rect(const Gdk::Rectangle rect); 00042 void set_path(const long mode, const Glib::ustring& path); 00043 void set_state_ai_high_warn(const UniSetTypes::ObjectId sensor); 00044 void set_node_high_warn(const UniSetTypes::ObjectId node); 00045 void set_mode_state_high_warn(const long mode); 00046 void set_state_ai_low_warn(const UniSetTypes::ObjectId sensor); 00047 void set_node_low_warn(const UniSetTypes::ObjectId node); 00048 void set_mode_state_low_warn(const long mode); 00050 void set_state_obj(const UniSetTypes::ObjectId sensor); 00052 void set_state_ai_high_alarm(const UniSetTypes::ObjectId sensor); 00053 void set_node_high_alarm(const UniSetTypes::ObjectId node); 00054 void set_mode_state_high_alarm(const long mode); 00055 void set_state_ai_low_alarm(const UniSetTypes::ObjectId sensor); 00056 void set_node_low_alarm(const UniSetTypes::ObjectId node); 00057 void set_mode_state_low_alarm(const long mode); 00058 void set_state_blink_low(bool state); 00059 void set_state_blink_high(bool state); 00060 virtual void set_lock_view(const bool lock); 00061 void insert_mode(const long mode, const long priority, const long blink); 00063 Glib::ustring get_path(const long mode); 00065 Gdk::Rectangle* get_rect(); 00067 private: 00068 /* Variables */ 00069 Gdk::Rectangle rect_; 00070 ShowLogic showlogic_; 00071 StateLogic statelogic_high_warn_; 00072 StateLogic statelogic_low_warn_; 00073 StateLogic statelogic_high_alarm_; 00074 StateLogic statelogic_low_alarm_; 00075 ModeImageMap images_; 00076 ModePathMap paths_; 00077 00078 /* Methods */ 00079 void constructor(); 00080 00081 DISALLOW_COPY_AND_ASSIGN(TypicalFourState); 00082 }; 00083 00084 } 00085 #endif
1.5.9