|
UniWidgets
1.0.0
|
00001 #ifndef _TYPICALINDICATOR_H 00002 #define _TYPICALINDICATOR_H 00003 // ------------------------------------------------------------------------- 00004 #include <map> 00005 #include <typical/AbstractTypical.h> 00006 #include <objects/IndicatorLogic.h> 00007 #include <components/Text.h> 00008 #include <components/Image.h> 00009 #include <uniwidgets/USignals.h> 00010 #include <global_macros.h> 00011 // ------------------------------------------------------------------------- 00012 namespace UniWidgets 00013 { 00019 class TypicalIndicator : public SimpleObject 00020 { 00021 public: 00022 TypicalIndicator(); 00023 explicit TypicalIndicator(SimpleObject::BaseObjectType* gobject); 00024 virtual ~TypicalIndicator(); 00025 00026 /* Methods */ 00027 void configure(); 00028 00029 void set_rect(const Gdk::Rectangle rect); 00030 void set_indicator_rect(const Gdk::Rectangle rect); 00031 void set_image_path(const Glib::ustring& path); 00032 void set_precision(int precision); 00033 void set_digits(int digits); 00034 void set_value_ai(const UniSetTypes::ObjectId sensor); 00035 void set_node(const UniSetTypes::ObjectId node); 00036 00037 Glib::ustring& get_image_path(); 00038 int get_precision(); 00039 int get_digits(); 00040 Gdk::Rectangle* get_rect(); 00041 Gdk::Rectangle* get_indicator_rect(); 00042 00043 private: 00044 /* Variables */ 00045 Gdk::Rectangle rect_; 00046 Gdk::Rectangle indicator_rect_; 00047 IndicatorLogic logic_; 00048 Text *indicator_; 00049 Image image_; 00050 Glib::ustring image_path_; 00051 int precision_; 00052 int digits_; 00053 00054 /* Methods */ 00055 void create_indicator(); 00056 00057 DISALLOW_COPY_AND_ASSIGN(TypicalIndicator); 00058 }; 00059 00060 } 00061 #endif
1.7.6.1