1// Copyright (C) 2017 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 QQUICKFUSIONSTYLE_P_H
5#define QQUICKFUSIONSTYLE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qobject.h>
19#include <QtGui/qcolor.h>
20#include <QtQml/qqml.h>
21#include <QtQuick/private/qquickpalette_p.h>
22
23QT_BEGIN_NAMESPACE
24
25class QQuickFusionStyle : public QObject
26{
27 Q_OBJECT
28 Q_PROPERTY(QColor lightShade READ lightShade CONSTANT FINAL)
29 Q_PROPERTY(QColor darkShade READ darkShade CONSTANT FINAL)
30 Q_PROPERTY(QColor topShadow READ topShadow CONSTANT FINAL)
31 Q_PROPERTY(QColor innerContrastLine READ innerContrastLine CONSTANT FINAL)
32 QML_NAMED_ELEMENT(Fusion)
33 QML_SINGLETON
34 QML_ADDED_IN_VERSION(2, 3)
35
36public:
37 explicit QQuickFusionStyle(QObject *parent = nullptr);
38
39 static QColor lightShade();
40 static QColor darkShade();
41 static QColor topShadow();
42 static QColor innerContrastLine();
43
44 Q_INVOKABLE static QColor highlight(QQuickPalette *palette);
45 Q_INVOKABLE static QColor highlightedText(QQuickPalette *palette);
46 Q_INVOKABLE static QColor outline(QQuickPalette *palette);
47 Q_INVOKABLE static QColor highlightedOutline(QQuickPalette *palette);
48 Q_INVOKABLE static QColor tabFrameColor(QQuickPalette *palette);
49 Q_INVOKABLE static QColor buttonColor(QQuickPalette *palette, bool highlighted = false, bool down = false, bool hovered = false);
50 Q_INVOKABLE static QColor buttonOutline(QQuickPalette *palette, bool highlighted = false, bool enabled = true);
51 Q_INVOKABLE static QColor gradientStart(const QColor &baseColor);
52 Q_INVOKABLE static QColor gradientStop(const QColor &baseColor);
53 Q_INVOKABLE static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50);
54 Q_INVOKABLE static QColor grooveColor(QQuickPalette *palette);
55};
56
57QT_END_NAMESPACE
58
59#endif // QQUICKFUSIONSTYLE_P_H
60

source code of qtdeclarative/src/quickcontrols/fusion/qquickfusionstyle_p.h