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