Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
PropertyPage.h
Go to the documentation of this file.
1#pragma once
2#include <misc/global.h>
4
5namespace sf
6{
7
8// Forward declaration.
10
14class _MISC_CLASS PropertyPage : public QWidget
15{
16 Q_OBJECT
17
18 public:
23 explicit PropertyPage(QWidget* parent);
24
29 virtual QIcon getPageIcon() const;
30
34 void setPageIcon(const QIcon&);
35
40 virtual QString getPageName() const;
41
45 void setPageName(const QString&);
46
50 virtual QString getPageDescription() const;
51
55 void setPageDescription(const QString&);
60 virtual void updatePage();
61
66 virtual bool isPageModified() const;
67
72 virtual bool canApplyPage() const;
73
77 virtual void applyPage();
78
85 virtual void afterPageApply(bool was_modified);
86
91
96 virtual void storeState(ConfigStore& cfg_store, bool save);
97
98 protected:
104 QWidgetList connectControls();
105
113 virtual void connectIt(PropertySheetDialog* sheet, const QObject* object, QWidgetList& list);
114
119
123 QString _name;
124
129
133 QIcon _icon;
134
136};
137
138}// namespace sf
Class to store application configuration. Uses the global application settings or a given ini-file.
Definition ConfigStore.h:17
Widget to create a page in a PropertySheet dialog.
Definition PropertyPage.h:15
QIcon _icon
Holds the description of the property page for when getPageIcon() is not overridden.
Definition PropertyPage.h:133
void setPageDescription(const QString &)
Sets the description for hinting of the page in the list view.
void setPageIcon(const QIcon &)
Sets the icon of the page for displaying in the list view.
virtual void updatePage()
Updates the control widgets of the page. This method is called to initialize the control widgets.
friend PropertySheetDialog
Definition PropertyPage.h:135
virtual void applyPage()
Applies the changes made in this page.
PropertySheetDialog * _sheet
Holds the sheet it is part of and also its parent.
Definition PropertyPage.h:118
void setPageName(const QString &)
Sets the page name icon of the page for displaying in the list view.
PropertyPage(QWidget *parent)
Constructor.
virtual QString getPageDescription() const
Gets the description for hinting of the page in the list view.
QString _name
Holds the name of the property page for when getPageName() is not overridden.
Definition PropertyPage.h:123
QWidgetList connectControls()
Connects all known controls change signals to a handler which enables or disables buttons....
virtual void storeState(ConfigStore &cfg_store, bool save)
Called by sheet to save the state of the page. A call to QSettings::beginGroup() is not needed since ...
virtual QIcon getPageIcon() const
Gets the icon of the page for displaying in the list view. Default it returns the sf::Resource settin...
QString _description
Holds the description of the property page for when getPageDescription() is not overridden.
Definition PropertyPage.h:128
virtual QString getPageName() const
Gets the name of the page for displaying in the list view. When reimplemented the QObject's name is r...
virtual bool canApplyPage() const
Allows validation of the changes made per page. First page which return false is selected.
PropertySheetDialog * getSheet()
Gets the parent sheet of this page. (also the parent but cast.)
virtual void connectIt(PropertySheetDialog *sheet, const QObject *object, QWidgetList &list)
Connects all standard controls to the sf::PropertySheetDialog::checkModified() method....
virtual void afterPageApply(bool was_modified)
Called when all pages are applied. Method can be overridden by a derived class to update control widg...
virtual bool isPageModified() const
Gets the modified/changed status of the page.
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:15
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10
class _MISC_CLASS PropertySheetDialog
Definition gen/PropertySheetDialog.h:18