IndicatorTwoState.h

00001 #ifndef _INDICATORTWOSTATE_H
00002 #define _INDICATORTWOSTATE_H
00003 // -------------------------------------------------------------------------
00004 #include <string>
00005 #include <map>
00006 #include <objects/SimpleObject.h>
00007 #include <objects/LinkLogic.h>
00008 #include <typical/TypicalState.h>
00009 #include <typical/TypicalTwoState.h>
00010 #include <typical/TypicalIndicatorBlink.h>
00011 #include <global_macros.h>
00012 // -------------------------------------------------------------------------
00013 namespace UniWidgets
00014 {
00026 class IndicatorTwoState : public SimpleObject
00027 {
00028 public:
00029   IndicatorTwoState();
00030   explicit IndicatorTwoState(SimpleObject::BaseObjectType* gobject);
00031   virtual ~IndicatorTwoState();
00032 
00033   /* Constants */
00034   static const Gdk::Rectangle highlevel_rect;      
00035   static const Gdk::Rectangle lowlevel_rect;      
00037   static const string highlevel_off_path;        
00038   static const string highlevel_warn_path;      
00039   static const string highlevel_alarm_path;      
00041   static const string lowlevel_off_path;        
00042   static const string lowlevel_warn_path;        
00043   static const string lowlevel_alarm_path;      
00045   sigc::connection button_release_conn_;        
00047 protected:
00048   /* Handlers */
00049   virtual void on_realize();
00050   virtual void on_connect() throw();
00051 
00052 private:
00053   /* Variables */
00054   TypicalTwoState frame_;
00055   TypicalState highlevel_;
00056   TypicalState lowlevel_;
00057   Gdk::Rectangle* frame_rect;
00058   Gdk::Rectangle* indicator_rect;
00059   LinkLogic link_;
00060   
00061   /*Индикатор*/
00062   TypicalIndicatorBlink indicator_;
00063 
00064   bool is_configured;
00065 
00066   /* Methods */
00067   void constructor();
00068   void on_rectangle_changed();
00069   void on_configure();
00070 
00071   DISALLOW_COPY_AND_ASSIGN(IndicatorTwoState);
00072 
00073   /* Properties */
00074   ADD_PROPERTY( value_ai, UniSetTypes::ObjectId )        
00075   ADD_PROPERTY( property_link_di, UniSetTypes::ObjectId )      
00076   ADD_PROPERTY( property_digits, int )          
00077   ADD_PROPERTY( property_precision, int )          
00078   ADD_PROPERTY( property_factor, double )          
00079   ADD_PROPERTY( svg_path, Glib::ustring )          
00080   ADD_PROPERTY( thresholdhigh_warn, UniSetTypes::ObjectId )    
00081   ADD_PROPERTY( thresholdhigh_type, UniWidgetsTypes::ThresholdType )  
00082   ADD_PROPERTY( thresholdlow_warn, UniSetTypes::ObjectId )    
00083   ADD_PROPERTY( thresholdlow_type, UniWidgetsTypes::ThresholdType )  
00084   ADD_PROPERTY( self_state_ai, UniSetTypes::ObjectId )      
00085   ADD_PROPERTY( node, UniSetTypes::ObjectId )        
00086   ADD_PROPERTY( off_path, Glib::ustring )          
00087   ADD_PROPERTY( warn_path, Glib::ustring )        
00088   ADD_PROPERTY( alarm_path, Glib::ustring )        
00089   ADD_PROPERTY( width, long )            
00090   ADD_PROPERTY( height, long )            
00091   ADD_PROPERTY( ind_rect_x, long )          
00092   ADD_PROPERTY( ind_rect_y, long )          
00093   ADD_PROPERTY( indicator_lock_view_high, bool);        
00094   ADD_PROPERTY( indicator_lock_view_low, bool);        
00095   ADD_PROPERTY( font, std::string )          
00096   ADD_PROPERTY( font_color, Gdk::Color )          
00097 };
00098 
00099 }
00100 
00101 #endif

Документация по UniWidgets. Последние изменения: Fri Oct 10 09:57:49 2014. Создано системой  doxygen 1.5.9