QSettingsDialog  1.0.0
A Qt library to easily create a settings dialog for user configurable settings
Public Member Functions | List of all members
QSettingsGroupWidget< TWidget > Class Template Reference

Generic base class for group widgets. More...

#include <qsettingsgroupwidget.h>

+ Inheritance diagram for QSettingsGroupWidget< TWidget >:

Public Member Functions

 QSettingsGroupWidget (QWidget *parent=nullptr)
 Creates a new group widget with a parent.
 
QWidgetasWidget () final
 Must return this as QWidget (a cast) More...
 
void initialize (const UiPropertyMap &uiPropertyMap) override
 Will be called to initialize the widgets properties with the given ones.
 
- Public Member Functions inherited from QSettingsGroupWidgetBase
virtual ~QSettingsGroupWidgetBase ()
 Virtual destructor.
 
virtual void setName (const QString &name)=0
 Will be called to set the name (title) of the group.
 
virtual void setTooltip (const QString &tooltip)=0
 Will be called to set the tooltip of the group.
 
virtual void setOptional (bool optional)=0
 Will be called to set the group optional or required. More...
 
virtual bool isChecked () const =0
 Returns whether the group is checked or not.
 
virtual void setChecked (bool checked)=0
 Sets the groups checked state.
 
virtual void addWidgetRaw (QSharedPointer< QSettingsEntry > entry, QWidget *content, bool hasError)
 Adds a widget to the dialog in a raw way.
 
virtual void setEntryChecked (QSharedPointer< QSettingsEntry > entry, bool checked)
 Sets an entry within the dialog to be checked.
 
virtual void setEntryLabelEnabled (QSharedPointer< QSettingsEntry > entry, bool enabled)
 Enables or disables an entry (and it's label) in the group.
 
virtual bool isEntryChecked (QSharedPointer< QSettingsEntry > entry) const
 Will be called to find out whether one entry within the group is checked.
 
virtual bool searchExpression (const QRegularExpression &regex, const QString &searchStyleSheet)
 Called to search for the expression within the group and it's children.
 

Additional Inherited Members

- Protected Types inherited from QSettingsGroupWidgetBase
typedef QPair< QWidget *, QSettingsWidgetBase * > GroupElement
 Defines one "element" within the group - label and edit widget.
 
- Protected Member Functions inherited from QSettingsGroupWidgetBase
virtual void addWidgetWithLabel (QWidget *label, QWidget *content)=0
 Simple way to add widgets with a label to the group. More...
 
- Protected Attributes inherited from QSettingsGroupWidgetBase
QHash< QSharedPointer< QSettingsEntry >, GroupElemententryMap
 A map that contains all elements withing this group, by their entry.
 

Detailed Description

template<class TWidget>
class QSettingsGroupWidget< TWidget >

Generic base class for group widgets.

Template Parameters
TWidgetA class that is or inherits QWidget. It will be the primary base class of this widget

Use this generic interface to create your own group widget implementations:

class MyGroupWidget : QSettingsGroupWidget<QGroupBox>
{
public:
//...
}

The class can then be registered to the dialog using QSettingsWidgetDialogEngine::addGroupWidgetType.

Attention
Please check the base class documentation if you want to create a custom group!

Member Function Documentation

template<class TWidget >
QWidget* QSettingsGroupWidget< TWidget >::asWidget ( )
inlinefinalvirtual

Must return this as QWidget (a cast)

Returns
(QWidget*)this;
Warning
This function MUST return itself. It's basically a shortcut for (QWidget*)element, and is there to ensure all widgets that implement this interface do inherit QWidget.

Implements QSettingsGroupWidgetBase.


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