QSettingsDialog
1.0.0
A Qt library to easily create a settings dialog for user configurable settings
|
The base class for edit widgets in the settings dialog. More...
#include <qsettingswidget.h>
Public Member Functions | |
QSettingsWidgetBase () | |
Constructor. | |
virtual | ~QSettingsWidgetBase () |
Virtual Destructor. | |
virtual QWidget * | asWidget ()=0 |
Must return this as QWidget (a cast) More... | |
virtual void | initialize (const UiPropertyMap &uiPropertyMap)=0 |
Will be called to initialize the widgets properties with the given ones. | |
virtual bool | hasValueChanged () const |
Will be called to determine, whether the value has changed or not. More... | |
virtual void | resetValueChanged () |
Resets the value changed status to unchanged. More... | |
virtual void | setValue (const QVariant &value)=0 |
Sets the edit widgets "value". | |
virtual QVariant | getValue () const =0 |
Gets the edit widgets "value". | |
virtual void | resetValue ()=0 |
Resets the edit widgets "value". | |
virtual bool | searchExpression (const QRegularExpression ®ex) |
Will be called to search for a specific expression inside the edit widget. More... | |
The base class for edit widgets in the settings dialog.
Implementations must inherit from QWidget
!
|
pure virtual |
Must return this as QWidget (a cast)
(QWidget*)this;
(QWidget*)element
, and is there to ensure all widgets that implement this interface do inherit QWidget
. Implemented in QSettingsWidget< TWidget >, and QSettingsWidget< QWidget >.
|
virtual |
Will be called to determine, whether the value has changed or not.
true
, if the value has changed since the last reset, false
if notThis function will determine whether the data within this edit will be saved or not. Only if it returs true, data will actually be saved. The "changed" is relative to the status from the last QSettingsWidgetBase::resetValueChanged
. This means, immediatly after a call to that function, this one should always return false
. And only if the current state of the edit is different from the one it had when that funcion was called, true
shall be returned
Reimplemented in QSettingsDialogWidget< TSettingsWidget >.
|
virtual |
Resets the value changed status to unchanged.
See QSettingsWidgetBase::hasValueChanged.
Reimplemented in QSettingsDialogWidget< TSettingsWidget >.
|
inlinevirtual |
Will be called to search for a specific expression inside the edit widget.
regex | The regular expression to match against |
true
, if this edit matches the expression, false
if notReimplement this function if your edit should be used to help find search entries. The default implementation matches on nothing
true
. Reimplemented in QSettingsDialogWidget< TSettingsWidget >.