Wraps one setting for Model creation.
More...
#include <Soprano/BackendSetting>
|
(Note that these are not member symbols.)
|
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 BackendSetting & | settingInSettings (BackendSettings &settings, const QString &userOptionName) |
SOPRANO_EXPORT BackendSetting | settingInSettings (const BackendSettings &settings, BackendOption option, const QString &userOptionName=QString()) |
SOPRANO_EXPORT BackendSetting | settingInSettings (const BackendSettings &settings, const QString &userOptionName=QString()) |
SOPRANO_EXPORT QVariant | valueInSettings (const BackendSettings &settings, BackendOption option, const QString &userOptionName=QString()) |
SOPRANO_EXPORT QVariant | valueInSettings (const BackendSettings &settings, const QString &userOptionName, const QVariant &defaultValue=QVariant()) |
SOPRANO_EXPORT QVariant | valueInSettingsWithDefault (const BackendSettings &settings, BackendOption option, const QVariant &defaultValue) |
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.
- Author
- Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org
- See also
- Backend::createModel()
BackendSettings
Definition at line 52 of file backend.h.
◆ BackendSetting() [1/5]
Soprano::BackendSetting::BackendSetting |
( |
| ) |
|
◆ BackendSetting() [2/5]
Create a boolean setting with a default true value.
◆ BackendSetting() [3/5]
Create a standard setting with option s
and value value_
.
◆ BackendSetting() [4/5]
Soprano::BackendSetting::BackendSetting |
( |
const QString & | userOption, |
|
|
const QVariant & | value_ ) |
Create a user setting with user option name userOption
and value value_
.
◆ BackendSetting() [5/5]
Soprano::BackendSetting::BackendSetting |
( |
const BackendSetting & | other | ) |
|
◆ ~BackendSetting()
Soprano::BackendSetting::~BackendSetting |
( |
| ) |
|
◆ operator=()
◆ option()
◆ userOptionName()
QString Soprano::BackendSetting::userOptionName |
( |
| ) |
const |
◆ value()
QVariant Soprano::BackendSetting::value |
( |
| ) |
const |
The value of the setting.
◆ setValue()
void Soprano::BackendSetting::setValue |
( |
const QVariant & | value | ) |
|
Set the value of the Setting.
◆ isOptionInSettings()
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 option is Soprano::BackendOptionUser, this defines the user option to be checked. |
- Returns
true
if the option is defined.
- Since
- 2.2
◆ settingInSettings() [1/4]
Get a setting from the set, allowing to modify it.
- Parameters
-
settings | The list to check. |
option | The option to extract. |
userOptionName | If option is Soprano::BackendOptionUser, this defines the user option to be extracted. |
- Returns
- The extracted setting. An empty setting is added to
settings
in case the option is not found in settings
.
- Since
- 2.2
◆ settingInSettings() [2/4]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
settings | The list to check. |
userOptionName | The user option to be extracted. |
- Returns
- The extracted setting. An empty setting is added to
settings
in case the option is not found in settings
.
- Since
- 2.4
◆ settingInSettings() [3/4]
Get a setting from the set.
- Parameters
-
settings | The list to check. |
option | The option to extract. |
userOptionName | If option is Soprano::BackendOptionUser, this defines the user option to be extracted. |
- Returns
- The extracted setting. If the setting is not found an empty BackendSetting is returned.
- Since
- 2.4
◆ settingInSettings() [4/4]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
settings | The list to check. |
userOptionName | The user option to be extracted. |
- Returns
- The extracted setting. If the setting is not found an empty BackendSetting is returned.
- Since
- 2.4
◆ valueInSettings() [1/2]
Retrieve the value of an option.
- Parameters
-
settings | The list to check. |
option | The option to retrieve. |
userOptionName | If option is 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
◆ valueInSettings() [2/2]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
settings | The list to check. |
userOptionName | The user option to retrieve. |
defaultValue | The default to use if option is not part of settings |
- Returns
- The value of the specified option or
default
if settings
does not contain the option.
- Since
- 2.4
◆ valueInSettingsWithDefault()
Retrieve the value of an option with a fallback default.
- Parameters
-
settings | The list to check. |
option | The option to retrieve. |
defaultValue | The default to use if option is not part of settings |
- Returns
- The value of the specified option or
default
if settings
does not contain the option.
- Since
- 2.4
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/soprano-2.9.4-build/soprano-2.9.4/soprano/backend.h