Warning, file /plasma/plasma-workspace/shell/containmentconfigview.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <PlasmaQuick/ConfigModel> 0010 #include <PlasmaQuick/ConfigView> 0011 #include <QQmlPropertyMap> 0012 0013 namespace Plasma 0014 { 0015 class Containment; 0016 } 0017 0018 class QAbstractItemModel; 0019 class CurrentContainmentActionsModel; 0020 0021 // TODO: out of the library? 0022 class ContainmentConfigView : public PlasmaQuick::ConfigView 0023 { 0024 Q_OBJECT 0025 Q_PROPERTY(PlasmaQuick::ConfigModel *containmentActionConfigModel READ containmentActionConfigModel CONSTANT) 0026 Q_PROPERTY(QAbstractItemModel *currentContainmentActionsModel READ currentContainmentActionsModel CONSTANT) 0027 Q_PROPERTY(PlasmaQuick::ConfigModel *wallpaperConfigModel READ wallpaperConfigModel CONSTANT) 0028 Q_PROPERTY(PlasmaQuick::ConfigModel *containmentPluginsConfigModel READ containmentPluginsConfigModel CONSTANT) 0029 Q_PROPERTY(QQmlPropertyMap *wallpaperConfiguration READ wallpaperConfiguration NOTIFY wallpaperConfigurationChanged) 0030 Q_PROPERTY(QString currentWallpaper READ currentWallpaper WRITE setCurrentWallpaper NOTIFY currentWallpaperChanged) 0031 Q_PROPERTY(QString containmentPlugin READ containmentPlugin WRITE setContainmentPlugin NOTIFY containmentPluginChanged) 0032 0033 public: 0034 explicit ContainmentConfigView(Plasma::Containment *interface, QWindow *parent = nullptr); 0035 ~ContainmentConfigView() override; 0036 0037 void init() override; 0038 0039 PlasmaQuick::ConfigModel *containmentActionConfigModel(); 0040 QAbstractItemModel *currentContainmentActionsModel(); 0041 PlasmaQuick::ConfigModel *wallpaperConfigModel(); 0042 PlasmaQuick::ConfigModel *containmentPluginsConfigModel(); 0043 QString currentWallpaper() const; 0044 void setCurrentWallpaper(const QString &wallpaper); 0045 QQmlPropertyMap *wallpaperConfiguration() const; 0046 QString containmentPlugin() const; 0047 void setContainmentPlugin(const QString &plugin); 0048 0049 Q_INVOKABLE void applyWallpaper(); 0050 0051 public Q_SLOTS: 0052 void onWallpaperChanged(uint screenIdx); 0053 0054 Q_SIGNALS: 0055 void currentWallpaperChanged(); 0056 void wallpaperConfigurationChanged(); 0057 void containmentPluginChanged(); 0058 0059 protected: 0060 void syncWallpaperObjects(); 0061 0062 private: 0063 Plasma::Containment *m_containment = nullptr; 0064 PlasmaQuick::ConfigModel *m_wallpaperConfigModel = nullptr; 0065 PlasmaQuick::ConfigModel *m_containmentActionConfigModel = nullptr; 0066 PlasmaQuick::ConfigModel *m_containmentPluginsConfigModel = nullptr; 0067 CurrentContainmentActionsModel *m_currentContainmentActionsModel = nullptr; 0068 QString m_currentWallpaperPlugin; 0069 QQmlPropertyMap *m_currentWallpaperConfig = nullptr; 0070 QQmlPropertyMap *m_ownWallpaperConfig = nullptr; 0071 };