|
UniWidgets
1.0.0
|
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 "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 virtual void set_lock_view(const bool lock); 00060 void insert_mode(const long mode, const long priority, const long blink); 00062 Glib::ustring get_path(const long mode); 00064 Gdk::Rectangle* get_rect(); 00066 private: 00067 /* Variables */ 00068 Gdk::Rectangle rect_; 00069 ShowLogic showlogic_; 00070 StateLogic statelogic_high_warn_; 00071 StateLogic statelogic_low_warn_; 00072 StateLogic statelogic_high_alarm_; 00073 StateLogic statelogic_low_alarm_; 00074 ModeImageMap images_; 00075 ModePathMap paths_; 00076 00077 /* Methods */ 00078 void constructor(); 00079 00080 DISALLOW_COPY_AND_ASSIGN(TypicalFourState); 00081 }; 00082 00083 } 00084 #endif
1.7.6.1