Qt Utilities 6.14.0
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QtUtilities::UiFileBasedOptionPage< UiClass > Class Template Referenceabstract

#include <optionpage.h>

Inheritance diagram for QtUtilities::UiFileBasedOptionPage< UiClass >:
[legend]
Collaboration diagram for QtUtilities::UiFileBasedOptionPage< UiClass >:
[legend]

Public Member Functions

 UiFileBasedOptionPage (QWidget *parentWindow=nullptr)
 Constructs a new UI file based option page.
 
 ~UiFileBasedOptionPage () override
 Destroys the option page.
 
bool apply () override=0
 Applies altered settings.
 
void reset () override=0
 Discards altered settings and resets relevant widgets.
 
- Public Member Functions inherited from QtUtilities::OptionPage
 OptionPage (QWidget *parentWindow=nullptr)
 Constructs a option page.
 
virtual ~OptionPage ()
 Destroys the option page.
 
QWidget * parentWindow () const
 Returns the parent window of the option page.
 
QWidget * widget ()
 Returns the widget for the option page.
 
bool hasBeenShown () const
 Returns an indication whether the option page has been shown yet.
 
bool matches (const QString &searchKeyWord)
 Returns whether the pages matches the specified searchKeyWord.
 
const QStringList & errors () const
 Returns the errors which haven been occurred when applying the changes.
 

Protected Member Functions

QWidget * setupWidget () override
 Inflates the widget for the option page using the UI class.
 
UiClass * ui ()
 Provides the derived class access to the UI class.
 
- Protected Member Functions inherited from QtUtilities::OptionPage
QStringList & errors ()
 Returns the errors which haven been occurred when applying the changes.
 

Detailed Description

template<class UiClass>
class QtUtilities::UiFileBasedOptionPage< UiClass >

Definition at line 110 of file optionpage.h.

Constructor & Destructor Documentation

◆ UiFileBasedOptionPage()

template<class UiClass >
QtUtilities::UiFileBasedOptionPage< UiClass >::UiFileBasedOptionPage ( QWidget * parentWindow = nullptr)
explicit

Constructs a new UI file based option page.

Definition at line 130 of file optionpage.h.

◆ ~UiFileBasedOptionPage()

template<class UiClass >
QtUtilities::UiFileBasedOptionPage< UiClass >::~UiFileBasedOptionPage ( )
override

Destroys the option page.

Definition at line 138 of file optionpage.h.

Member Function Documentation

◆ apply()

template<class UiClass >
bool QtUtilities::UiFileBasedOptionPage< UiClass >::apply ( )
overridepure virtual

Applies altered settings.

Remarks
The SettingsDialog and any other classes/functions of this library will not call this method if the option page has not been shown yet. Hence it is (no longer) necessary to use OptionPage::hasBeenShown() to check whether the page has been initialized yet.

Implements QtUtilities::OptionPage.

◆ reset()

template<class UiClass >
void QtUtilities::UiFileBasedOptionPage< UiClass >::reset ( )
overridepure virtual

Discards altered settings and resets relevant widgets.

Remarks
The SettingsDialog and any other classes/functions of this library will not call this method if the option page has not been shown yet. Hence it is (no longer) necessary to use OptionPage::hasBeenShown() to check whether the page has been initialized yet.

Implements QtUtilities::OptionPage.

◆ setupWidget()

template<class UiClass >
QWidget * QtUtilities::UiFileBasedOptionPage< UiClass >::setupWidget ( )
overrideprotectedvirtual

Inflates the widget for the option page using the UI class.

Implements QtUtilities::OptionPage.

Definition at line 145 of file optionpage.h.

◆ ui()

template<class UiClass >
UiClass * QtUtilities::UiFileBasedOptionPage< UiClass >::ui ( )
inlineprotected

Provides the derived class access to the UI class.

Definition at line 159 of file optionpage.h.


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