Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtgradientdialog_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of Qt Designer. This header file may change from version to version
11// without notice, or even be removed.
12//
13// We mean it.
14//
15
16#ifndef QTGRADIENTDIALOG_H
17#define QTGRADIENTDIALOG_H
18
19#include <QtWidgets/qdialog.h>
20
21QT_BEGIN_NAMESPACE
22
23class QtGradientDialog : public QDialog
24{
25 Q_OBJECT
26 Q_PROPERTY(QGradient gradient READ gradient WRITE setGradient)
27 Q_PROPERTY(bool backgroundCheckered READ isBackgroundCheckered WRITE setBackgroundCheckered)
28 Q_PROPERTY(bool detailsVisible READ detailsVisible WRITE setDetailsVisible)
29 Q_PROPERTY(bool detailsButtonVisible READ isDetailsButtonVisible WRITE setDetailsButtonVisible)
30public:
31 explicit QtGradientDialog(QWidget *parent = nullptr);
32 ~QtGradientDialog() override;
33
34 void setGradient(const QGradient &gradient);
35 QGradient gradient() const;
36
37 bool isBackgroundCheckered() const;
38 void setBackgroundCheckered(bool checkered);
39
40 bool detailsVisible() const;
41 void setDetailsVisible(bool visible);
42
43 bool isDetailsButtonVisible() const;
44 void setDetailsButtonVisible(bool visible);
45
46 QColor::Spec spec() const;
47 void setSpec(QColor::Spec spec);
48
49 static QGradient getGradient(bool *ok, const QGradient &initial, QWidget *parent = nullptr,
50 const QString &caption = QString());
51 static QGradient getGradient(bool *ok, QWidget *parent = nullptr,
52 const QString &caption = QString());
53
54private:
55 QScopedPointer<class QtGradientDialogPrivate> d_ptr;
56 Q_DECLARE_PRIVATE(QtGradientDialog)
57 Q_DISABLE_COPY_MOVE(QtGradientDialog)
58};
59
61
62#endif
Ui::QtGradientDialog m_ui
Combined button and popup list for selecting options.