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 | #ifndef GRADIENTVIEWDIALOG_H |
5 | #define GRADIENTVIEWDIALOG_H |
6 | |
7 | #include <QtWidgets/QWidget> |
8 | #include <QtCore/QMap> |
9 | #include "ui_qtgradientviewdialog.h" |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | class QtGradientManager; |
14 | |
15 | class QtGradientViewDialog : public QDialog |
16 | { |
17 | Q_OBJECT |
18 | public: |
19 | QtGradientViewDialog(QWidget *parent = 0); |
20 | |
21 | void setGradientManager(QtGradientManager *manager); |
22 | QtGradientManager *gradientManager() const; |
23 | |
24 | static QGradient getGradient(bool *ok, QtGradientManager *manager, QWidget *parent = 0, const QString &caption = tr(s: "Select Gradient" , c: 0)); |
25 | |
26 | private slots: |
27 | void slotGradientSelected(const QString &id); |
28 | void slotGradientActivated(const QString &id); |
29 | |
30 | private: |
31 | Ui::QtGradientViewDialog m_ui; |
32 | }; |
33 | |
34 | QT_END_NAMESPACE |
35 | |
36 | #endif |
37 | |
38 | |