~marcustomlinson/unity-scopes-api/fix-querymetadata-tests

« back to all changes in this revision

Viewing changes to src/scopes/PreviewWidget.cpp

  • Committer: Pawel Stolowski
  • Date: 2015-09-18 15:07:34 UTC
  • mfrom: (163.63.23 unity-scopes-api)
  • Revision ID: pawel.stolowski@canonical.com-20150918150734-14jc2ked1nj78568
Merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
\arg \c comment-input
97
97
\arg \c comment
98
98
\arg \c expandable
 
99
\arg \c table
99
100
 
100
101
\subsection audio audio widget
101
102
 
448
449
    expandable.add_widget(w2);
449
450
    ...
450
451
\endcode
 
452
 
 
453
\subsection table table widget
 
454
 
 
455
The table widget is used to show a table with labels and values.
 
456
When used inside an Expandable widget, the topmost 3 rows are shown until it's expanded.
 
457
 
 
458
List of attributes:
 
459
\arg \c title A string specifying the title to be shown on top
 
460
\arg \c values An array with one element per row. Each element is an array of two strings: label and value
 
461
 
 
462
\code
 
463
    PreviewWidget table("details", "table");
 
464
    table.add_attribute_value("title", Variant("This is a table widget"));
 
465
 
 
466
    VariantArray values {
 
467
        Variant{VariantArray{Variant{_("Version number")}, Variant{"0.83b"}}},
 
468
        Variant{VariantArray{Variant{_("Last updated")}, Variant{"2015-01-15"}}},
 
469
        Variant{VariantArray{Variant{_("First released")}, Variant{"2013-12-16"}}},
 
470
        Variant{VariantArray{Variant{_("Size")}, Variant{"11.3 MiB"}}},
 
471
    };
 
472
    table.add_attribute_value("values", Variant(values));
 
473
    ...
 
474
\endcode
451
475
*/
452
476
 
453
477
//! @cond