Merge lp:~alecu/unity-scopes-api/table-widget-docs into lp:unity-scopes-api

Proposed by Alejandro J. Cura
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 278
Merged at revision: 349
Proposed branch: lp:~alecu/unity-scopes-api/table-widget-docs
Merge into: lp:unity-scopes-api
Prerequisite: lp:~marcustomlinson/unity-scopes-api/lp-1410125
Diff against target: 41 lines (+24/-0)
1 file modified
src/scopes/PreviewWidget.cpp (+24/-0)
To merge this branch: bzr merge lp:~alecu/unity-scopes-api/table-widget-docs
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Michi Henning (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Paweł Stołowski Pending
Review via email: mp+246556@code.launchpad.net

This proposal supersedes a proposal from 2015-01-15.

Commit message

Add docs for the table widget

To post a comment you must log in.
Revision history for this message
Michi Henning (michihenning) wrote : Posted in a previous version of this proposal

Thanks for that! Looks good, but I would reword one sentence:

> \arg \c values An array with as many entries as rows desired. Each entry is an array of two strings: label and value

It'll read better as:

\arg \c values An array with one element per row. Each entry is an array of two strings: label and value.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote : Posted in a previous version of this proposal

Apologies for this failure, it is caused by a change in json-cpp. You can get rid of the failure by merging this branch: https://code.launchpad.net/~marcustomlinson/unity-scopes-api/lp-1410125/+merge/246264

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

Looks good, thanks!

review: Approve
Revision history for this message
Michi Henning (michihenning) wrote :

I just noticed that this has been sitting here for a long time. Is there any reason we can't merge it?

Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good to me, one thing that would be good to include is that when the table is inside a non expanded Expandable only 3 rows at most are shown.

review: Needs Fixing
278. By Alejandro J. Cura

When used inside an Expandable widget, the topmost 3 rows are shown until it's expanded.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

I've added a line explaining what happens when used inside an Expandable widget.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

Albert, if you are happy with this, can you top-approve please?

review: Approve
Revision history for this message
Albert Astals Cid (aacid) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/scopes/PreviewWidget.cpp'
2--- src/scopes/PreviewWidget.cpp 2015-08-13 09:16:59 +0000
3+++ src/scopes/PreviewWidget.cpp 2015-09-04 18:06:51 +0000
4@@ -96,6 +96,7 @@
5 \arg \c comment-input
6 \arg \c comment
7 \arg \c expandable
8+\arg \c table
9
10 \subsection audio audio widget
11
12@@ -448,6 +449,29 @@
13 expandable.add_widget(w2);
14 ...
15 \endcode
16+
17+\subsection table table widget
18+
19+The table widget is used to show a table with labels and values.
20+When used inside an Expandable widget, the topmost 3 rows are shown until it's expanded.
21+
22+List of attributes:
23+\arg \c title A string specifying the title to be shown on top
24+\arg \c values An array with one element per row. Each element is an array of two strings: label and value
25+
26+\code
27+ PreviewWidget table("details", "table");
28+ table.add_attribute_value("title", Variant("This is a table widget"));
29+
30+ VariantArray values {
31+ Variant{VariantArray{Variant{_("Version number")}, Variant{"0.83b"}}},
32+ Variant{VariantArray{Variant{_("Last updated")}, Variant{"2015-01-15"}}},
33+ Variant{VariantArray{Variant{_("First released")}, Variant{"2013-12-16"}}},
34+ Variant{VariantArray{Variant{_("Size")}, Variant{"11.3 MiB"}}},
35+ };
36+ table.add_attribute_value("values", Variant(values));
37+ ...
38+\endcode
39 */
40
41 //! @cond

Subscribers

People subscribed via source and target branches

to all changes: