Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
PropertyPage.h
Go to the documentation of this file.
1#pragma once
2#include <QSettings>
3#include <QWidget>
4#include <misc/global.h>
5
6namespace sf
7{
8
9// Forward declaration.
11
15class _MISC_CLASS PropertyPage : public QWidget
16{
17 Q_OBJECT
18
19 public:
24 explicit PropertyPage(QWidget* parent);
25
30 [[nodiscard]] virtual QIcon getPageIcon() const;
31
36 [[nodiscard]] virtual QString getPageName() const;
37
41 [[nodiscard]] virtual QString getPageDescription() const;
42
48 virtual void updatePage();
49
55 [[nodiscard]] virtual bool isPageModified() const;
56
61 [[nodiscard]] virtual bool canApplyPage() const;
62
66 virtual void applyPage();
67
74 virtual void afterPageApply(bool was_modified);
75
79 PropertySheetDialog* getSheet();
80
85 virtual void stateSaveRestore(QSettings& settings, bool save);
86
87 protected:
93 virtual QWidgetList connectControls();
94
99
101};
102
104{
105 return _sheet;
106}
107
108}// namespace sf
Widget to create a page in a PropertySheet dialog.
Definition PropertyPage.h:16
virtual void updatePage()
Updates the control widgets of the page.
friend PropertySheetDialog
Definition PropertyPage.h:100
virtual void applyPage()
Applies the changes made in this page.
PropertySheetDialog * _sheet
Holds the sheet it is part of.
Definition PropertyPage.h:98
PropertyPage(QWidget *parent)
Constructor.
virtual QString getPageDescription() const
Gets the description for hinting of the page in the list view.
virtual void stateSaveRestore(QSettings &settings, bool save)
Called by sheet to save the state of the page. A call to QSettings::beginGroup() is not needed since ...
virtual QWidgetList connectControls()
Connects all known controls change signals to a handler which enables or disables buttons....
virtual QIcon getPageIcon() const
Gets the name of the page for displaying in the list view. When not reimplemented this method returns...
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.)
Definition PropertyPage.h:103
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:14
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10
class _MISC_CLASS PropertySheetDialog
Definition gen/PropertySheetDialog.h:18