|
UniWidgets
1.0.0
|
00001 #ifndef _ADG_H 00002 #define _ADG_H 00003 // ------------------------------------------------------------------------- 00004 #include <string> 00005 #include <map> 00006 #include <components/Image.h> 00007 #include <objects/SimpleObject.h> 00008 #include <objects/LinkLogic.h> 00009 #include <typical/TypicalState.h> 00010 #include <typical/TypicalTwoState.h> 00011 #include <typical/TypicalFourState.h> 00012 #include <global_macros.h> 00013 // ------------------------------------------------------------------------- 00014 namespace UniWidgets 00015 { 00024 class ADG : public SimpleObject 00025 { 00026 public: 00027 ADG(); 00028 explicit ADG(SimpleObject::BaseObjectType* gobject); 00029 virtual ~ADG(); 00030 00031 /* Constants */ 00032 Gdk::Rectangle *back_rect; 00033 Gdk::Rectangle *D_rect; 00034 Gdk::Rectangle *G_rect; 00035 Gdk::Rectangle *gen_states_rect; 00036 Gdk::Rectangle *key_rect; 00037 static const string img_back_path; 00038 static const string img_back_alarm_path; 00040 static const string img_d_off_path; 00041 static const string img_d_on_path; 00042 static const string img_d_warn_path; 00043 static const string img_d_alarm_path; 00045 static const string img_g_off_path; 00046 static const string img_g_on_path; 00047 static const string img_g_warn_path; 00048 static const string img_g_alarm_path; 00050 static const string img_adg_work_path; 00051 static const string img_adg_overload_path; 00053 static const string img_key_off_path; 00054 static const string img_key_on_path; 00055 static const string img_key_alarm_path; 00056 static const string img_key_undef_path; 00057 static const string img_key_undef_off_path; 00059 static const string img_adg_off_path; 00060 static const string img_states_background_path; 00062 protected: 00063 /* Handlers */ 00064 virtual void on_realize(); 00065 virtual void on_connect() throw(); 00066 00067 private: 00068 /* Variables */ 00069 TypicalState state_back; 00070 TypicalTwoState state_key; 00071 TypicalState state_D; 00072 TypicalState state_G; 00073 TypicalFourState generator_states; 00074 LinkLogic link_; 00075 00076 bool is_configured; 00077 00078 /* Methods */ 00079 void constructor(); 00080 void on_rectangle_changed(); 00081 void on_configure(); 00082 00083 DISALLOW_COPY_AND_ASSIGN(ADG); 00084 00085 /* Properties */ 00086 ADD_PROPERTY( property_lock_view_generator, bool ) 00087 ADD_PROPERTY( property_lock_view_diesel, bool ) 00088 ADD_PROPERTY( property_lock_view_key, bool ) 00089 ADD_PROPERTY( node, UniSetTypes::ObjectId ) 00090 ADD_PROPERTY( svg_path, Glib::ustring ) 00091 ADD_PROPERTY( ag_ai, UniSetTypes::ObjectId ) 00092 ADD_PROPERTY( property_link_di, UniSetTypes::ObjectId ) 00093 ADD_PROPERTY( key_on_di, UniSetTypes::ObjectId ) 00094 ADD_PROPERTY( key_alarm_di, UniSetTypes::ObjectId ) 00095 ADD_PROPERTY( adg_work_di, UniSetTypes::ObjectId ) 00096 ADD_PROPERTY( adg_overload_di, UniSetTypes::ObjectId ) 00097 ADD_PROPERTY( adg_warn_di, UniSetTypes::ObjectId ) 00098 ADD_PROPERTY( adg_alarm_di, UniSetTypes::ObjectId ) 00099 ADD_PROPERTY( adg_back_ai, UniSetTypes::ObjectId ) 00100 ADD_PROPERTY( back_width, long ) 00101 ADD_PROPERTY( back_height, long ) 00102 ADD_PROPERTY( x_ad, long ) 00103 ADD_PROPERTY( x_ag, long ) 00104 ADD_PROPERTY( y_ad, long ) 00105 ADD_PROPERTY( y_ag, long ) 00106 ADD_PROPERTY( w_h_ad, long ) 00107 ADD_PROPERTY( w_h_ag, long ) 00108 ADD_PROPERTY( x_gen_states, long ) 00109 ADD_PROPERTY( y_gen_states, long ) 00110 ADD_PROPERTY( w_gen_states, long ) 00111 ADD_PROPERTY( h_gen_states, long ) 00112 ADD_PROPERTY( x_key, long ) 00113 ADD_PROPERTY( y_key, long ) 00114 ADD_PROPERTY( w_key, long ) 00115 ADD_PROPERTY( h_key, long ) 00117 }; 00118 00119 } 00120 #endif
1.7.6.1