00001 #ifndef _UPROXYWIDGET_H 00002 #define _UPROXYWIDGET_H 00003 // ------------------------------------------------------------------------- 00004 #include <ObjectsActivator.h> 00005 #include <uwidgets/UContainer.h> 00006 #include <plugins.h> 00007 // ------------------------------------------------------------------------- 00015 class UProxyWidget : public UContainer{ 00016 private: 00017 public: 00018 UProxyWidget(); 00019 00021 UProxyWidget(const Glib::ustring& module, const Glib::ustring& manager_name 00022 ,const Glib::ustring& alive_sensor 00023 ,const Glib::ustring& confirm_sensor 00024 ,const Glib::ustring& auto_confirm_time_str); 00025 00026 explicit UProxyWidget(GtkmmBaseType::BaseObjectType* gobject); 00027 ~UProxyWidget(); 00028 virtual void init_widget(); 00029 00031 Glib::PropertyProxy<Glib::ustring> property_module(); 00032 00034 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_module() const; 00035 00037 Glib::PropertyProxy<Glib::ustring> property_manager_name(); 00038 00040 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_manager_name() const; 00041 00043 Glib::PropertyProxy<Glib::ustring> property_alive_sensor(); 00044 00046 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_alive_sensor() const; 00047 00049 Glib::PropertyProxy<Glib::ustring> property_confirm_sensor(); 00050 00052 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_confirm_sensor() const; 00053 00055 Glib::PropertyProxy<Glib::ustring> property_auto_confirm_time_str(); 00056 00058 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_auto_confirm_time_str() const; 00059 00060 protected: 00061 //We don't need some actions that done in UEventBox 00062 virtual void on_parent_changed(Gtk::Widget* prev_parent) 00063 { Gtk::EventBox::on_parent_changed(prev_parent); } 00064 virtual void on_hierarchy_changed(Gtk::Widget* prev_top) 00065 { Gtk::EventBox::on_hierarchy_changed(prev_top); } 00066 sigc::connection connPoll; 00067 00068 Glib::Property<Glib::ustring> property_module_; 00069 Glib::Property<Glib::ustring> property_manager_name_; 00070 Glib::Property<Glib::ustring> property_alive_sensor_; 00071 Glib::Property<Glib::ustring> property_confirm_sensor_; 00072 Glib::Property<Glib::ustring> property_auto_confirm_time_str_; 00073 Glib::Property<bool> property_connect_; 00074 00075 virtual void on_add(Gtk::Widget* w); 00076 00077 private: 00078 void on_module_name_changed(); 00079 sigc::connection sensor_info_connection_; 00080 sigc::connection ask_sensors_connection_; 00081 // Connector* connector_ptr_; 00082 void ctor(); 00083 ObjectsActivator * act; 00084 }; 00085 // ------------------------------------------------------------------------- 00086 inline Glib::PropertyProxy<Glib::ustring> 00087 UProxyWidget::property_module() 00088 { 00089 return property_module_.get_proxy(); 00090 } 00091 // ------------------------------------------------------------------------- 00092 inline Glib::PropertyProxy_ReadOnly<Glib::ustring> 00093 UProxyWidget::property_module() const 00094 { 00095 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this,"module-name"); 00096 } 00097 // ------------------------------------------------------------------------- 00098 inline Glib::PropertyProxy<Glib::ustring> 00099 UProxyWidget::property_manager_name() 00100 { 00101 return property_manager_name_.get_proxy(); 00102 } 00103 // ------------------------------------------------------------------------- 00104 inline Glib::PropertyProxy_ReadOnly<Glib::ustring> 00105 UProxyWidget::property_manager_name() const 00106 { 00107 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this,"manager-name"); 00108 } 00109 // ------------------------------------------------------------------------- 00110 inline Glib::PropertyProxy<Glib::ustring> 00111 UProxyWidget::property_alive_sensor() 00112 { 00113 return property_alive_sensor_.get_proxy(); 00114 } 00115 // ------------------------------------------------------------------------- 00116 inline Glib::PropertyProxy_ReadOnly<Glib::ustring> 00117 UProxyWidget::property_alive_sensor() const 00118 { 00119 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this,"alive-sensor"); 00120 } 00121 // ------------------------------------------------------------------------- 00122 inline Glib::PropertyProxy<Glib::ustring> 00123 UProxyWidget::property_confirm_sensor() 00124 { 00125 return property_confirm_sensor_.get_proxy(); 00126 } 00127 // ------------------------------------------------------------------------- 00128 inline Glib::PropertyProxy_ReadOnly<Glib::ustring> 00129 UProxyWidget::property_confirm_sensor() const 00130 { 00131 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this,"confirm-sensor"); 00132 } 00133 // ------------------------------------------------------------------------- 00134 inline Glib::PropertyProxy<Glib::ustring> 00135 UProxyWidget::property_auto_confirm_time_str() 00136 { 00137 return property_auto_confirm_time_str_.get_proxy(); 00138 } 00139 // ------------------------------------------------------------------------- 00140 inline Glib::PropertyProxy_ReadOnly<Glib::ustring> 00141 UProxyWidget::property_auto_confirm_time_str() const 00142 { 00143 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this,"auto-confirm-time-str"); 00144 } 00145 #endif
1.5.9