Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
config_add_dialog.h
1 
2 /***************************************************************************
3  * config_add_dialog.h - Add config entries
4  *
5  * Created: Thu Sep 25 15:59:43 2008
6  * Copyright 2008 Daniel Beck
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef __TOOLS_CONFIG_EDITOR_CONFIG_ADD_DIALOG_H_
24 #define __TOOLS_CONFIG_EDITOR_CONFIG_ADD_DIALOG_H_
25 
26 #include <gtkmm.h>
27 
28 class ConfigAddDialog : public Gtk::Dialog
29 {
30  public:
31  ConfigAddDialog(Gtk::Entry *ent_path,
32  Gtk::Entry *ent_value,
33  Gtk::ComboBox *cob_bool_value,
34  Gtk::Notebook *type_pages,
35  Gtk::ComboBox *cmb_type,
36  Gtk::CheckButton *chb_is_default);
37  ConfigAddDialog(BaseObjectType* cobject,
38  const Glib::RefPtr<Gtk::Builder> &builder);
39  virtual ~ConfigAddDialog();
40 
41  void init(const Glib::ustring& path);
42 
43  Glib::ustring get_path() const;
44  Glib::ustring get_type() const;
45  Glib::ustring get_value() const;
46  bool get_is_default() const;
47 
48  protected:
49  void on_my_changed();
50 
51  Gtk::Entry *m_ent_path;
52  Gtk::Entry *m_ent_value;
53  Gtk::ComboBox *m_cob_bool_value;
54  Gtk::Notebook *m_type_pages;
55  Gtk::ComboBox *m_cmb_type;
56  Gtk::CheckButton *m_chb_is_default;
57 };
58 
59 #endif /* __TOOLS_CONFIG_EDITOR_CONFIG_ADD_DIALOG_H_ */
void init(const Glib::ustring &path)
Initialize the dialog.
Glib::ustring get_value() const
Get the value of the new entry.
Dialog to add a config entry.
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.
Glib::ustring get_path() const
Get the path of the new entry.
Gtk::Notebook * m_type_pages
A Gtk::Notebook element to switch between boolean values and the rest.
Gtk::Entry * m_ent_path
The Gtk::Entry that contains the path of the new entry.
Gtk::Entry * m_ent_value
The Gtk::Entry that contains the value of the new entry.
Glib::ustring get_type() const
Get the type of the new entry.
virtual ~ConfigAddDialog()
Destructor.
Gtk::ComboBox * m_cob_bool_value
A combo box to select TRUE or FALSE.
bool get_is_default() const
Get the default flag of the new entry.
Gtk::CheckButton * m_chb_is_default
The Gtk::CheckButton to set the default flag.
void on_my_changed()
Swiches the (invisible) pages to add either a bool or a different type value.
Gtk::ComboBox * m_cmb_type
The Gtk::ComboBox to select the type of the new entry.