KWin
Loading...
Searching...
No Matches
animationsmodel.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2018 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "effectsmodel.h"
13
14namespace KWin
15{
16
18{
19 Q_OBJECT
25
26public:
27 explicit AnimationsModel(QObject *parent = nullptr);
28
29 bool animationEnabled() const;
30 void setAnimationEnabled(bool enabled);
31
32 int animationIndex() const;
33 void setAnimationIndex(int index);
34
35 bool currentConfigurable() const;
36
37 bool defaultAnimationEnabled() const;
38 int defaultAnimationIndex() const;
39
40 void load();
41 void save();
42 void defaults();
43 bool isDefaults() const;
44 bool needsSave() const;
45
46Q_SIGNALS:
52
53protected:
54 bool shouldStore(const EffectData &data) const override;
55
57 Status status(int row) const;
58 void loadDefaults();
59 bool modelAnimationEnabled() const;
60 int modelAnimationIndex() const;
61
62 bool m_animationEnabled = false;
63 bool m_defaultAnimationEnabled = false;
64 int m_animationIndex = -1;
65 int m_defaultAnimationIndex = -1;
66 bool m_currentConfigurable = false;
67
68 Q_DISABLE_COPY(AnimationsModel)
69};
70
71}
void setAnimationEnabled(bool enabled)
bool shouldStore(const EffectData &data) const override
void defaultAnimationEnabledChanged()
void defaultAnimationIndexChanged()
void setAnimationIndex(int index)
void currentConfigurableChanged()
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
QModelIndex index(int row, int column, const QModelIndex &parent={}) const override
QModelIndex parent(const QModelIndex &child) const override
#define private
#define explicit