UniWidgets  1.0.0
RIndicatingInstrument.h
00001 #ifndef _RINDICATINGINSTRUMENT_H
00002 #define _RINDICATINGINSTRUMENT_H
00003 // -------------------------------------------------------------------------
00004 #include <string>
00005 #include <map>
00006 #include <objects/SimpleObject.h>
00007 #include <objects/LinkLogic.h>
00008 #include <objects/ADLogic.h>
00009 #include <components/AD.h>
00010 #include <global_macros.h>
00011 // -------------------------------------------------------------------------
00012 namespace UniWidgets
00013 {
00038 class RIndicatingInstrument : public SimpleObject
00039 {
00040 public:
00041     RIndicatingInstrument();
00042     explicit RIndicatingInstrument(SimpleObject::BaseObjectType* gobject);
00043     virtual ~RIndicatingInstrument();
00044 
00045 protected:
00046     /* Handlers */
00047     virtual void on_realize();
00048     virtual void on_connect() throw();
00049     void on_size_allocate(Gtk::Allocation& allocation);
00050 
00051 private:
00052     /* Variables */
00053     AD *device;
00054     ADLogic *logic;
00055 //  LinkLogic link_;
00056     bool is_configured;
00057     bool is_device;
00058 
00059     /* Methods */
00060     void constructor();
00061     void on_configure();
00062     void create_device();
00063     void configure_device();
00064     void configure_colorsectors();
00065     void update_view();
00066     void update_name();
00067     void update_scale();
00068     void update_colorsectors();
00069     void update_lagopti();
00070     void update_fonts();
00071 
00072     DISALLOW_COPY_AND_ASSIGN(RIndicatingInstrument);
00073 
00074     /* Properties */
00075     ADD_PROPERTY( value_ai, UniSetTypes::ObjectId )     
00076     ADD_PROPERTY( node, UniSetTypes::ObjectId )     
00077 //  ADD_PROPERTY( property_link_di, UniSetTypes::ObjectId )/*!< свойство: */
00078     ADD_PROPERTY( type, UniWidgetsTypes::ArrowDeviceType )  
00079     ADD_PROPERTY( name_device, Glib::ustring )      
00080     ADD_PROPERTY( min_value, long )             
00081     ADD_PROPERTY( max_value, long )             
00082     ADD_PROPERTY( step_value, long )            
00083     ADD_PROPERTY( color_sectors, Glib::ustring )        
00084     ADD_PROPERTY( lag, long )               
00085     ADD_PROPERTY( optimization, bool )          
00086     ADD_PROPERTY( scalemarks_number, int )          
00087     ADD_PROPERTY( scalemarks_fontsize, int )        
00088     ADD_PROPERTY( digitalvalue_fontsize, int )      
00089     ADD_PROPERTY( label_fontsize, int )         
00090     ADD_PROPERTY( scalemark_width, int )            
00091     ADD_PROPERTY( colorline_width, int )            
00092 };
00093 
00094 }
00095 #endif