Lomiri
Loading...
Searching...
No Matches
easingcurve.h
1/*
2 * Copyright 2014 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17*/
18
19#ifndef EASINGCURVE_H
20#define EASINGCURVE_H
21
22#include <QObject>
23#include <QEasingCurve>
24
36class EasingCurve: public QObject
37{
38 Q_OBJECT
39 Q_PROPERTY(QEasingCurve::Type type READ type WRITE setType NOTIFY typeChanged)
40 Q_PROPERTY(qreal period READ period WRITE setPeriod NOTIFY periodChanged)
41 Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
42 Q_PROPERTY(qreal value READ value NOTIFY progressChanged)
43
44public:
45 EasingCurve(QObject *parent = 0);
46
47 QEasingCurve::Type type() const;
48 void setType(const QEasingCurve::Type type);
49
50 qreal period() const;
51 void setPeriod(qreal period);
52
53 qreal progress() const;
54 void setProgress(qreal progress);
55
56 qreal value() const;
57
58Q_SIGNALS:
59 void typeChanged();
60 void periodChanged();
61 void progressChanged();
62
63private:
64 QEasingCurve m_easingCurve;
65 qreal m_progress;
66 qreal m_value;
67};
68
69#endif
The EasingCurve class.
Definition easingcurve.h:37