7 #ifndef BALL_VIEW_KERNEL_PREFERENCES_ENTRY 8 #define BALL_VIEW_KERNEL_PREFERENCES_ENTRY 10 #ifndef BALL_FORMAT_INIFILE_H 14 #ifndef BALL_DATATYPE_HASHSET_H 89 virtual bool getValue(
String&)
const = 0;
92 virtual bool setValue(
const String&) = 0;
96 typedef std::list<std::pair<QWidget*, String> >
StackPages;
105 virtual void writePreferenceEntries(
INIFile& inifile);
108 virtual void readPreferenceEntries(
const INIFile& inifile);
119 void setWidgetStackName(
const String& name);
127 void setWidgetStack(QStackedWidget* stack);
130 virtual void showStackPage(
Position nr);
133 virtual void showStackPage(
QWidget* widget);
136 virtual Position currentStackPage()
const;
139 virtual void restoreDefaultValues(
bool all =
false);
144 virtual void storeValues();
149 virtual void restoreValues(
bool all =
false);
157 virtual void dump(std::ostream& s = std::cout,
Size depth = 0)
const;
170 void registerWidgets_();
175 void registerObject_(
QObject* widget);
181 void unregisterObject_(
QObject* widget);
187 void restoreValues_(
bool all,
const ValueMap& map);
193 bool isSupported_(
QObject& widget);
219 #endif // BALL_VIEW_KERNEL_PREFERENCES_ENTRY
const String & getINIFileSectionName() const
Get the name for the section in the INIFile.
void setINIFileSectionName(const String &name)
Set the name for the section in the INIFile.
virtual bool setValueAllowed(QObject *)
Allows to prevent restoring of widgets.
String inifile_section_name_
HashSet< QObject * > registered_objects_
std::list< std::pair< QWidget *, String > > StackPages
QStackedWidget * widget_stack_
virtual ~ExtendedPreferencesObject()
HashMap< const QObject *, String > ValueMap
StackPages & getStackPages()
Return all pages, that are to be shown in a parent QStackedWidget.
ExtendedPreferencesObject()