on xenial help sign in
split
commit7271d002ab34fd167d65d0847880f7a4f1faa0da authorAlbert Astals <albert.astals@canonical.com> dateFri 13 Dec 2013, 15:29 (13 years ago) parent02b2ade
2 files changed+17−19
plugins/DashViews/verticaljournal.cpp−18 plugins/DashViews/verticaljournal.h+17−1
plugins/DashViews/verticaljournal.cpp−18
@@ -15,24 +15,6 @@
1515 */
1616
1717/*
18− * Some documentation on how this thing works:
19− *
20− * A vertical journal is a view that creates delegates
21− * based on a model and layouts them in columns following
22− * a top-left most position rule.
23− *
24− * The number of columns is calculated using the width of
25− * the view itself, the columnWidth (i.e. the width of each individual delegate)
26− * and the horizontalSpacing between columns.
27− *
28− * All delegates are forced to columnWidth if they don't have it.
29− *
30− * The first nColumns items are layouted at row 0 from column 0
31− * to column nColumns-1 in order. After that every new item
32− * is positioned in the column which provides the topmost
33− * position as possible. If more than one column tie in providing
34− * the topmost position the leftmost column will be used.
35− *
3618 * The implementation is centered around m_columnVisibleItems
3719 * that holds a vector of lists. There's a list for each of the
3820 * columns the view has. In the list the items of the column are
plugins/DashViews/verticaljournal.h+17−1
@@ -27,7 +27,23 @@ class QQuickVisualDataModel;
2727class QQmlDelegateModel;
2828#endif
2929
30−class VerticalJournal : public QQuickItem
30+ /** A vertical journal is a view that creates delegates
31+ * based on a model and layouts them in columns following
32+ * a top-left most position rule.
33+ *
34+ * The number of columns is calculated using the width of
35+ * the view itself, the columnWidth (i.e. the width of each individual delegate)
36+ * and the horizontalSpacing between columns.
37+ *
38+ * All delegates are forced to columnWidth if they don't have it.
39+ *
40+ * The first nColumns items are layouted at row 0 from column 0
41+ * to column nColumns-1 in order. After that every new item
42+ * is positioned in the column which provides the free topmost
43+ * position as possible. If more than one column tie in providing
44+ * the topmost free position the leftmost column will be used.
45+ */
46+ class VerticalJournal : public QQuickItem
3147{
3248 Q_OBJECT
3349