| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | // W A R N I N G |
| 5 | // ------------- |
| 6 | // |
| 7 | // This file is not part of the Qt Chart API. It exists purely as an |
| 8 | // implementation detail. This header file may change from version to |
| 9 | // version without notice, or even be removed. |
| 10 | // |
| 11 | // We mean it. |
| 12 | |
| 13 | #ifndef DECLARATIVE_MARGINS_H |
| 14 | #define DECLARATIVE_MARGINS_H |
| 15 | |
| 16 | #include <QtQml/qqmlregistration.h> |
| 17 | #include <QtCharts/QChartGlobal> |
| 18 | #include <QtCore/QObject> |
| 19 | #include <QtCore/QMargins> |
| 20 | #include <private/declarativechartglobal_p.h> |
| 21 | |
| 22 | QT_BEGIN_NAMESPACE |
| 23 | |
| 24 | class Q_CHARTSQML_EXPORT DeclarativeMargins : public QObject, public QMargins |
| 25 | { |
| 26 | Q_OBJECT |
| 27 | Q_PROPERTY(int top READ top WRITE setTop NOTIFY topChanged) |
| 28 | Q_PROPERTY(int bottom READ bottom WRITE setBottom NOTIFY bottomChanged) |
| 29 | Q_PROPERTY(int left READ left WRITE setLeft NOTIFY leftChanged) |
| 30 | Q_PROPERTY(int right READ right WRITE setRight NOTIFY rightChanged) |
| 31 | QML_NAMED_ELEMENT(Margins) |
| 32 | QML_ADDED_IN_VERSION(1, 1) |
| 33 | QML_EXTRA_VERSION(2, 0) |
| 34 | QML_UNCREATABLE("Abstract base type" ) |
| 35 | |
| 36 | public: |
| 37 | explicit DeclarativeMargins(QObject *parent = 0); |
| 38 | void setTop(int top); |
| 39 | void setBottom(int bottom); |
| 40 | void setLeft(int left); |
| 41 | void setRight(int right); |
| 42 | |
| 43 | Q_SIGNALS: |
| 44 | void topChanged(int top, int bottom, int left, int right); |
| 45 | void bottomChanged(int top, int bottom, int left, int right); |
| 46 | void leftChanged(int top, int bottom, int left, int right); |
| 47 | void rightChanged(int top, int bottom, int left, int right); |
| 48 | }; |
| 49 | |
| 50 | QT_END_NAMESPACE |
| 51 | |
| 52 | #endif // DECLARATIVE_MARGINS_H |
| 53 | |