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
21QT_BEGIN_NAMESPACE
22
23class QtGradientManager;
24
25class QtGradientUtils
26{
27public:
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
37QT_END_NAMESPACE
38
39#endif
40

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

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