fawkes::ServiceSelectorCBE Class Reference
This widget consists of a Gtk::ComboBoxEntry and a Gtk::Button. More...
#include <gui_utils/service_selector_cbe.h>
Public Member Functions | |
| ServiceSelectorCBE (Gtk::ComboBoxEntry *services, Gtk::Button *connect, Gtk::Window *parent, const char *service="_fawkes._tcp") | |
| Construtor. | |
| ServiceSelectorCBE (Gtk::ComboBoxEntry *services, Gtk::ToolButton *connect, Gtk::Window *parent, const char *service="_fawkes._tcp") | |
| Construtor. | |
| ServiceSelectorCBE (Glib::RefPtr< Gnome::Glade::Xml > ref_xml, const char *cbe_name="cbeServices", const char *btn_name="btnConnect", const char *wnd_name="wndMain", const char *service="_fawkes._tcp") | |
| Constructor. | |
| virtual | ~ServiceSelectorCBE () |
| Destructor. | |
| FawkesNetworkClient * | get_network_client () |
| Access the current network client. | |
| Glib::ustring | get_hostname () |
| Returns the currently selected hostname (after connect). | |
| Glib::ustring | get_name () |
| Returns the currently selected service name (after connect). | |
| unsigned int | get_port () |
| Returns the currently used port (after connect). | |
| sigc::signal< void > | signal_connected () |
| This signal is emitted whenever a network connection is established. | |
| sigc::signal< void > | signal_disconnected () |
| This signal is emitted whenever a network connection is terminated. | |
Protected Member Functions | |
| void | initialize () |
| Initializer method. | |
| void | on_btn_connect_clicked () |
| Signal handler that is called whenever the connect button is clicked or an entry in the combo box is selected. | |
| void | on_service_selected () |
| Signal handler that is called whenever an entry is selected from the combo box. | |
| void | on_connected () |
| Signal handler for the connection established signal. | |
| void | on_disconnected () |
| Signal handler for the connection terminated signal. | |
Protected Attributes | |
| Gtk::ComboBoxEntry * | m_cbe_services |
| A Gtk::ComboBoxEntry that lists all available services. | |
| Gtk::Button * | m_btn_connect |
| A Gtk::Button that triggers the connection. | |
| Gtk::ToolButton * | m_tbtn_connect |
| A Gtk::ToolButton that triggers the connection. | |
| Gtk::Window * | m_parent |
| The parent Gtk::Window. | |
| ConnectionDispatcher * | m_dispatcher |
| A ConnectionDispatcher which dispatches connection signals. | |
| ServiceModel * | m_service_model |
| A liststore which contains information about detected services. | |
Detailed Description
This widget consists of a Gtk::ComboBoxEntry and a Gtk::Button.The combo box contains all detected services of a given type; upon click the button opens a network connection to the selected service.
Definition at line 42 of file service_selector_cbe.h.
Constructor & Destructor Documentation
| ServiceSelectorCBE::ServiceSelectorCBE | ( | Gtk::ComboBoxEntry * | services, | |
| Gtk::Button * | connect, | |||
| Gtk::Window * | parent, | |||
| const char * | service = "_fawkes._tcp" | |||
| ) |
Construtor.
- Parameters:
-
services the combo box to hold the list of services connect the button to trigger the network connection parent the parent window. Used for error dialogs. service a service identifier
Definition at line 74 of file service_selector_cbe.cpp.
References initialize(), m_btn_connect, m_cbe_services, m_parent, m_service_model, and m_tbtn_connect.
| ServiceSelectorCBE::ServiceSelectorCBE | ( | Gtk::ComboBoxEntry * | services, | |
| Gtk::ToolButton * | connect, | |||
| Gtk::Window * | parent, | |||
| const char * | service = "_fawkes._tcp" | |||
| ) |
Construtor.
- Parameters:
-
services the combo box to hold the list of services connect the button to trigger the network connection parent the parent window. Used for error dialogs. service a service identifier
Definition at line 95 of file service_selector_cbe.cpp.
References initialize(), m_btn_connect, m_cbe_services, m_parent, m_service_model, and m_tbtn_connect.
| ServiceSelectorCBE::ServiceSelectorCBE | ( | Glib::RefPtr< Gnome::Glade::Xml > | ref_xml, | |
| const char * | cbe_name = "cbeServices", |
|||
| const char * | btn_name = "btnConnect", |
|||
| const char * | wnd_name = "wndMain", |
|||
| const char * | service = "_fawkes._tcp" | |||
| ) |
Constructor.
- Parameters:
-
ref_xml Glade XML file cbe_name name of the combo box btn_name name of the button wnd_name name of the parent window service service identifier
Definition at line 117 of file service_selector_cbe.cpp.
References initialize(), m_btn_connect, m_cbe_services, m_parent, and m_service_model.
| ServiceSelectorCBE::~ServiceSelectorCBE | ( | ) | [virtual] |
Destructor.
Definition at line 172 of file service_selector_cbe.cpp.
References m_dispatcher, and m_service_model.
Member Function Documentation
| Glib::ustring ServiceSelectorCBE::get_hostname | ( | ) |
Returns the currently selected hostname (after connect).
- Returns:
- the hostname
Definition at line 192 of file service_selector_cbe.cpp.
| Glib::ustring ServiceSelectorCBE::get_name | ( | void | ) |
Returns the currently selected service name (after connect).
- Returns:
- the service name
Definition at line 202 of file service_selector_cbe.cpp.
| FawkesNetworkClient * ServiceSelectorCBE::get_network_client | ( | ) |
Access the current network client.
- Returns:
- the current network client
Definition at line 182 of file service_selector_cbe.cpp.
References fawkes::ConnectionDispatcher::get_client(), and m_dispatcher.
Referenced by PluginGuiGtkWindow::PluginGuiGtkWindow().
| unsigned int ServiceSelectorCBE::get_port | ( | ) |
Returns the currently used port (after connect).
- Returns:
- the port
Definition at line 212 of file service_selector_cbe.cpp.
| void ServiceSelectorCBE::initialize | ( | ) | [protected] |
Initializer method.
Definition at line 134 of file service_selector_cbe.cpp.
References fawkes::ServiceModel::get_column_record(), fawkes::ServiceModel::get_list_store(), m_btn_connect, m_cbe_services, m_dispatcher, m_service_model, m_tbtn_connect, on_btn_connect_clicked(), on_connected(), on_disconnected(), on_service_selected(), fawkes::ConnectionDispatcher::signal_connected(), and fawkes::ConnectionDispatcher::signal_disconnected().
Referenced by ServiceSelectorCBE().
| void ServiceSelectorCBE::on_btn_connect_clicked | ( | ) | [protected] |
Signal handler that is called whenever the connect button is clicked or an entry in the combo box is selected.
Definition at line 239 of file service_selector_cbe.cpp.
References fawkes::Exception::begin(), fawkes::FawkesNetworkClient::connect(), fawkes::FawkesNetworkClient::connected(), fawkes::FawkesNetworkClient::disconnect(), fawkes::ConnectionDispatcher::get_client(), fawkes::ServiceModel::get_column_record(), m_btn_connect, m_cbe_services, m_dispatcher, m_parent, m_service_model, and m_tbtn_connect.
Referenced by initialize().
| void ServiceSelectorCBE::on_connected | ( | ) | [protected] |
Signal handler for the connection established signal.
Definition at line 338 of file service_selector_cbe.cpp.
References m_btn_connect, and m_tbtn_connect.
Referenced by initialize().
| void ServiceSelectorCBE::on_disconnected | ( | ) | [protected] |
Signal handler for the connection terminated signal.
Definition at line 348 of file service_selector_cbe.cpp.
References m_btn_connect, and m_tbtn_connect.
Referenced by initialize().
| void ServiceSelectorCBE::on_service_selected | ( | ) | [protected] |
Signal handler that is called whenever an entry is selected from the combo box.
Definition at line 304 of file service_selector_cbe.cpp.
References fawkes::Exception::begin(), fawkes::FawkesNetworkClient::connect(), fawkes::FawkesNetworkClient::connected(), fawkes::FawkesNetworkClient::disconnect(), fawkes::ConnectionDispatcher::get_client(), fawkes::ServiceModel::get_column_record(), m_cbe_services, m_dispatcher, m_parent, and m_service_model.
Referenced by initialize().
| sigc::signal< void > ServiceSelectorCBE::signal_connected | ( | ) |
This signal is emitted whenever a network connection is established.
- Returns:
- reference to the corresponding dispatcher
Definition at line 221 of file service_selector_cbe.cpp.
References m_dispatcher, and fawkes::ConnectionDispatcher::signal_connected().
Referenced by FawkesConfigEditor::FawkesConfigEditor(), and PluginGuiGtkWindow::PluginGuiGtkWindow().
| sigc::signal< void > ServiceSelectorCBE::signal_disconnected | ( | ) |
This signal is emitted whenever a network connection is terminated.
- Returns:
- reference to the corresponding dispatcher
Definition at line 230 of file service_selector_cbe.cpp.
References m_dispatcher, and fawkes::ConnectionDispatcher::signal_disconnected().
Referenced by FawkesConfigEditor::FawkesConfigEditor(), and PluginGuiGtkWindow::PluginGuiGtkWindow().
Member Data Documentation
fawkes::ServiceSelectorCBE::m_btn_connect [protected] |
A Gtk::Button that triggers the connection.
Definition at line 77 of file service_selector_cbe.h.
Referenced by initialize(), on_btn_connect_clicked(), on_connected(), on_disconnected(), and ServiceSelectorCBE().
fawkes::ServiceSelectorCBE::m_cbe_services [protected] |
A Gtk::ComboBoxEntry that lists all available services.
Definition at line 76 of file service_selector_cbe.h.
Referenced by initialize(), on_btn_connect_clicked(), on_service_selected(), and ServiceSelectorCBE().
fawkes::ServiceSelectorCBE::m_dispatcher [protected] |
A ConnectionDispatcher which dispatches connection signals.
Definition at line 81 of file service_selector_cbe.h.
Referenced by get_network_client(), initialize(), on_btn_connect_clicked(), on_service_selected(), signal_connected(), signal_disconnected(), and ~ServiceSelectorCBE().
fawkes::ServiceSelectorCBE::m_parent [protected] |
The parent Gtk::Window.
Definition at line 79 of file service_selector_cbe.h.
Referenced by on_btn_connect_clicked(), on_service_selected(), and ServiceSelectorCBE().
fawkes::ServiceSelectorCBE::m_service_model [protected] |
A liststore which contains information about detected services.
Definition at line 82 of file service_selector_cbe.h.
Referenced by initialize(), on_btn_connect_clicked(), on_service_selected(), ServiceSelectorCBE(), and ~ServiceSelectorCBE().
fawkes::ServiceSelectorCBE::m_tbtn_connect [protected] |
A Gtk::ToolButton that triggers the connection.
Definition at line 78 of file service_selector_cbe.h.
Referenced by initialize(), on_btn_connect_clicked(), on_connected(), on_disconnected(), and ServiceSelectorCBE().
The documentation for this class was generated from the following files:
- src/libs/gui_utils/service_selector_cbe.h
- src/libs/gui_utils/service_selector_cbe.cpp

