BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
VIEW
DIALOGS
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
40
class
BALL_VIEW_EXPORT
Preferences
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
100
void
fetchPreferences(
INIFile
&inifile);
101
107
void
writePreferences(
INIFile
&inifile);
108
110
const
QWidget
* currentEntry()
const
;
111
113
const
QWidget
* currentPage()
const
;
114
116
void
setApplyEnabled(
bool
enabled);
117
118
signals:
119
void
applied();
120
121
public
slots:
122
124
127
130
void
show();
131
133
void
showEntry(
QWidget
* page);
134
136
void
entrySelected();
137
139
void
setDefaultValues();
140
142
void
reject();
143
145
void
applyPreferences();
146
148
void
showHelp();
149
150
protected
slots:
151
void
dialogButtonsClicked_(QAbstractButton* button);
152
153
protected
:
154
155
void
removeItem_(
QTreeWidgetItem
* item,
bool
update);
156
157
HashSet<PreferencesEntry*>
entries_
;
158
HashMap<QTreeWidgetItem*, QWidget*>
item_to_widget_
;
159
HashMap<QTreeWidgetItem*, PreferencesEntry*>
item_to_entry_
;
160
HashMap<QWidget*, QTreeWidgetItem*>
widget_to_item_
;
161
163
};
164
165
}
// namespace VIEW
166
}
// namespace BALL
167
168
#endif // BALL_VIEW_DIALOGS_PREFERENCES_H
Generated by
1.8.3.1