| 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 GRADIENTUTILS_H |
| 16 | #define GRADIENTUTILS_H |
| 17 | |
| 18 | #include <QtGui/QGradient> |
| 19 | #include <QtGui/QPainter> |
| 20 | |
| 21 | QT_BEGIN_NAMESPACE |
| 22 | |
| 23 | class QtGradientManager; |
| 24 | |
| 25 | class QtGradientUtils |
| 26 | { |
| 27 | public: |
| 28 | static QString styleSheetCode(const QGradient &gradient); |
| 29 | // utils methods, they could be outside of this class |
| 30 | static QString saveState(const QtGradientManager *manager); |
| 31 | static void restoreState(QtGradientManager *manager, const QString &state); |
| 32 | |
| 33 | static QPixmap gradientPixmap(const QGradient &gradient, QSize size = QSize(64, 64), |
| 34 | bool checkeredBackground = false); |
| 35 | }; |
| 36 | |
| 37 | QT_END_NAMESPACE |
| 38 | |
| 39 | #endif |
| 40 | |