Commit graph

8 commits

Author SHA1 Message Date
Vlad Zagorodniy
b91cfae308 [kcmkwin] Rename EffectModel to EffectsModel
Summary: Model names have plural form.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18712
2019-03-18 13:10:51 +02:00
Vlad Zagorodniy
dc3bc5f7b7 [kcmkwin] Remove some name duplication in EffectModel
Summary: `effect.effectStatus` looks very weird.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18707
2019-03-18 13:10:33 +02:00
Vlad Zagorodniy
7a28a7442e [kcmkwin] Simplify EffectModel::save
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18706
2019-03-18 13:10:09 +02:00
Vlad Zagorodniy
bc34a9d653 [kcmkwin] Don't discard unsaved changes when reloading effects model
Summary:
If an effect is installed or removed, then all not yet committed changes
will be lost. This is undesired behaviour.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18705
2019-03-18 13:09:44 +02:00
Vlad Zagorodniy
1faa861bd5 [kcmkwin] Add requestConfigure to effects model
Summary:
The main motivation for adding this method is to avoid code duplication.
Both virtual desktops kcm and desktop effects kcm have their own logic
to create configuration dialogs for effects.

On the bright side, if we add support for declarative effect kcms, we
will need to change only this method.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18704
2019-03-18 13:09:03 +02:00
Vlad Zagorodniy
2211a951e7 [kcmkwin] Split out Desktop Effects KCM
Summary:
A while ago desktop effects and compositing settings lived under the
same roof

{F6584639}

{F6584642}

but time has passed and now those two have their own kcms. This causes
some issues:

* for newcomers it's harder to find code of the Desktop Effects KCM;
* git history doesn't look good, e.g. "[kcmkwin/compositing] Add some
  bugs to Desktop Effects KCM to fix later";
* in general, the mix of two doesn't look good in the code.

This change splits out the Desktop Effects KCM. Unfortunately, in order
to have more nicer code I had to refactor EffectModel a little bit.

Before:

{F6584669}

After:

{F6587570}

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, ltoscano, mart, ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18703
2019-03-18 13:08:32 +02:00
David Faure
48971e0848 Enable -DQT_NO_URL_CAST_FROM_STRING and fix compilation 2019-02-12 08:54:53 +01:00
Vlad Zagorodniy
c3fd6413b9 [kcmkwin] Move effects model into a shared library
Summary:
The main motivation for moving it into a shared library is to share the
model between Desktop Effects and Virtual Desktops KCM.

The extracted model is quite the same as the one in Desktop Effects KCM,
except some minor changes, e.g. rename loadEffect and syncConfig to more
convenient names, add comments, some whitespace changes, fix coding
style in some parts, etc.

Test Plan: effectModelTest passes, Desktop Effects KCM works.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: hein, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17765
2019-01-08 15:49:20 +02:00