1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | // |
5 | // W A R N I N G |
6 | // ------------- |
7 | // |
8 | // This file is not part of the Qt API. It exists for the convenience |
9 | // of Qt Designer. This header file may change from version to version |
10 | // without notice, or even be removed. |
11 | // |
12 | // We mean it. |
13 | // |
14 | |
15 | #ifndef QTGRADIENTDIALOG_H |
16 | #define QTGRADIENTDIALOG_H |
17 | |
18 | #include <QtWidgets/QDialog> |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | class QtGradientDialog : public QDialog |
23 | { |
24 | Q_OBJECT |
25 | Q_PROPERTY(QGradient gradient READ gradient WRITE setGradient) |
26 | Q_PROPERTY(bool backgroundCheckered READ isBackgroundCheckered WRITE setBackgroundCheckered) |
27 | Q_PROPERTY(bool detailsVisible READ detailsVisible WRITE setDetailsVisible) |
28 | Q_PROPERTY(bool detailsButtonVisible READ isDetailsButtonVisible WRITE setDetailsButtonVisible) |
29 | public: |
30 | QtGradientDialog(QWidget *parent = 0); |
31 | ~QtGradientDialog(); |
32 | |
33 | void setGradient(const QGradient &gradient); |
34 | QGradient gradient() const; |
35 | |
36 | bool isBackgroundCheckered() const; |
37 | void setBackgroundCheckered(bool checkered); |
38 | |
39 | bool detailsVisible() const; |
40 | void setDetailsVisible(bool visible); |
41 | |
42 | bool isDetailsButtonVisible() const; |
43 | void setDetailsButtonVisible(bool visible); |
44 | |
45 | QColor::Spec spec() const; |
46 | void setSpec(QColor::Spec spec); |
47 | |
48 | static QGradient getGradient(bool *ok, const QGradient &initial, QWidget *parent = 0, const QString &caption = QString()); |
49 | static QGradient getGradient(bool *ok, QWidget *parent = 0, const QString &caption = QString()); |
50 | |
51 | private: |
52 | QScopedPointer<class QtGradientDialogPrivate> d_ptr; |
53 | Q_DECLARE_PRIVATE(QtGradientDialog) |
54 | Q_DISABLE_COPY_MOVE(QtGradientDialog) |
55 | }; |
56 | |
57 | QT_END_NAMESPACE |
58 | |
59 | #endif |
60 |