BALL 1.5.0
Loading...
Searching...
No Matches
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
18#endif
19
20#ifndef BALL_DATATYPE_HASHMAP_H
22#endif
23
24#include <BALL/VIEW/UIC/ui_preferences.h>
25
26namespace 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
87
94
95
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
141
144
146 void reject();
147
150
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
HashMap class based on the STL map (containing serveral convenience functions)
Preferences(const Preferences &preferences)
Copy constructur.
Preferences(QWidget *parent=NULL, const char *name="Preferences")
HashMap< QWidget *, QTreeWidgetItem * > widget_to_item_
void writePreferences(INIFile &inifile)
void removeItem_(QTreeWidgetItem *item, bool update)
HashSet< PreferencesEntry * > entries_
void removeEntry(PreferencesEntry *child)
void insertChildEntry(const std::string &category, PreferencesEntry *child)
const QWidget * currentPage() const
HashMap< QTreeWidgetItem *, PreferencesEntry * > item_to_entry_
void insertChildEntry(PreferencesEntry *parent, PreferencesEntry *child)
const QWidget * currentEntry() const
void insertEntry(PreferencesEntry *child)
void dialogButtonsClicked_(QAbstractButton *button)
HashMap< QTreeWidgetItem *, QWidget * > item_to_widget_
void fetchPreferences(INIFile &inifile)
virtual ~Preferences()
Destructor.
BALL_DEPRECATED void showHelp()
void showEntry(QWidget *page)
Show the given page.
void setApplyEnabled(bool enabled)
Activate or deactivate the apply and ok buttons.
void applyPreferences()
Store the last applied values for undo.
#define BALL_DEPRECATED
#define BALL_VIEW_EXPORT