QSettingsDialog  1.0.0
A Qt library to easily create a settings dialog for user configurable settings
Public Member Functions | Friends | List of all members
QSettingsEntry Class Reference

Represents one settings entry within the settings dialog. More...

#include <qsettingsentry.h>

+ Inheritance diagram for QSettingsEntry:

Public Member Functions

 QSettingsEntry (int displaytype, QSettingsLoader *loader)
 Creates a new entry from a display id and a loader. More...
 
 QSettingsEntry (int displaytype, QSettingsLoader *loader, const QString &name, bool optional=false, const QString &tooltip=QString(), const UiPropertyMap &properties=UiPropertyMap())
 Creates a new entry from a display id, a loader and it's properties. More...
 
template<typename... Args>
 QSettingsEntry (int displaytype, QSettingsLoader *loader, const QString &name, bool optional, const QString &tooltip, Args...properties)
 Creates a new entry from a display id, a loader and it's properties. More...
 
virtual ~QSettingsEntry ()
 Virtual destructor.
 
QString entryName () const
 Returns the display name of this entry.
 
void setEntryName (const QString &name)
 Sets the display name of this entry.
 
bool isOptional () const
 Specifies, whether the entry is optional or not.
 
void setOptional (bool optional)
 Sets the entry be optional or not optional.
 
QString tooltip () const
 Returns the tooltip this entry has.
 
void setTooltip (const QString &tooltip)
 Sets this entries tooltip.
 
UiPropertyMap uiProperties () const
 Returns the properties that should be set on the ui-elements for this entry.
 
void setUiProperties (const UiPropertyMap &properties)
 Sets the properties that should be set on the ui-elements for this entry.
 
void setUiProperty (const QString &name, const QVariant &value)
 Adds a new property to the existing ones that should be set on the ui-elements for this entry.
 
virtual int displaytype ()
 Returns the display type id for this entry.
 
virtual QSettingsLoadergetLoader ()
 Will be called to get a reference to loader this entry holds.
 
virtual void freeLoader (QSettingsLoader *loader)
 Will be called to remove a reference to the loader this entry holds.
 

Friends

class SettingsEntryLayout
 

Detailed Description

Represents one settings entry within the settings dialog.

Each entry contains data about how to be displayed, as well as a QSettingsLoader, that will be used tu load/save the actual settings data.

Most of the entries functions are focus around it's appeareance - the display name, a tooltip, ... - two of those are special. The first one is the QSettingsEntry::displayType. By default, it can be set via the constructor and read with that function. The display id will be used to determine the edit widget of entry. Together with this come the QSettingsEntry::uiProperties (as well as QSettingsEntry::setUiProperties and QSettingsEntry::setUiProperty). These can be used to set properties for that edit widget.

Constructor & Destructor Documentation

QSettingsEntry::QSettingsEntry ( int  displaytype,
QSettingsLoader loader 
)

Creates a new entry from a display id and a loader.

Note
The dialog will take ownership of the loader
QSettingsEntry::QSettingsEntry ( int  displaytype,
QSettingsLoader loader,
const QString name,
bool  optional = false,
const QString tooltip = QString(),
const UiPropertyMap properties = UiPropertyMap() 
)

Creates a new entry from a display id, a loader and it's properties.

Note
The dialog will take ownership of the loader
template<typename... Args>
QSettingsEntry::QSettingsEntry ( int  displaytype,
QSettingsLoader loader,
const QString name,
bool  optional,
const QString tooltip,
Args...  properties 
)

Creates a new entry from a display id, a loader and it's properties.

Note
The dialog will take ownership of the loader

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