Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindesktopng/virtualdesktops.h
- This file was added.
| 1 | /* | ||||
|---|---|---|---|---|---|
| 2 | * Copyright (C) 2018 Eike Hein <hein@kde.org> | ||||
| 3 | * | ||||
| 4 | * This program is free software; you can redistribute it and/or modify | ||||
| 5 | * it under the terms of the GNU General Public License as published by | ||||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||||
| 7 | * (at your option) any later version. | ||||
| 8 | * | ||||
| 9 | * This program is distributed in the hope that it will be useful, | ||||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
| 12 | * GNU General Public License for more details. | ||||
| 13 | * | ||||
| 14 | * You should have received a copy of the GNU General Public License | ||||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
| 16 | */ | ||||
| 17 | | ||||
| 18 | #ifndef VIRTUALDESKTOPS_H | ||||
| 19 | #define VIRTUALDESKTOPS_H | ||||
| 20 | | ||||
| 21 | #include <KQuickAddons/ConfigModule> | ||||
| 22 | | ||||
| 23 | namespace KWin { | ||||
| 24 | | ||||
| 25 | class DesktopsModel; | ||||
| 26 | | ||||
| 27 | class VirtualDesktops : public KQuickAddons::ConfigModule | ||||
| 28 | { | ||||
| 29 | Q_OBJECT | ||||
| 30 | | ||||
| 31 | Q_PROPERTY(QAbstractItemModel* desktopsModel READ desktopsModel CONSTANT) | ||||
| 32 | | ||||
| 33 | public: | ||||
| 34 | explicit VirtualDesktops(QObject* parent = nullptr, const QVariantList &list = QVariantList()); | ||||
| 35 | ~VirtualDesktops() override; | ||||
| 36 | | ||||
| 37 | QAbstractItemModel *desktopsModel() const; | ||||
| 38 | | ||||
| 39 | public Q_SLOTS: | ||||
| 40 | void load() override; | ||||
| 41 | void save() override; | ||||
| 42 | void defaults() override; | ||||
| 43 | | ||||
| 44 | private: | ||||
| 45 | KWin::DesktopsModel *m_desktopsModel; | ||||
| 46 | }; | ||||
| 47 | | ||||
| 48 | } | ||||
| 49 | | ||||
| 50 | #endif | ||||