My Project
ValueSliderFilterInterface.h
1 /*
2  * Copyright (C) 2015 Canonical, Ltd.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU 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 General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef UNITY_SHELL_SCOPES_VALUESLIDERFILTERINTERFACE_H
18 #define UNITY_SHELL_SCOPES_VALUESLIDERFILTERINTERFACE_H
19 
20 #include <unity/SymbolExport.h>
21 
22 #include "FilterBaseInterface.h"
23 #include "ValueSliderValuesInterface.h"
24 
25 namespace unity
26 {
27 namespace shell
28 {
29 namespace scopes
30 {
31 
33 {
34  Q_OBJECT
35 
36 public:
37  Q_PROPERTY(double value READ value WRITE setValue NOTIFY valueChanged)
38  Q_PROPERTY(unity::shell::scopes::ValueSliderValuesInterface* values READ values NOTIFY valuesChanged)
39  Q_PROPERTY(double minValue READ minValue NOTIFY minValueChanged)
40  Q_PROPERTY(double maxValue READ maxValue NOTIFY maxValueChanged)
41 
42 public:
43  FiltersInterface::FilterType filterType() const override
44  {
45  return FiltersInterface::ValueSliderFilter;
46  }
47 
48  virtual double value() const = 0;
49  virtual void setValue(double) = 0;
50  virtual double minValue() const = 0;
51  virtual double maxValue() const = 0;
52  virtual ValueSliderValuesInterface* values() const = 0;
53 
54 Q_SIGNALS:
55  void valueChanged();
56  void valuesChanged();
57  void minValueChanged();
58  void maxValueChanged();
59 
60 protected:
62  explicit ValueSliderFilterInterface(QObject* parent = 0) : FilterBaseInterface(parent) {}
64 };
65 
66 }
67 
68 }
69 }
70 
72 
73 #endif
unity::shell::scopes::FilterBaseInterface
Definition: FilterBaseInterface.h:30
unity
Top-level namespace for all things Unity-related.
Definition: Version.h:37
unity::shell::scopes::ValueSliderValuesInterface
Definition: ValueSliderValuesInterface.h:30
unity::shell::scopes::ValueSliderFilterInterface
Definition: ValueSliderFilterInterface.h:32