on xenial help sign in
split
7271d00Albert Astals
plugins/DashViews/verticaljournal.cpp−18
@@ -15,24 +15,6 @@
15 */
15 */
16
16
17/*
17/*
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− *
36 * The implementation is centered around m_columnVisibleItems
18 * The implementation is centered around m_columnVisibleItems
37 * that holds a vector of lists. There's a list for each of the
19 * that holds a vector of lists. There's a list for each of the
38 * columns the view has. In the list the items of the column are
20 * 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;
27class QQmlDelegateModel;
27class QQmlDelegateModel;
28#endif
28#endif
29
29
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+ */
30−class VerticalJournal : public QQuickItem
46+ class VerticalJournal : public QQuickItem
31{
47{
32 Q_OBJECT
48 Q_OBJECT
33
49