soprano
Soprano::BackendSetting Class Reference
Wraps one setting for Model creation. More...
#include <Soprano/BackendSetting>
Public Member Functions | |
| BackendSetting (const BackendSetting &other) | |
| BackendSetting (const QString &userOption, const QVariant &value_) | |
| BackendSetting (BackendOption s, const QVariant &value_) | |
| BackendSetting (BackendOption option) | |
| BackendSetting () | |
| ~BackendSetting () | |
| BackendSetting & | operator= (const BackendSetting &other) |
| BackendOption | option () const |
| void | setValue (const QVariant &value) |
| QString | userOptionName () const |
| QVariant | value () const |
Related Functions | |
(Note that these are not member functions.) | |
| SOPRANO_EXPORT bool | isOptionInSettings (const BackendSettings &settings, BackendOption option, const QString &userOptionName=QString()) |
| SOPRANO_EXPORT BackendSetting & | settingInSettings (BackendSettings &settings, BackendOption option, const QString &userOptionName=QString()) |
| SOPRANO_EXPORT QVariant | valueInSettings (const BackendSettings &settings, BackendOption option, const QString &userOptionName=QString()) |
Detailed Description
Wraps one setting for Model creation.
A BackendSetting consists of an option type and an option value. The option type can either be a predefined value from Soprano::BackendOption or a user defined string value that depends on the Backend implementation. In the latter case option has to be set to Soprano::BackendOptionUser.
- See also:
- Backend::createModel()
BackendSettings
Definition at line 52 of file backend.h.
Constructor & Destructor Documentation
| Soprano::BackendSetting::BackendSetting | ( | ) |
Create an empty setting.
- See also:
- Soprano::BackendOptionNone
| Soprano::BackendSetting::BackendSetting | ( | BackendOption | option | ) |
Create a boolean setting with a default true value.
| Soprano::BackendSetting::BackendSetting | ( | BackendOption | s, | |
| const QVariant & | value_ | |||
| ) |
Create a standard setting with option s and value value_.
Create a user setting with user option name userOption and value value_.
| Soprano::BackendSetting::BackendSetting | ( | const BackendSetting & | other | ) |
Copy constructor.
| Soprano::BackendSetting::~BackendSetting | ( | ) |
Destructor.
Member Function Documentation
| BackendSetting& Soprano::BackendSetting::operator= | ( | const BackendSetting & | other | ) |
Copy operator.
| BackendOption Soprano::BackendSetting::option | ( | ) | const |
The option that this setting sets.
If Soprano::BackendOptionUser the option is identified by userOptionName().
| void Soprano::BackendSetting::setValue | ( | const QVariant & | value | ) |
Set the value of the Setting.
| QString Soprano::BackendSetting::userOptionName | ( | ) | const |
The name of the user option if option() is Soprano::BackendOptionUser.
| QVariant Soprano::BackendSetting::value | ( | ) | const |
The value of the setting.
Friends And Related Function Documentation
| SOPRANO_EXPORT bool isOptionInSettings | ( | const BackendSettings & | settings, | |
| BackendOption | option, | |||
| const QString & | userOptionName = QString() | |||
| ) | [related] |
Check if a certain option is defined in a list of BackendSettings.
- Parameters:
-
settings The list to check. option The option to check. userOptionName If optionis Soprano::BackendOptionUser, this defines the user option to be checked.
- Returns:
trueif the option is defined.
- Since:
- 2.2
| SOPRANO_EXPORT BackendSetting & settingInSettings | ( | BackendSettings & | settings, | |
| BackendOption | option, | |||
| const QString & | userOptionName = QString() | |||
| ) | [related] |
Get a setting from the set, allowing to modify it.
- Parameters:
-
settings The list to check. option The option to extract. userOptionName If optionis Soprano::BackendOptionUser, this defines the user option to be extracted.
- Returns:
- The extracted setting.
- Since:
- 2.2
| SOPRANO_EXPORT QVariant valueInSettings | ( | const BackendSettings & | settings, | |
| BackendOption | option, | |||
| const QString & | userOptionName = QString() | |||
| ) | [related] |
Retrieve the value of an option.
- Parameters:
-
settings The list to check. option The option to retrieve. userOptionName If optionis Soprano::BackendOptionUser, this defines the user option to be retrieved.
- Returns:
- The value of the specified option or an invalid variant if the set does not contain the option.
- Since:
- 2.2
The documentation for this class was generated from the following file:
KDE 4.4 API Reference