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 GRADIENTUTILS_H
5#define GRADIENTUTILS_H
6
7#include <QtGui/QGradient>
8#include <QtGui/QPainter>
9
10QT_BEGIN_NAMESPACE
11
12class QtGradientManager;
13
14class QtGradientUtils
15{
16public:
17 static QString styleSheetCode(const QGradient &gradient);
18 // utils methods, they could be outside of this class
19 static QString saveState(const QtGradientManager *manager);
20 static void restoreState(QtGradientManager *manager, const QString &state);
21
22 static QPixmap gradientPixmap(const QGradient &gradient, const QSize &size = QSize(64, 64), bool checkeredBackground = false);
23};
24
25QT_END_NAMESPACE
26
27#endif
28

source code of qttools/src/shared/qtgradienteditor/qtgradientutils.h