2018-11-29 15:57:35 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Eike Hein <hein@kde.org>
|
[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
|
|
|
* Copyright (C) 2018 Vlad Zagorodniy <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
|
|
|
|
|
|
|
|
#include <KQuickAddons/ConfigModule>
|
|
|
|
#include <KSharedConfig>
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
class VirtualDesktops : public KQuickAddons::ConfigModule
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
Q_PROPERTY(QAbstractItemModel* desktopsModel READ desktopsModel CONSTANT)
|
|
|
|
Q_PROPERTY(bool navWraps READ navWraps WRITE setNavWraps NOTIFY navWrapsChanged)
|
|
|
|
Q_PROPERTY(bool osdEnabled READ osdEnabled WRITE setOsdEnabled NOTIFY osdEnabledChanged)
|
|
|
|
Q_PROPERTY(int osdDuration READ osdDuration WRITE setOsdDuration NOTIFY osdDurationChanged)
|
|
|
|
Q_PROPERTY(bool osdTextOnly READ osdTextOnly WRITE setOsdTextOnly NOTIFY osdTextOnlyChanged)
|
[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)
|
2018-11-29 15:57:35 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
explicit VirtualDesktops(QObject *parent = nullptr, const QVariantList &list = QVariantList());
|
|
|
|
~VirtualDesktops() override;
|
|
|
|
|
|
|
|
QAbstractItemModel *desktopsModel() const;
|
|
|
|
|
|
|
|
bool navWraps() const;
|
|
|
|
void setNavWraps(bool wraps);
|
|
|
|
|
|
|
|
bool osdEnabled() const;
|
|
|
|
void setOsdEnabled(bool enabled);
|
|
|
|
|
|
|
|
int osdDuration() const;
|
|
|
|
void setOsdDuration(int duration);
|
|
|
|
|
|
|
|
int osdTextOnly() const;
|
|
|
|
void setOsdTextOnly(bool textOnly);
|
|
|
|
|
[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;
|
|
|
|
|
2018-11-29 15:57:35 +00:00
|
|
|
Q_SIGNALS:
|
|
|
|
void navWrapsChanged() const;
|
|
|
|
void osdEnabledChanged() const;
|
|
|
|
void osdDurationChanged() const;
|
|
|
|
void osdTextOnlyChanged() const;
|
|
|
|
|
|
|
|
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 Q_SLOTS:
|
|
|
|
void updateNeedsSave();
|
|
|
|
|
|
|
|
private:
|
|
|
|
KSharedConfigPtr m_kwinConfig;
|
|
|
|
DesktopsModel *m_desktopsModel;
|
|
|
|
bool m_navWraps;
|
|
|
|
bool m_osdEnabled;
|
|
|
|
int m_osdDuration;
|
|
|
|
bool m_osdTextOnly;
|
[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
|