Merge lp:~stolowski/unity-api/range-input-filter-iface into lp:unity-api

Proposed by Paweł Stołowski
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 208
Merged at revision: 215
Proposed branch: lp:~stolowski/unity-api/range-input-filter-iface
Merge into: lp:unity-api
Prerequisite: lp:~stolowski/unity-api/filters-iface
Diff against target: 126 lines (+94/-1)
3 files modified
include/unity/shell/scopes/RangeInputFilterInterface.h (+90/-0)
test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt (+1/-0)
test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp (+3/-1)
To merge this branch: bzr merge lp:~stolowski/unity-api/range-input-filter-iface
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Albert Astals Cid (community) Approve
Review via email: mp+277100@code.launchpad.net

Commit message

Interface for RangeInputFilter.

Description of the change

Interface for RangeInputFilter.

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:208
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-1-ci/27/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/653
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/676
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/694
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/694
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/690
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/690/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/690
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/690/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/690
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/690/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/690
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/690/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/690
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/690/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/690
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/690/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-1-ci/27/rebuild

review: Approve (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:208
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-1-ci/28/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/770
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/788
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/788
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/785/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/785
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/785/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-1-ci/28/rebuild

review: Approve (continuous-integration)
209. By Paweł Stołowski

Merged filter-iface

210. By Paweł Stołowski

Merged filter-iface

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'include/unity/shell/scopes/RangeInputFilterInterface.h'
2--- include/unity/shell/scopes/RangeInputFilterInterface.h 1970-01-01 00:00:00 +0000
3+++ include/unity/shell/scopes/RangeInputFilterInterface.h 2016-03-11 12:03:28 +0000
4@@ -0,0 +1,90 @@
5+/*
6+ * Copyright (C) 2015 Canonical, Ltd.
7+ *
8+ * This program is free software; you can redistribute it and/or modify
9+ * it under the terms of the GNU General Public License as published by
10+ * the Free Software Foundation; version 3.
11+ *
12+ * This program is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU General Public License
18+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19+ */
20+
21+#ifndef UNITY_SHELL_SCOPES_RANGEINPUTFILTERINTERFACE_H
22+#define UNITY_SHELL_SCOPES_RANGEINPUTFILTERINTERFACE_H
23+
24+#include <unity/SymbolExport.h>
25+
26+#include "FilterBaseInterface.h"
27+
28+namespace unity
29+{
30+namespace shell
31+{
32+namespace scopes
33+{
34+
35+class UNITY_API RangeInputFilterInterface : public FilterBaseInterface
36+{
37+ Q_OBJECT
38+
39+public:
40+ Q_PROPERTY(double startValue READ startValue WRITE setStartValue NOTIFY startValueChanged)
41+ Q_PROPERTY(double endValue READ endValue WRITE setEndValue NOTIFY endValueChanged)
42+ Q_PROPERTY(QString startPrefixLabel READ startPrefixLabel NOTIFY startPrefixLabelChanged)
43+ Q_PROPERTY(QString startPostfixLabel READ startPostfixLabel NOTIFY startPostfixLabelChanged)
44+ Q_PROPERTY(QString centralLabel READ centralLabel NOTIFY centralLabelChanged)
45+ Q_PROPERTY(QString endPrefixLabel READ endPrefixLabel NOTIFY endPrefixLabelChanged)
46+ Q_PROPERTY(QString endPostfixLabel READ endPostfixLabel NOTIFY endPostfixLabelChanged)
47+ Q_PROPERTY(bool hasStartValue READ hasStartValue NOTIFY hasStartValueChanged)
48+ Q_PROPERTY(bool hasEndValue READ hasEndValue NOTIFY hasEndValueChanged)
49+
50+ FiltersInterface::FilterType filterType() const override
51+ {
52+ return FiltersInterface::RangeInputFilter;
53+ }
54+
55+ virtual double startValue() const = 0;
56+ virtual double endValue() const = 0;
57+ virtual void setStartValue(double value) = 0;
58+ virtual void setEndValue(double value) = 0;
59+ virtual QString startPrefixLabel() const = 0;
60+ virtual QString startPostfixLabel() const = 0;
61+ virtual QString centralLabel() const = 0;
62+ virtual QString endPrefixLabel() const = 0;
63+ virtual QString endPostfixLabel() const = 0;
64+ virtual bool hasStartValue() const = 0;
65+ virtual bool hasEndValue() const = 0;
66+
67+ Q_INVOKABLE virtual void eraseStartValue() = 0;
68+ Q_INVOKABLE virtual void eraseEndValue() = 0;
69+
70+Q_SIGNALS:
71+ void startValueChanged();
72+ void endValueChanged();
73+ void hasStartValueChanged();
74+ void hasEndValueChanged();
75+ void startPrefixLabelChanged();
76+ void startPostfixLabelChanged();
77+ void centralLabelChanged();
78+ void endPrefixLabelChanged();
79+ void endPostfixLabelChanged();
80+
81+protected:
82+ /// @cond
83+ explicit RangeInputFilterInterface(QObject* parent = 0) : FilterBaseInterface(parent) {}
84+ /// @endcond
85+};
86+
87+}
88+
89+}
90+}
91+
92+Q_DECLARE_METATYPE(unity::shell::scopes::RangeInputFilterInterface*)
93+
94+#endif
95
96=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt'
97--- test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2016-03-11 12:03:28 +0000
98+++ test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2016-03-11 12:03:28 +0000
99@@ -27,6 +27,7 @@
100 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/FilterBaseInterface.h
101 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/OptionSelectorFilterInterface.h
102 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/OptionSelectorOptionsInterface.h
103+ ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/RangeInputFilterInterface.h
104 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/NavigationInterface.h
105 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/ResultsModelInterface.h
106 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/PreviewModelInterface.h
107
108=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp'
109--- test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp 2016-03-11 12:03:28 +0000
110+++ test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp 2016-03-11 12:03:28 +0000
111@@ -29,6 +29,7 @@
112 #include "FilterBaseInterface.h"
113 #include "OptionSelectorOptionsInterface.h"
114 #include "OptionSelectorFilterInterface.h"
115+#include "RangeInputFilterInterface.h"
116 #include "Mocks/MockScopes.h"
117 #include "Mocks/MockScope.h"
118
119@@ -45,5 +46,6 @@
120 qmlRegisterUncreatableType<unity::shell::scopes::FilterBaseInterface>(uri, 0, 2, "FilterBase", "Can't create new Filter in QML. Get them from Filters instance.");
121 qmlRegisterUncreatableType<unity::shell::scopes::FiltersInterface>(uri, 0, 2, "Filters", "Can't create new Filters in QML. Get them from Scope instance.");
122 qmlRegisterUncreatableType<unity::shell::scopes::OptionSelectorOptionsInterface>(uri, 0, 2, "OptionSelectorOptions", "Can't create new OptionSelectorOptions in QML. Get them from OptionSelectorFilter instance.");
123- qmlRegisterUncreatableType<unity::shell::scopes::OptionSelectorFilterInterface>(uri, 0, 2, "OptionSelectorFilter", "Can't create new OptionSelectorFilter in QML. Get them from Scope instance.");
124+ qmlRegisterUncreatableType<unity::shell::scopes::OptionSelectorFilterInterface>(uri, 0, 2, "OptionSelectorFilter", "Can't create new OptionSelectorFilter in QML. Get them from Filters instance.");
125+ qmlRegisterUncreatableType<unity::shell::scopes::RangeInputFilterInterface>(uri, 0, 2, "RangeInputFilter", "Can't create new RangeInputFilter in QML. Get them from Filters instance.");
126 }

Subscribers

People subscribed via source and target branches

to all changes: