|
Fawkes API
Fawkes Development Version
|
Blackboard interface chooser dialog that supports multiple choices. More...
#include <>>

Classes | |
| class | Record |
| Blackboard interface record. More... | |
Public Types | |
| typedef std::pair < Glib::ustring, Glib::ustring > | TypeIdPair |
| Pair of type and IDs of interfaces. | |
| typedef std::list< TypeIdPair > | TypeIdPairList |
| List of type and ID of an interface. | |
Public Member Functions | |
| virtual | ~MultiInterfaceChooserDialog () |
| Destructor. | |
| TypeIdPairList | get_selected_interfaces () const |
| Get selected interface types and their respective IDs. | |
| TypeIdPairList | get_newly_selected_interfaces () const |
| Get selected interface types and their respective IDs. | |
Static Public Member Functions | |
| static MultiInterfaceChooserDialog * | create (Gtk::Window &parent, BlackBoard *blackboard, const char *type_pattern, const char *id_pattern, const TypeIdPairList &loaded_interfaces, const Glib::ustring &title=DEFAULT_TITLE) |
| Factory method. | |
Protected Member Functions | |
| MultiInterfaceChooserDialog (Gtk::Window &parent, const TypeIdPairList &loaded_interfaces, const Glib::ustring &title) | |
| Constructor for subclasses. | |
| virtual const Record & | record () const |
| Returns the Record of this chooser dialog. | |
| virtual int | init_columns () |
| Initializes the columns GUI-wise. | |
| virtual void | init_row (Gtk::TreeModel::Row &row, const InterfaceInfo &ii) |
| Initializes a row with the given interface. | |
Blackboard interface chooser dialog that supports multiple choices.
Allows to choose multiple blackboard interfaces from a list of interfaces matching given type and ID patterns.
| typedef std::pair<Glib::ustring, Glib::ustring> fawkes::MultiInterfaceChooserDialog::TypeIdPair |
Pair of type and IDs of interfaces.
Definition at line 38 of file multi_interface_chooser_dialog.h.
List of type and ID of an interface.
Definition at line 40 of file multi_interface_chooser_dialog.h.
| fawkes::MultiInterfaceChooserDialog::~MultiInterfaceChooserDialog | ( | ) | [virtual] |
Destructor.
Definition at line 116 of file multi_interface_chooser_dialog.cpp.
| fawkes::MultiInterfaceChooserDialog::MultiInterfaceChooserDialog | ( | Gtk::Window & | parent, |
| const TypeIdPairList & | loaded_interfaces, | ||
| const Glib::ustring & | title | ||
| ) | [protected] |
Constructor for subclasses.
After calling this constructor, the init() method needs to be called.
| parent | parent window |
| loaded_interfaces | list of interfaces which are already loaded |
| title | title of the dialog |
Definition at line 99 of file multi_interface_chooser_dialog.cpp.
References fawkes::InterfaceChooserDialog::__treeview.
Referenced by create().
| MultiInterfaceChooserDialog * fawkes::MultiInterfaceChooserDialog::create | ( | Gtk::Window & | parent, |
| BlackBoard * | blackboard, | ||
| const char * | type_pattern, | ||
| const char * | id_pattern, | ||
| const TypeIdPairList & | loaded_interfaces, | ||
| const Glib::ustring & | title = DEFAULT_TITLE |
||
| ) | [static] |
Factory method.
Why a factory method instead of a ctor? The factory method calls init(), and init() calls other virtual methods. If this was a ctor, this ctor would not be allowed to be called by subclasses, because then the virtual methods in init() don't dispatch the right way during construction (see Effective C++ #9).
| parent | parent window |
| blackboard | blackboard instance to query interfaces from |
| type_pattern | pattern with shell like globs (* for any number of characters, ? for exactly one character) to match the interface type. |
| id_pattern | pattern with shell like globs (* for any number of characters, ? for exactly one character) to match the interface ID. |
| loaded_interfaces | list of interfaces which are already loaded |
| title | title of the dialog |
Definition at line 76 of file multi_interface_chooser_dialog.cpp.
References MultiInterfaceChooserDialog(), and fawkes::InterfaceChooserDialog::init().
Referenced by LaserGuiGtkWindow::on_select_clicked().
| MultiInterfaceChooserDialog::TypeIdPairList fawkes::MultiInterfaceChooserDialog::get_newly_selected_interfaces | ( | ) | const |
Get selected interface types and their respective IDs.
Definition at line 220 of file multi_interface_chooser_dialog.cpp.
References fawkes::InterfaceChooserDialog::__model, record(), and fawkes::MultiInterfaceChooserDialog::Record::load.
| MultiInterfaceChooserDialog::TypeIdPairList fawkes::MultiInterfaceChooserDialog::get_selected_interfaces | ( | ) | const |
Get selected interface types and their respective IDs.
Definition at line 195 of file multi_interface_chooser_dialog.cpp.
References fawkes::InterfaceChooserDialog::__model, record(), and fawkes::MultiInterfaceChooserDialog::Record::load.
| int fawkes::MultiInterfaceChooserDialog::init_columns | ( | ) | [protected, virtual] |
Initializes the columns GUI-wise.
Called in the ctor. Subclasses of InterfaceChooserDialog might want to override this method, but should probably still call their super-class's implementation (i.e., this one).
Reimplemented from fawkes::InterfaceChooserDialog.
Definition at line 155 of file multi_interface_chooser_dialog.cpp.
References fawkes::InterfaceChooserDialog::__treeview, and record().
| void fawkes::MultiInterfaceChooserDialog::init_row | ( | Gtk::TreeModel::Row & | row, |
| const InterfaceInfo & | ii | ||
| ) | [protected, virtual] |
Initializes a row with the given interface.
Called in the ctor. Subclasses of InterfaceChooserDialog might want to override this method, but should probably still call their super-class's implementation (i.e., this one).
| row | The row whose content is to be set. |
| ii | The interface info that should populate the row. |
Reimplemented from fawkes::InterfaceChooserDialog.
Definition at line 182 of file multi_interface_chooser_dialog.cpp.
References record(), fawkes::MultiInterfaceChooserDialog::Record::load, fawkes::InterfaceInfo::type(), and fawkes::InterfaceInfo::id().
| const MultiInterfaceChooserDialog::Record & fawkes::MultiInterfaceChooserDialog::record | ( | ) | const [protected, virtual] |
Returns the Record of this chooser dialog.
Subclasses of InterfaceChooserDialog might want to override this method.
Reimplemented from fawkes::InterfaceChooserDialog.
Definition at line 137 of file multi_interface_chooser_dialog.cpp.
Referenced by init_columns(), init_row(), get_selected_interfaces(), and get_newly_selected_interfaces().