23 #ifndef __TOOLS_CONFIG_EDITOR_CONFIG_TREE_VIEW_H_
24 #define __TOOLS_CONFIG_EDITOR_CONFIG_TREE_VIEW_H_
31 class FawkesNetworkClient;
43 const Glib::RefPtr<Gtk::Builder>& builder);
54 void set_value(
const char* path,
const char* type,
bool is_default,
bool value);
55 void set_value(
const char* path,
const char* type,
bool is_default,
int value);
56 void set_value(
const char* path,
const char* type,
bool is_default, uint value);
57 void set_value(
const char* path,
const char* type,
bool is_default,
float value);
58 void set_value(
const char* path,
const char* type,
bool is_default, std::string value);
81 Gtk::TreeModelColumn<Glib::ustring>
node;
82 Gtk::TreeModelColumn<Glib::ustring>
path;
83 Gtk::TreeModelColumn<Glib::ustring>
type;
108 Gtk::TreeIter get_iter(
const char* path);
109 Gtk::TreeIter search_path(
const char* path );
111 bool edit_entry(
const Gtk::TreeIter& iter);
112 bool add_entry(
const Gtk::TreeIter& iter);
113 bool remove_entry(
const Gtk::TreeIter& iter);
Gtk::TreeModelColumn< bool > value_bool
bool config value
Dialog to add a config entry.
Simple Fawkes network client.
bool m_own_config
True if config was created by ConfigTreeView object.
Treeview widget for displaying/editing config entries.
virtual void on_menu_edit_selected()
Signal handler that is called when the 'edit' entry is selected from popup menu.
Gtk::TreeModelColumn< uint > value_uint
unsigned int config value
virtual void on_menu_add_selected()
Signal handler that is called when the 'add' entry is selected from popup menu.
Gtk::TreeModelColumn< Glib::ustring > value_string
config value as string
Dialog to edit a config value.
virtual ~ConfigTreeView()
Destructor.
Gtk::TreeModelColumn< Glib::ustring > type
config value type
ConfigAddDialog * m_dlg_add
A dialog to add a config entry.
void register_plugin(ConfigEditorPlugin *plugin)
Register a plugin.
void remove_plugin(std::string config_path)
Remove a plugin.
ConfigEditDialog * m_dlg_edit
A dialog to edit a config entry.
Glib::RefPtr< Gtk::TreeStore > m_config_tree
Storage object.
fawkes::Configuration * m_config
The fawkes::Configuration that is displayed and editted.
Dialog to remove a config entry.
Gtk::Menu m_menu
A popup menu to edit the configuration.
virtual void on_menu_remove_selected()
Signal handler that is called when the 'remove' entry is selected from popup menu.
Gtk::TreeModelColumn< Glib::ustring > node
node name
void set_value(const char *path, const char *type, bool is_default, bool value)
Add a config entry to the TreeModel storage object.
Column record class for the config TreeView.
void set_network_client(fawkes::FawkesNetworkClient *client)
Set a network client that is used to open a fawkes::NetworkConfiguration.
ConfigRecord m_config_record
Column record object to access the columns of the storage object.
std::map< std::string, ConfigEditorPlugin * > m_plugins
A map of registered plugins: config-prefix => config editor plugin.
Gtk::TreeModelColumn< Glib::ustring > path
config path
Gtk::TreeModelColumn< int > value_int
int config value
void set_config_file(const char *filename)
Set the file to read the config from.
Gtk::TreeModelColumn< float > value_float
float config value
virtual void on_button_press_event_custom(GdkEventButton *event)
Signal handler for the button press event.
ConfigRemoveDialog * m_dlg_remove
A dialog to remove a config entry.
Gtk::TreeModelColumn< bool > is_default
default flag
void set_config(fawkes::Configuration *config)
Set the fawkes::Configuration to be displayed.
Base class for plugins for the Fawkes config editor.
ConfigTreeView(BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &builder)
Constructor.
Interface for configuration handling.