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

The UiFileBasedOptionPage class is the base class for SettingsDialog pages using UI files to describe the widget tree. More...

#include <optionpage.h>

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

Public Member Functions

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

Protected Member Functions

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

Detailed Description

template<class UiClass>
class Dialogs::UiFileBasedOptionPage< UiClass >

The UiFileBasedOptionPage class is the base class for SettingsDialog pages using UI files to describe the widget tree.

Template Parameters
UiClassSpecifies the UI class generated by uic.

Definition at line 91 of file optionpage.h.

Constructor & Destructor Documentation

◆ UiFileBasedOptionPage()

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

Constructs a new UI file based option page.

Definition at line 111 of file optionpage.h.

◆ ~UiFileBasedOptionPage()

template<class UiClass >
Dialogs::UiFileBasedOptionPage< UiClass >::~UiFileBasedOptionPage ( )

Destroys the option page.

Definition at line 119 of file optionpage.h.

Member Function Documentation

◆ apply()

template<class UiClass >
bool Dialogs::UiFileBasedOptionPage< UiClass >::apply ( )
pure 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 Dialogs::OptionPage.

◆ reset()

template<class UiClass >
void Dialogs::UiFileBasedOptionPage< UiClass >::reset ( )
pure 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 Dialogs::OptionPage.

◆ setupWidget()

template<class UiClass >
QWidget * Dialogs::UiFileBasedOptionPage< UiClass >::setupWidget ( )
protectedvirtual

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

Implements Dialogs::OptionPage.

Definition at line 126 of file optionpage.h.

◆ ui()

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

Provides the derived class access to the UI class.

Definition at line 139 of file optionpage.h.


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