BALL  1.5.0
preferences.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_DIALOGS_PREFERENCES_H
6 #define BALL_VIEW_DIALOGS_PREFERENCES_H
7 
8 #ifndef BALL_COMMON_GLOBAL_H
9 # include <BALL/COMMON/global.h>
10 #endif
11 
12 #ifndef BALL_DATATYPE_STRING_H
13 # include <BALL/DATATYPE/string.h>
14 #endif
15 
16 #ifndef BALL_DATATYPE_HASHSET_H
17 # include <BALL/DATATYPE/hashSet.h>
18 #endif
19 
20 #ifndef BALL_DATATYPE_HASHMAP_H
21 # include <BALL/DATATYPE/hashMap.h>
22 #endif
23 
24 #include <BALL/VIEW/UIC/ui_preferences.h>
25 
26 namespace BALL
27 {
28  class INIFile;
29 
30  namespace VIEW
31  {
32  class PreferencesEntry;
33 
41  : public QDialog,
42  public Ui_PreferencesData
43  {
44  Q_OBJECT
45 
46  public:
47 
51 
62  Preferences(QWidget *parent = NULL, const char *name = "Preferences");
63 
65  Preferences(const Preferences& preferences);
66 
68  virtual ~Preferences();
69 
71 
74 
78  bool hasPages();
79 
86  void insertEntry(PreferencesEntry *child);
87 
93  void removeEntry(PreferencesEntry *child);
94 
95 
96  void insertChildEntry(PreferencesEntry* parent, PreferencesEntry *child);
97  void insertChildEntry(const std::string& category, PreferencesEntry *child);
98 
104  void fetchPreferences(INIFile &inifile);
105 
111  void writePreferences(INIFile &inifile);
112 
114  const QWidget* currentEntry() const;
115 
117  const QWidget* currentPage() const;
118 
120  void setApplyEnabled(bool enabled);
121 
122  Q_SIGNALS:
123  void applied();
124 
125  public Q_SLOTS:
126 
128 
131 
134  void show();
135 
137  void showEntry(QWidget* page);
138 
140  void entrySelected();
141 
143  void setDefaultValues();
144 
146  void reject();
147 
149  void applyPreferences();
150 
152  BALL_DEPRECATED void showHelp();
153 
154  protected Q_SLOTS:
155  void dialogButtonsClicked_(QAbstractButton* button);
156 
157  protected:
158 
159  void removeItem_(QTreeWidgetItem* item, bool update);
160 
165 
167  };
168 
169  } // namespace VIEW
170 } // namespace BALL
171 
172 #endif // BALL_VIEW_DIALOGS_PREFERENCES_H
BALL::VIEW::Preferences::item_to_entry_
HashMap< QTreeWidgetItem *, PreferencesEntry * > item_to_entry_
Definition: preferences.h:163
hashMap.h
BALL::HashMap< QTreeWidgetItem *, QWidget * >
BALL_DEPRECATED
#define BALL_DEPRECATED
Definition: COMMON/global.h:64
BALL::VIEW::PreferencesEntry
Definition: preferencesEntry.h:68
BALL
Definition: constants.h:12
BALL::HashSet
Definition: hashSet.h:45
global.h
hashSet.h
BALL::VIEW::Preferences::entries_
HashSet< PreferencesEntry * > entries_
Definition: preferences.h:161
BALL::VIEW::Preferences::widget_to_item_
HashMap< QWidget *, QTreeWidgetItem * > widget_to_item_
Definition: preferences.h:164
BALL::VIEW::Preferences::item_to_widget_
HashMap< QTreeWidgetItem *, QWidget * > item_to_widget_
Definition: preferences.h:162
BALL::INIFile
Definition: INIFile.h:28
string.h
QWidget
BALL::VIEW::Preferences
Definition: preferences.h:40
QTreeWidgetItem
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
QDialog