Merge lp:~stolowski/unity-api/expandable-filter-widget into lp:unity-api

Proposed by Paweł Stołowski
Status: Superseded
Proposed branch: lp:~stolowski/unity-api/expandable-filter-widget
Merge into: lp:unity-api
Diff against target: 151 lines (+75/-3)
7 files modified
debian/changelog (+7/-0)
include/unity/shell/scopes/CMakeLists.txt (+1/-1)
include/unity/shell/scopes/ExpandableFilterWidgetInterface.h (+59/-0)
include/unity/shell/scopes/FiltersInterface.h (+2/-1)
include/unity/shell/scopes/ResultsModelInterface.h (+3/-1)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockResultsModel.cpp (+2/-0)
test/qmltest/unity/shell/scopes/tst_Scopes.qml (+1/-0)
To merge this branch: bzr merge lp:~stolowski/unity-api/expandable-filter-widget
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+292268@code.launchpad.net

This proposal has been superseded by a proposal from 2016-04-26.

Commit message

Added ExpandableFilterWidgetInterface.

Description of the change

Added ExpandableFilterWidgetInterface.

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good.

review: Approve
220. By Paweł Stołowski

Merged social-attributes

221. By Paweł Stołowski

Merged social attr

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-04-13 18:39:21 +0000
3+++ debian/changelog 2016-04-26 11:12:23 +0000
4@@ -1,3 +1,10 @@
5+unity-api (7.111) UNRELEASED; urgency=medium
6+
7+ * Added RoleSocialActions to ResultsModelInterface of scopes.
8+ * Added ExpandableFilterWidgetInterface.
9+
10+ -- Pawel Stolowski <pawel.stolowski@canonical.com> Thu, 25 Apr 2016 10:00:42 +0100
11+
12 unity-api (7.110+16.04.20160413-0ubuntu1) xenial; urgency=medium
13
14 [ Daniel d'Andrada ]
15
16=== modified file 'include/unity/shell/scopes/CMakeLists.txt'
17--- include/unity/shell/scopes/CMakeLists.txt 2016-03-07 08:27:45 +0000
18+++ include/unity/shell/scopes/CMakeLists.txt 2016-04-26 11:12:23 +0000
19@@ -7,7 +7,7 @@
20
21 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
22
23-set(VERSION 11)
24+set(VERSION 13)
25 set(PKGCONFIG_NAME "unity-shell-scopes")
26 set(PKGCONFIG_DESCRIPTION "Unity shell Scopes APIs")
27 set(PKGCONFIG_REQUIRES "Qt5Core")
28
29=== added file 'include/unity/shell/scopes/ExpandableFilterWidgetInterface.h'
30--- include/unity/shell/scopes/ExpandableFilterWidgetInterface.h 1970-01-01 00:00:00 +0000
31+++ include/unity/shell/scopes/ExpandableFilterWidgetInterface.h 2016-04-26 11:12:23 +0000
32@@ -0,0 +1,59 @@
33+/*
34+ * Copyright (C) 2016 Canonical, Ltd.
35+ *
36+ * This program is free software; you can redistribute it and/or modify
37+ * it under the terms of the GNU General Public License as published by
38+ * the Free Software Foundation; version 3.
39+ *
40+ * This program is distributed in the hope that it will be useful,
41+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
42+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43+ * GNU General Public License for more details.
44+ *
45+ * You should have received a copy of the GNU General Public License
46+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
47+ */
48+
49+#ifndef UNITY_SHELL_SCOPES_EXPANDABLEFILTERWIDGETINTERFACE_H
50+#define UNITY_SHELL_SCOPES_EXPANDABLEFILTERWIDGETINTERFACE_H
51+
52+#include <unity/SymbolExport.h>
53+
54+#include "FilterBaseInterface.h"
55+#include "FiltersInterface.h"
56+
57+namespace unity
58+{
59+namespace shell
60+{
61+namespace scopes
62+{
63+
64+class UNITY_API ExpandableFilterWidgetInterface : public FilterBaseInterface
65+{
66+ Q_OBJECT
67+
68+public:
69+ Q_PROPERTY(unity::shell::scopes::FiltersInterface* filters READ filters CONSTANT)
70+
71+ FiltersInterface::FilterType filterType() const override
72+ {
73+ return FiltersInterface::ExpandableFilterWidget;
74+ }
75+
76+ virtual FiltersInterface* filters() const = 0;
77+
78+protected:
79+ /// @cond
80+ explicit ExpandableFilterWidgetInterface(QObject* parent = 0) : FilterBaseInterface(parent) {}
81+ /// @endcond
82+};
83+
84+}
85+
86+}
87+}
88+
89+Q_DECLARE_METATYPE(unity::shell::scopes::ExpandableFilterWidgetInterface *)
90+
91+#endif
92
93=== modified file 'include/unity/shell/scopes/FiltersInterface.h'
94--- include/unity/shell/scopes/FiltersInterface.h 2015-11-24 11:25:15 +0000
95+++ include/unity/shell/scopes/FiltersInterface.h 2016-04-26 11:12:23 +0000
96@@ -46,7 +46,8 @@
97 Invalid,
98 OptionSelectorFilter,
99 RangeInputFilter,
100- ValueSliderFilter
101+ ValueSliderFilter,
102+ ExpandableFilterWidget
103 // TODO add remaining filters
104 };
105
106
107=== modified file 'include/unity/shell/scopes/ResultsModelInterface.h'
108--- include/unity/shell/scopes/ResultsModelInterface.h 2015-09-16 10:05:47 +0000
109+++ include/unity/shell/scopes/ResultsModelInterface.h 2016-04-26 11:12:23 +0000
110@@ -71,7 +71,8 @@
111 RoleAttributes,
112 RoleBackground,
113 RoleOverlayColor,
114- RoleQuickPreviewData ///< Data for UI quick previewing. In case of audio should contain uri and duration
115+ RoleQuickPreviewData, ///< Data for UI quick previewing. In case of audio should contain uri and duration
116+ RoleSocialActions ///< Data for social actions (in-card actions such as "+1").
117 };
118
119 // @cond
120@@ -96,6 +97,7 @@
121 roles[RoleAttributes] = "attributes";
122 roles[RoleBackground] = "background";
123 roles[RoleOverlayColor] = "overlayColor";
124+ roles[RoleSocialActions] = "socialActions";
125 return roles;
126 }
127
128
129=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockResultsModel.cpp'
130--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockResultsModel.cpp 2014-07-18 12:56:46 +0000
131+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockResultsModel.cpp 2016-04-26 11:12:23 +0000
132@@ -67,6 +67,8 @@
133 case RoleUri:
134 case RoleCategoryId:
135 case RoleDndUri:
136+ case RoleAttributes:
137+ case RoleSocialActions:
138 default:
139 return QString();
140 }
141
142=== modified file 'test/qmltest/unity/shell/scopes/tst_Scopes.qml'
143--- test/qmltest/unity/shell/scopes/tst_Scopes.qml 2016-03-07 08:27:25 +0000
144+++ test/qmltest/unity/shell/scopes/tst_Scopes.qml 2016-04-26 11:12:23 +0000
145@@ -427,6 +427,7 @@
146 { tag: "Model.roles[attributes]", role: "attributes", type: "string" },
147 { tag: "Model.roles[background]", role: "background", type: "object" },
148 { tag: "Model.roles[overlayColor]", role: "overlayColor", type: "string" },
149+ { tag: "Model.roles[socialActions]", role: "socialActions", type: "string" },
150 ];
151 }
152

Subscribers

People subscribed via source and target branches

to all changes: