QmlMaterial 0.1.0
Loading...
Searching...
No Matches
lazy_masonry_grid.hpp
1#pragma once
2
3#include "qml_material/view/lazy_view.hpp"
4
5namespace qml_material
6{
7class QML_MATERIAL_API LazyMasonryGrid : public LazyView {
8 Q_OBJECT
9 QML_ELEMENT
10 Q_PROPERTY(int fixedSlotCount READ fixedSlotCount WRITE setFixedSlotCount NOTIFY
11 fixedSlotCountChanged FINAL)
12 Q_PROPERTY(qreal minimumCellExtent READ minimumCellExtent WRITE setMinimumCellExtent NOTIFY
13 minimumCellExtentChanged FINAL)
14 Q_PROPERTY(qreal estimatedItemExtent READ estimatedItemExtent WRITE setEstimatedItemExtent
15 NOTIFY estimatedItemExtentChanged FINAL)
16 Q_PROPERTY(
17 qreal mainSpacing READ mainSpacing WRITE setMainSpacing NOTIFY mainSpacingChanged FINAL)
18 Q_PROPERTY(
19 qreal crossSpacing READ crossSpacing WRITE setCrossSpacing NOTIFY crossSpacingChanged FINAL)
20 Q_PROPERTY(int slotCount READ slotCount NOTIFY layoutChanged FINAL)
21 Q_PROPERTY(qreal cellCrossExtent READ cellCrossExtent NOTIFY layoutChanged FINAL)
22 Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection
23 NOTIFY layoutDirectionChanged FINAL)
24public:
25 explicit LazyMasonryGrid(QQuickItem* parent = nullptr);
26 int fixedSlotCount() const;
27 void setFixedSlotCount(int);
28 qreal minimumCellExtent() const;
29 void setMinimumCellExtent(qreal);
30 qreal estimatedItemExtent() const;
31 void setEstimatedItemExtent(qreal);
32 qreal mainSpacing() const;
33 void setMainSpacing(qreal);
34 qreal crossSpacing() const;
35 void setCrossSpacing(qreal);
36 int slotCount() const;
37 qreal cellCrossExtent() const;
38 Qt::LayoutDirection layoutDirection() const;
39 void setLayoutDirection(Qt::LayoutDirection);
40 Q_SIGNAL void fixedSlotCountChanged();
41 Q_SIGNAL void minimumCellExtentChanged();
42 Q_SIGNAL void estimatedItemExtentChanged();
43 Q_SIGNAL void mainSpacingChanged();
44 Q_SIGNAL void crossSpacingChanged();
45 Q_SIGNAL void layoutDirectionChanged();
46};
47} // namespace qml_material