2018-11-29 15:57:35 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Eike Hein <hein@kde.org>
|
2019-09-29 14:03:25 +00:00
|
|
|
* Copyright (C) 2018 Vlad Zahorodnii <vladzzag@gmail.com>
|
2018-11-29 15:57:35 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VIRTUALDESKTOPS_H
|
|
|
|
#define VIRTUALDESKTOPS_H
|
|
|
|
|
2019-12-11 10:14:02 +00:00
|
|
|
#include <KQuickAddons/ManagedConfigModule>
|
2018-11-29 15:57:35 +00:00
|
|
|
#include <KSharedConfig>
|
|
|
|
|
2019-12-10 17:36:07 +00:00
|
|
|
class VirtualDesktopsSettings;
|
|
|
|
|
2018-11-29 15:57:35 +00:00
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
[kcmkwin/desktop] Add animation option back
Summary:
The "new" animation option no longer uses hard coded effects, which
means one could install a third party virtual desktop switching animation,
for example from store.kde.org, and it will be displayed in the KCM.
Test Plan: {F6503565}
Reviewers: #kwin, #vdg, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, ngraham, davidedmundson
Subscribers: davidedmundson, hein, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17766
2018-12-22 23:12:51 +00:00
|
|
|
class AnimationsModel;
|
2018-11-29 15:57:35 +00:00
|
|
|
class DesktopsModel;
|
|
|
|
|
2019-12-11 10:14:02 +00:00
|
|
|
class VirtualDesktops : public KQuickAddons::ManagedConfigModule
|
2018-11-29 15:57:35 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
Q_PROPERTY(QAbstractItemModel* desktopsModel READ desktopsModel CONSTANT)
|
[kcmkwin/desktop] Add animation option back
Summary:
The "new" animation option no longer uses hard coded effects, which
means one could install a third party virtual desktop switching animation,
for example from store.kde.org, and it will be displayed in the KCM.
Test Plan: {F6503565}
Reviewers: #kwin, #vdg, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, ngraham, davidedmundson
Subscribers: davidedmundson, hein, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17766
2018-12-22 23:12:51 +00:00
|
|
|
Q_PROPERTY(QAbstractItemModel *animationsModel READ animationsModel CONSTANT)
|
2019-12-11 10:14:02 +00:00
|
|
|
Q_PROPERTY(VirtualDesktopsSettings *virtualDesktopsSettings READ virtualDesktopsSettings CONSTANT)
|
2018-11-29 15:57:35 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
explicit VirtualDesktops(QObject *parent = nullptr, const QVariantList &list = QVariantList());
|
|
|
|
~VirtualDesktops() override;
|
|
|
|
|
|
|
|
QAbstractItemModel *desktopsModel() const;
|
|
|
|
|
[kcmkwin/desktop] Add animation option back
Summary:
The "new" animation option no longer uses hard coded effects, which
means one could install a third party virtual desktop switching animation,
for example from store.kde.org, and it will be displayed in the KCM.
Test Plan: {F6503565}
Reviewers: #kwin, #vdg, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, ngraham, davidedmundson
Subscribers: davidedmundson, hein, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17766
2018-12-22 23:12:51 +00:00
|
|
|
QAbstractItemModel *animationsModel() const;
|
|
|
|
|
2019-12-11 10:14:02 +00:00
|
|
|
VirtualDesktopsSettings *virtualDesktopsSettings() const;
|
|
|
|
|
|
|
|
bool isDefaults() const override;
|
|
|
|
bool isSaveNeeded() const override;
|
2018-11-29 15:57:35 +00:00
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
void load() override;
|
|
|
|
void save() override;
|
|
|
|
void defaults() override;
|
|
|
|
|
[kcmkwin/desktop] Add animation option back
Summary:
The "new" animation option no longer uses hard coded effects, which
means one could install a third party virtual desktop switching animation,
for example from store.kde.org, and it will be displayed in the KCM.
Test Plan: {F6503565}
Reviewers: #kwin, #vdg, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, ngraham, davidedmundson
Subscribers: davidedmundson, hein, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17766
2018-12-22 23:12:51 +00:00
|
|
|
void configureAnimation();
|
|
|
|
void showAboutAnimation();
|
|
|
|
|
2018-11-29 15:57:35 +00:00
|
|
|
private:
|
2019-12-10 17:36:07 +00:00
|
|
|
VirtualDesktopsSettings *m_settings;
|
2018-11-29 15:57:35 +00:00
|
|
|
DesktopsModel *m_desktopsModel;
|
[kcmkwin/desktop] Add animation option back
Summary:
The "new" animation option no longer uses hard coded effects, which
means one could install a third party virtual desktop switching animation,
for example from store.kde.org, and it will be displayed in the KCM.
Test Plan: {F6503565}
Reviewers: #kwin, #vdg, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, ngraham, davidedmundson
Subscribers: davidedmundson, hein, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17766
2018-12-22 23:12:51 +00:00
|
|
|
AnimationsModel *m_animationsModel;
|
2018-11-29 15:57:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|