Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::PropertyPage Class Reference

Widget to create a page in a PropertySheet dialog. More...

#include <PropertyPage.h>

Inheritance diagram for sf::PropertyPage:
Collaboration diagram for sf::PropertyPage:

Public Member Functions

 PropertyPage (QWidget *parent)
 Constructor.
 
virtual QIcon getPageIcon () const
 Gets the icon of the page for displaying in the list view. Default it returns the sf::Resource settings icon.
 
void setPageIcon (const QIcon &)
 Sets the icon of the page for displaying in the list view.
 
virtual QString getPageName () const
 Gets the name of the page for displaying in the list view. When reimplemented the QObject's name is returned.
 
void setPageName (const QString &)
 Sets the page name icon of the page for displaying in the list view.
 
virtual QString getPageDescription () const
 Gets the description for hinting of the page in the list view.
 
void setPageDescription (const QString &)
 Sets the description for hinting of the page in the list view.
 
virtual void updatePage ()
 Updates the control widgets of the page. This method is called to initialize the control widgets.
 
virtual bool isPageModified () const
 Gets the modified/changed status of the page.
 
virtual bool canApplyPage () const
 Allows validation of the changes made per page. First page which return false is selected.
 
virtual void applyPage ()
 Applies the changes made in this page.
 
virtual void afterPageApply (bool was_modified)
 Called when all pages are applied. Method can be overridden by a derived class to update control widgets that were changed because of other pages being applied.
 
PropertySheetDialoggetSheet ()
 Gets the parent sheet of this page. (also the parent but cast.)
 
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 it is done by the parent sheet already.
 

Protected Member Functions

virtual QWidgetList connectControls ()
 Connects all known controls change signals to a handler which enables or disables buttons. A derived class should call this method when the is set up and controls are updated.
 

Protected Attributes

PropertySheetDialog_sheet
 Holds the sheet it is part of and also its parent.
 
QString _name
 Holds the name of the property page for when getPageName() is not overridden.
 
QString _description
 Holds the description of the property page for when getPageDescription() is not overridden.
 
QIcon _icon
 Holds the description of the property page for when getPageIcon() is not overridden.
 
friend PropertySheetDialog
 

Detailed Description

Widget to create a page in a PropertySheet dialog.

Constructor & Destructor Documentation

◆ PropertyPage()

sf::PropertyPage::PropertyPage ( QWidget *  parent)
explicit

Constructor.

Parameters
parentMyst be a PropertySheetDialog pointer or derived one.

Member Function Documentation

◆ afterPageApply()

virtual void sf::PropertyPage::afterPageApply ( bool  was_modified)
virtual

◆ applyPage()

◆ canApplyPage()

virtual bool sf::PropertyPage::canApplyPage ( ) const
virtual

Allows validation of the changes made per page. First page which return false is selected.

Reimplemented in sf::MiscellaneousPropertyPage, and sf::ProjectPropertyPage.

◆ connectControls()

virtual QWidgetList sf::PropertyPage::connectControls ( )
protectedvirtual

Connects all known controls change signals to a handler which enables or disables buttons. A derived class should call this method when the is set up and controls are updated.

Returns
List of not connected control widgets.

◆ getPageDescription()

◆ getPageIcon()

◆ getPageName()

◆ getSheet()

PropertySheetDialog * sf::PropertyPage::getSheet ( )
inline

Gets the parent sheet of this page. (also the parent but cast.)

◆ isPageModified()

◆ setPageDescription()

void sf::PropertyPage::setPageDescription ( const QString &  )

Sets the description for hinting of the page in the list view.

◆ setPageIcon()

void sf::PropertyPage::setPageIcon ( const QIcon &  )

Sets the icon of the page for displaying in the list view.

◆ setPageName()

void sf::PropertyPage::setPageName ( const QString &  )

Sets the page name icon of the page for displaying in the list view.

◆ stateSaveRestore()

virtual void sf::PropertyPage::stateSaveRestore ( QSettings &  settings,
bool  save 
)
virtual

Called by sheet to save the state of the page. A call to QSettings::beginGroup() is not needed since it is done by the parent sheet already.

Reimplemented in sf::LayoutEditorPropertyPage, sf::WidgetPropertyPage, and sf::UnitConversionPropertyPage.

◆ updatePage()

Member Data Documentation

◆ _description

QString sf::PropertyPage::_description
protected

Holds the description of the property page for when getPageDescription() is not overridden.

◆ _icon

QIcon sf::PropertyPage::_icon
protected

Holds the description of the property page for when getPageIcon() is not overridden.

◆ _name

QString sf::PropertyPage::_name
protected

Holds the name of the property page for when getPageName() is not overridden.

◆ _sheet

PropertySheetDialog* sf::PropertyPage::_sheet
protected

Holds the sheet it is part of and also its parent.

◆ PropertySheetDialog

friend sf::PropertyPage::PropertySheetDialog
protected

The documentation for this class was generated from the following file: