on xenial help sign in
Some docu about layouting
704eeefAlbert Astals
plugins/DashViews/organicgrid.h+26−11
@@ -19,17 +19,32 @@
19
19
20#include "abstractdashview.h"
20#include "abstractdashview.h"
21
21
22−class QAbstractItemModel;
22+ /** An Organic Grid is is a view that creates delegates
23−class QQmlComponent;
23+ * based on a model and layouts them in groups of six items (called module).
24−#pragma GCC diagnostic push
24+ *
25−#pragma GCC diagnostic ignored "-pedantic"
25+ * In each module there are 4 items that are forced to the small delegate size
26−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
26+ * and two that are forced to the big delegate size.
27−#include <private/qquickvisualdatamodel_p.h>
27+ *
28−#else
28+ * Example:
29−#include <private/qqmldelegatemodel_p.h>
29+ *
30−#include <qqmlinfo.h>
30+ * +---+ +---+ +-----+
31−#endif
31+ * | 1 | | 2 | | |
32−#pragma GCC diagnostic pop
32+ * +---+ +---+ | 5 |
33+ * +-----+ | |
34+ * | | +-----+
35+ * | 3 | +---+ +---+
36+ * | | | 4 | | 6 |
37+ * +-----+ +---+ +---+
38+ *
39+ * Modules are positioned one after the other in a grid like fashion, i.e.
40+ *
41+ * +---+ +---+
42+ * | 1 | | 2 |
43+ * +---+ +---+
44+ * +---+ +---+
45+ * | 3 | | 4 |
46+ * +---+ +---+
47+ */
33
48
34class OrganicGrid : public AbstractDashView
49class OrganicGrid : public AbstractDashView
35{
50{