plugin_tree_view.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __GUI_UTILS_PLUGIN_TREE_VIEW_H_
00026 #define __GUI_UTILS_PLUGIN_TREE_VIEW_H_
00027
00028 #include <netcomm/fawkes/client_handler.h>
00029 #include <core/utils/lock_queue.h>
00030 #include <gui_utils/connection_dispatcher.h>
00031
00032 #include <gtkmm.h>
00033 #include <libglademm/xml.h>
00034 #ifdef HAVE_GCONFMM
00035 # include <gconfmm.h>
00036 #endif
00037
00038 namespace fawkes {
00039 #if 0
00040 }
00041 #endif
00042
00043 class FawkesNetworkClient;
00044 class FawkesNetworkMessage;
00045
00046 class PluginTreeView
00047 : public Gtk::TreeView
00048 {
00049 public:
00050 PluginTreeView(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> ref_xml);
00051 virtual ~PluginTreeView();
00052
00053 void set_network_client(fawkes::FawkesNetworkClient* client);
00054 void set_gconf_prefix(Glib::ustring gconf_prefix);
00055
00056 private:
00057 class PluginRecord : public Gtk::TreeModelColumnRecord
00058 {
00059 public:
00060 PluginRecord()
00061 {
00062 add(index);
00063 add(name);
00064 add(description);
00065 add(loaded);
00066 }
00067
00068 Gtk::TreeModelColumn<int> index;
00069 Gtk::TreeModelColumn<Glib::ustring> name;
00070 Gtk::TreeModelColumn<Glib::ustring> description;
00071 Gtk::TreeModelColumn<bool> loaded;
00072 };
00073
00074 void on_status_toggled(const Glib::ustring& path);
00075 void on_connected();
00076 void on_disconnected();
00077 void on_message_received(fawkes::FawkesNetworkMessage *msg);
00078 void on_id_clicked();
00079 void on_status_clicked();
00080 void on_name_clicked();
00081 void on_config_changed();
00082
00083 void append_plugin_column();
00084
00085 private:
00086 Glib::RefPtr<Gtk::ListStore> m_plugin_list;
00087 #ifdef HAVE_GCONFMM
00088 Glib::RefPtr<Gnome::Conf::Client> __gconf;
00089 #endif
00090 PluginRecord m_plugin_record;
00091
00092 sigc::connection __gconf_connection;
00093 Glib::ustring __gconf_prefix;
00094
00095 fawkes::ConnectionDispatcher m_dispatcher;
00096 };
00097
00098 }
00099
00100 #endif