3#include <QtQml/QQmlEngine>
7class PageContext :
public QObject {
10 Q_PROPERTY(PageContext* inherit READ inherit WRITE setInherit NOTIFY inheritChanged FINAL)
11 Q_PROPERTY(QObject* leadingAction READ leadingAction WRITE setLeadingAction NOTIFY
12 leadingActionChanged FINAL)
13 Q_PROPERTY(qint32 headerType READ headerType WRITE setHeaderType NOTIFY headerTypeChanged FINAL)
14 Q_PROPERTY(qint32 backgroundRadius READ backgroundRadius WRITE setBackgroundRadius NOTIFY
15 backgroundRadiusChanged FINAL)
16 Q_PROPERTY(
double headerBackgroundOpacity READ headerBackgroundOpacity WRITE
17 setHeaderBackgroundOpacity NOTIFY headerBackgroundOpacityChanged FINAL)
18 Q_PROPERTY(qint32 radius READ radius WRITE setRadius NOTIFY radiusChanged FINAL)
19 Q_PROPERTY(
bool showHeader READ showHeader WRITE setShowHeader NOTIFY showHeaderChanged FINAL)
20 Q_PROPERTY(
bool showBackground READ showBackground WRITE setShowBackground NOTIFY
21 showBackgroundChanged FINAL)
23 qint32 leftMargin READ leftMargin WRITE setLeftMargin NOTIFY leftMarginChanged FINAL)
25 qint32 rightMargin READ rightMargin WRITE setRightMargin NOTIFY rightMarginChanged FINAL)
26 Q_PROPERTY(qint32 topMargin READ topMargin WRITE setTopMargin NOTIFY topMarginChanged FINAL)
27 Q_PROPERTY(qint32 bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY
28 bottomMarginChanged FINAL)
30 PageContext(QObject* parent =
nullptr);
33 auto inherit() const -> PageContext*;
34 auto leadingAction() const -> QObject*;
35 auto backgroundRadius() const -> qint32;
36 auto headerBackgroundOpacity() const ->
double;
37 auto radius() const -> qint32;
38 auto headerType() const -> qint32;
39 auto showHeader() const ->
bool;
40 auto showBackground() const ->
bool;
41 auto leftMargin() const -> qint32;
42 auto rightMargin() const -> qint32;
43 auto topMargin() const -> qint32;
44 auto bottomMargin() const -> qint32;
46 Q_SLOT
void setInherit(PageContext*);
47 Q_SLOT
void setLeadingAction(QObject*);
48 Q_SLOT
void setBackgroundRadius(qint32);
49 Q_SLOT
void setHeaderBackgroundOpacity(
double);
50 Q_SLOT
void setRadius(qint32);
51 Q_SLOT
void setHeaderType(qint32);
52 Q_SLOT
void setShowHeader(
bool);
53 Q_SLOT
void setShowBackground(
bool);
54 Q_SLOT
void setLeftMargin(qint32);
55 Q_SLOT
void setRightMargin(qint32);
56 Q_SLOT
void setTopMargin(qint32);
57 Q_SLOT
void setBottomMargin(qint32);
59 Q_SIGNAL
void inheritChanged();
60 Q_SIGNAL
void leadingActionChanged();
61 Q_SIGNAL
void backgroundRadiusChanged();
62 Q_SIGNAL
void headerBackgroundOpacityChanged();
63 Q_SIGNAL
void radiusChanged();
64 Q_SIGNAL
void headerTypeChanged();
65 Q_SIGNAL
void showHeaderChanged();
66 Q_SIGNAL
void showBackgroundChanged();
67 Q_SIGNAL
void leftMarginChanged();
68 Q_SIGNAL
void rightMarginChanged();
69 Q_SIGNAL
void topMarginChanged();
70 Q_SIGNAL
void bottomMarginChanged();
72 Q_SIGNAL
void pushItem(const QJSValue& url_or_comp, const QVariantMap& props = {});
76 PageContext* m_inherit;
78 std::optional<QObject*> m_leading_action;
79 std::optional<qint32> m_header_type;
80 std::optional<qint32> m_background_radius;
81 std::optional<double> m_header_background_opacity;
82 std::optional<qint32> m_radius;
83 std::optional<bool> m_show_header;
84 std::optional<bool> m_show_background;
85 std::optional<qint32> m_left_margin;
86 std::optional<qint32> m_right_margin;
87 std::optional<qint32> m_top_margin;
88 std::optional<qint32> m_bottom_margin;