Fawkes API  Fawkes Development Version
ConfigEditDialog Class Reference

Dialog to edit a config value. More...

#include "config_edit_dialog.h"

Inheritance diagram for ConfigEditDialog:

Public Member Functions

 ConfigEditDialog (Gtk::Entry *ent_value, Gtk::ComboBox *cob_bool_value, Gtk::Notebook *type_pages, Gtk::CheckButton *chb_is_default)
 Constructor. More...
 
 ConfigEditDialog (BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &builder)
 Constructor. More...
 
virtual ~ConfigEditDialog ()
 Destructor. More...
 
void init (const Glib::ustring &path, const Glib::ustring &type, const Glib::ustring &value)
 Initialize the dialog. More...
 
Glib::ustring get_value () const
 Get the value of the entry widget. More...
 
bool get_is_default () const
 Get the default flag of the new entry. More...
 

Protected Attributes

bool is_bool
 A flag to store wether the config value is boolean. More...
 
Gtk::Entry * m_ent_value
 An entry field to edit the config value. More...
 
Gtk::ComboBox * m_cob_bool_value
 A combo box to select TRUE or FALSE. More...
 
Gtk::Notebook * m_type_pages
 A Gtk::Notebook element to switch between boolean values and the rest. More...
 
Gtk::CheckButton * m_chb_is_default
 The Gtk::CheckButton to set the default flag. More...
 

Detailed Description

Dialog to edit a config value.

Author
Daniel Beck

Definition at line 28 of file config_edit_dialog.h.

Constructor & Destructor Documentation

ConfigEditDialog::ConfigEditDialog ( Gtk::Entry *  ent_value,
Gtk::ComboBox *  cob_bool_value,
Gtk::Notebook *  type_pages,
Gtk::CheckButton *  chb_is_default 
)

Constructor.

Parameters
ent_valueentry field for value
cob_bool_valuecombo box for bool value
type_pagespages for types
chb_is_defaultcheckbutton to mark default values

Definition at line 57 of file config_edit_dialog.cpp.

References m_chb_is_default, m_cob_bool_value, m_ent_value, and m_type_pages.

ConfigEditDialog::ConfigEditDialog ( BaseObjectType *  cobject,
const Glib::RefPtr< Gtk::Builder > &  builder 
)

Constructor.

Parameters
cobjectpointer to base object type
builderGtk builder

Definition at line 71 of file config_edit_dialog.cpp.

References m_chb_is_default, m_cob_bool_value, m_ent_value, and m_type_pages.

ConfigEditDialog::~ConfigEditDialog ( )
virtual

Destructor.

Definition at line 99 of file config_edit_dialog.cpp.

Member Function Documentation

bool ConfigEditDialog::get_is_default ( ) const

Get the default flag of the new entry.

Returns
if true edit the default config database

Definition at line 126 of file config_edit_dialog.cpp.

References m_chb_is_default.

Glib::ustring ConfigEditDialog::get_value ( ) const

Get the value of the entry widget.

Returns
the text in the entry widget

Definition at line 107 of file config_edit_dialog.cpp.

References is_bool, m_cob_bool_value, and m_ent_value.

void ConfigEditDialog::init ( const Glib::ustring &  path,
const Glib::ustring &  type,
const Glib::ustring &  value 
)

Initialize the dialog.

Parameters
pathconfig path
typetype of config entry
valuevalue of the config entry

Definition at line 87 of file config_edit_dialog.cpp.

References is_bool, m_chb_is_default, m_cob_bool_value, m_ent_value, and m_type_pages.

Member Data Documentation

ConfigEditDialog::is_bool
protected

A flag to store wether the config value is boolean.

Definition at line 44 of file config_edit_dialog.h.

Referenced by get_value(), and init().

ConfigEditDialog::m_chb_is_default
protected

The Gtk::CheckButton to set the default flag.

Definition at line 48 of file config_edit_dialog.h.

Referenced by ConfigEditDialog(), get_is_default(), and init().

ConfigEditDialog::m_cob_bool_value
protected

A combo box to select TRUE or FALSE.

Definition at line 46 of file config_edit_dialog.h.

Referenced by ConfigEditDialog(), get_value(), and init().

ConfigEditDialog::m_ent_value
protected

An entry field to edit the config value.

Definition at line 45 of file config_edit_dialog.h.

Referenced by ConfigEditDialog(), get_value(), and init().

ConfigEditDialog::m_type_pages
protected

A Gtk::Notebook element to switch between boolean values and the rest.

Definition at line 47 of file config_edit_dialog.h.

Referenced by ConfigEditDialog(), and init().


The documentation for this class was generated from the following files: