Unity Action API
unity-preview-range-parameter.h
1 /* This file is part of unity-action-api
2  * Copyright 2013 Canonical Ltd.
3  *
4  * unity-action-api is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * unity-action-api is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranties of
10  * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11  * PURPOSE. See the 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 
17 #ifndef UNITY_ACTION_PREVIEW_RANGE_PARAMETER
18 #define UNITY_ACTION_PREVIEW_RANGE_PARAMETER
19 
20 #include <unity/action/PreviewParameter>
21 
22 namespace unity {
23 namespace action {
24  class PreviewRangeParameter;
25 }
26 }
27 
29 {
30  Q_OBJECT
31  Q_DISABLE_COPY(PreviewRangeParameter)
32  Q_PROPERTY(QString text
33  READ text
34  WRITE setText
35  NOTIFY textChanged)
36  Q_PROPERTY(float value
37  READ value
38  WRITE setValue
39  NOTIFY valueChanged)
40  Q_PROPERTY(float minimumValue
41  READ minimumValue
42  WRITE setMinimumValue
43  NOTIFY minimumValueChanged)
44  Q_PROPERTY(float maximumValue
45  READ maximumValue
46  WRITE setMaximumValue
47  NOTIFY maximumValueChanged)
48 
49 public:
50 
51  explicit PreviewRangeParameter(QObject *parent = 0);
52  virtual ~PreviewRangeParameter();
53 
54  QString text() const;
55  void setText(const QString &value);
56 
57  float value() const;
58  void setValue(float value);
59 
60  float minimumValue() const;
61  void setMinimumValue(float value);
62 
63  float maximumValue() const;
64  void setMaximumValue(float value);
65 
66 signals:
67  void textChanged(const QString &text);
68  void valueChanged(float value);
69  void minimumValueChanged(float value);
70  void maximumValueChanged(float value);
71 
72 private:
73  class Private;
74  QScopedPointer<Private> d;
75 };
76 
77 #endif
Definition: unity-action-context.h:20
Definition: unity-preview-parameter.h:28
Definition: unity-preview-range-parameter.h:28
PreviewRangeParameter(QObject *parent=0)
Definition: unity-preview-range-parameter.cpp:97