2018-11-29 15:57:35 +00:00
|
|
|
/*
|
2020-08-02 22:10:35 +00:00
|
|
|
* SPDX-FileCopyrightText: 2018 Eike Hein <hein@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2018 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
2018-11-29 15:57:35 +00:00
|
|
|
*
|
2020-08-02 22:10:35 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2018-11-29 15:57:35 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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
|