Fawkes API  Fawkes Development Version
ConfigAddDialog Class Reference

Dialog to add a config entry. More...

#include "config_add_dialog.h"

Inheritance diagram for ConfigAddDialog:

Public Member Functions

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

Protected Member Functions

void on_my_changed ()
 Swiches the (invisible) pages to add either a bool or a different type value. More...
 

Protected Attributes

Gtk::Entry * m_ent_path
 The Gtk::Entry that contains the path of the new entry. More...
 
Gtk::Entry * m_ent_value
 The Gtk::Entry that contains the value of the new entry. 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::ComboBox * m_cmb_type
 The Gtk::ComboBox to select the type of the new entry. More...
 
Gtk::CheckButton * m_chb_is_default
 The Gtk::CheckButton to set the default flag. More...
 

Detailed Description

Dialog to add a config entry.

Author
Daniel Beck

Definition at line 28 of file config_add_dialog.h.

Constructor & Destructor Documentation

ConfigAddDialog::ConfigAddDialog ( Gtk::Entry *  ent_path,
Gtk::Entry *  ent_value,
Gtk::ComboBox *  cob_bool_value,
Gtk::Notebook *  type_pages,
Gtk::ComboBox *  cmb_type,
Gtk::CheckButton *  chb_is_default 
)

Constructor.

Parameters
ent_pathentry field for path
ent_valueentry field for value
cob_bool_valuecombo box for bool values
type_pagespages for different types
cmb_typecombo box for type
chb_is_defaultcheck button for default values

Definition at line 63 of file config_add_dialog.cpp.

References m_chb_is_default, m_cmb_type, m_cob_bool_value, m_ent_path, m_ent_value, m_type_pages, and on_my_changed().

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

Constructor.

Parameters
cobjectpointer to base object type
builderGtk builder

Definition at line 84 of file config_add_dialog.cpp.

References m_chb_is_default, m_cmb_type, m_cob_bool_value, m_ent_path, m_ent_value, m_type_pages, and on_my_changed().

ConfigAddDialog::~ConfigAddDialog ( )
virtual

Destructor.

Definition at line 99 of file config_add_dialog.cpp.

Member Function Documentation

bool ConfigAddDialog::get_is_default ( ) const

Get the default flag of the new entry.

Returns
if true add to default config database

Definition at line 163 of file config_add_dialog.cpp.

References m_chb_is_default.

Referenced by ConfigTreeView::on_menu_remove_selected().

Glib::ustring ConfigAddDialog::get_path ( ) const

Get the path of the new entry.

Returns
the path of the new entry

Definition at line 120 of file config_add_dialog.cpp.

References m_ent_path.

Referenced by ConfigTreeView::on_menu_remove_selected().

Glib::ustring ConfigAddDialog::get_type ( ) const

Get the type of the new entry.

Returns
the type of the new entry

Definition at line 129 of file config_add_dialog.cpp.

References m_cmb_type.

Referenced by get_value(), ConfigTreeView::on_menu_remove_selected(), and on_my_changed().

Glib::ustring ConfigAddDialog::get_value ( ) const

Get the value of the new entry.

Returns
the value of the new entry

Definition at line 144 of file config_add_dialog.cpp.

References get_type(), m_cob_bool_value, and m_ent_value.

Referenced by ConfigTreeView::on_menu_remove_selected().

void ConfigAddDialog::init ( const Glib::ustring &  path)

Initialize the dialog.

Parameters
paththe config path of the selected row

Definition at line 107 of file config_add_dialog.cpp.

References m_chb_is_default, m_cmb_type, m_cob_bool_value, m_ent_path, and m_ent_value.

Referenced by ConfigTreeView::on_menu_remove_selected().

void ConfigAddDialog::on_my_changed ( )
protected

Swiches the (invisible) pages to add either a bool or a different type value.

Definition at line 172 of file config_add_dialog.cpp.

References get_type(), and m_type_pages.

Referenced by ConfigAddDialog().

Member Data Documentation

ConfigAddDialog::m_chb_is_default
protected

The Gtk::CheckButton to set the default flag.

Definition at line 56 of file config_add_dialog.h.

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

ConfigAddDialog::m_cmb_type
protected

The Gtk::ComboBox to select the type of the new entry.

Definition at line 55 of file config_add_dialog.h.

Referenced by ConfigAddDialog(), get_type(), and init().

ConfigAddDialog::m_cob_bool_value
protected

A combo box to select TRUE or FALSE.

Definition at line 53 of file config_add_dialog.h.

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

ConfigAddDialog::m_ent_path
protected

The Gtk::Entry that contains the path of the new entry.

Definition at line 51 of file config_add_dialog.h.

Referenced by ConfigAddDialog(), get_path(), and init().

ConfigAddDialog::m_ent_value
protected

The Gtk::Entry that contains the value of the new entry.

Definition at line 52 of file config_add_dialog.h.

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

ConfigAddDialog::m_type_pages
protected

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

Definition at line 54 of file config_add_dialog.h.

Referenced by ConfigAddDialog(), and on_my_changed().


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