PlasmaQuick::ConfigModel Class
This model contains all the possible config categories for a dialog, such as categories of the config dialog for an Applet. More...
| Header: | #include <PlasmaQuick/ConfigModel> |
| CMake: | find_package(PlasmaQuick REQUIRED)target_link_libraries(mytarget PRIVATE Plasma::PlasmaQuick) |
| In QML: | ConfigModel |
Public Types
| enum | Roles { NameRole, IconRole, SourceRole, PluginNameRole, VisibleRole, …, ConfigUiComponent } |
Properties
- categories : const QQmlListProperty<PlasmaQuick::ConfigCategory>
- count : int
Public Functions
| ConfigModel(QObject *parent = nullptr) | |
| void | appendCategory(PlasmaQuick::ConfigCategory *category) |
| void | appendCategory(const QString &iconName, const QString &name, const QString &path, const QString &pluginName) |
| void | appendCategory(const QString &iconName, const QString &name, const QString &path, const QString &pluginName, bool visible) |
| Plasma::Applet * | applet() const |
| QQmlListProperty<PlasmaQuick::ConfigCategory> | categories() |
| void | clear() |
| int | count() |
| QVariant | get(int row) const |
| void | removeCategory(PlasmaQuick::ConfigCategory *category) |
| void | removeCategoryAt(int index) |
| void | setApplet(Plasma::Applet *interface) |
Signals
| void | countChanged() |
Detailed Description
Member Type Documentation
enum ConfigModel::Roles
| Constant | Value |
|---|---|
PlasmaQuick::ConfigModel::NameRole | Qt::UserRole + 1 |
PlasmaQuick::ConfigModel::IconRole | 258 |
PlasmaQuick::ConfigModel::SourceRole | 259 |
PlasmaQuick::ConfigModel::PluginNameRole | 260 |
PlasmaQuick::ConfigModel::VisibleRole | 261 |
PlasmaQuick::ConfigModel::ConfigUiModule | 262 |
PlasmaQuick::ConfigModel::ConfigUiComponent | 263 |
Property Documentation
[read-only] categories : const QQmlListProperty<PlasmaQuick::ConfigCategory>
Access functions:
| QQmlListProperty<PlasmaQuick::ConfigCategory> | categories() |
[read-only] count : int
Access functions:
| int | count() |
Notifier signal:
| void | countChanged() |
Member Function Documentation
[explicit] ConfigModel::ConfigModel(QObject *parent = nullptr)
[invokable] void ConfigModel::appendCategory(PlasmaQuick::ConfigCategory *category)
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void ConfigModel::appendCategory(const QString &iconName, const QString &name, const QString &path, const QString &pluginName)
Add a new category in the model.
ConfigCategory the new category
[invokable] void ConfigModel::appendCategory(const QString &iconName, const QString &name, const QString &path, const QString &pluginName, bool visible)
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
Plasma::Applet *ConfigModel::applet() const
See also setApplet().
QQmlListProperty<PlasmaQuick::ConfigCategory> ConfigModel::categories()
Returns the categories of the model
Note: Getter function for property categories.
void ConfigModel::clear()
clears the model
int ConfigModel::count()
Note: Getter function for property count.
[signal] void ConfigModel::countChanged()
Note: Notifier signal for property count.
[invokable] QVariant ConfigModel::get(int row) const
row The row for which the data will be returned
Returns the data of the specified row
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[invokable] void ConfigModel::removeCategory(PlasmaQuick::ConfigCategory *category)
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[invokable] void ConfigModel::removeCategoryAt(int index)
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void ConfigModel::setApplet(Plasma::Applet *interface)
See also applet().