|
UniWidgets
1.0.0
|
00001 #ifndef _INDICATORSHOWLOGIC_H 00002 #define _INDICATORSHOWLOGIC_H 00003 // ------------------------------------------------------------------------- 00004 #include <gtkmm.h> 00005 #include <gdkmm.h> 00006 #include <objects/QueueLogic.h> 00007 #include <uniwidgets/SBlinker.h> 00008 #include <uniwidgets/USignals.h> 00009 #include <uniwidgets/ConfirmSignal.h> 00010 #include <components/TextBlink.h> 00011 #include <global_macros.h> 00012 // ------------------------------------------------------------------------- 00013 namespace UniWidgets 00014 { 00015 class Text; 00026 class IndicatorShowLogic : public QueueLogic 00027 { 00028 public: 00029 IndicatorShowLogic(); 00030 explicit IndicatorShowLogic(Gtk::EventBox::BaseObjectType* gobject); 00031 ~IndicatorShowLogic() {} 00032 00037 void on_set_state_mode(const long mode, const int type,bool blink=true); 00038 void off_set_state_mode(const long mode, const int type); 00039 virtual void set_mode(long mode); 00040 virtual void set_state(bool state); 00041 virtual void stop_blink(); 00042 virtual void start_blink(); 00043 virtual bool is_blinking(); 00044 virtual long get_state_obj(); 00045 // virtual void connect(); 00046 protected: 00047 /* Methods */ 00048 virtual void on_init(); 00049 private: 00050 /* Variables */ 00051 TextBlink *current_indicator_; 00052 std::map<long , Gdk::Color> colors_; 00053 00054 /* Methods */ 00055 void constructor(); 00056 void set_default_color(); 00057 DISALLOW_COPY_AND_ASSIGN(IndicatorShowLogic); 00058 /* Properties */ 00059 ADD_PROPERTY( default_color, Gdk::Color ) 00060 ADD_PROPERTY( warn_color, Gdk::Color ) 00061 ADD_PROPERTY( alarm_color, Gdk::Color ) 00062 }; 00063 00064 } 00065 #endif
1.7.6.1