Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickfusionstyle_p.h
Go to the documentation of this file.
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 <QtQuickControls2Fusion/qtquickcontrols2fusionexports.h>
22
24
25class QQuickPalette;
26
27class Q_QUICKCONTROLS2FUSION_EXPORT QQuickFusionStyle : public QObject
28{
30 Q_PROPERTY(QColor lightShade READ lightShade CONSTANT FINAL)
31 Q_PROPERTY(QColor darkShade READ darkShade CONSTANT FINAL)
32 Q_PROPERTY(QColor topShadow READ topShadow CONSTANT FINAL)
33 Q_PROPERTY(QColor innerContrastLine READ innerContrastLine CONSTANT FINAL)
34 QML_NAMED_ELEMENT(Fusion)
37
38public:
39 explicit QQuickFusionStyle(QObject *parent = nullptr);
40
41 static QColor lightShade();
42 static QColor darkShade();
43 static QColor topShadow();
44 static QColor innerContrastLine();
45
46 Q_INVOKABLE static QColor highlight(QQuickPalette *palette);
47 Q_INVOKABLE static QColor highlightedText(QQuickPalette *palette);
48 Q_INVOKABLE static QColor outline(QQuickPalette *palette);
49 Q_INVOKABLE static QColor highlightedOutline(QQuickPalette *palette);
50 Q_INVOKABLE static QColor tabFrameColor(QQuickPalette *palette);
51 Q_INVOKABLE static QColor buttonColor(QQuickPalette *palette, bool highlighted = false, bool down = false, bool hovered = false);
52 Q_INVOKABLE static QColor buttonOutline(QQuickPalette *palette, bool highlighted = false, bool enabled = true);
53 Q_INVOKABLE static QColor gradientStart(const QColor &baseColor);
54 Q_INVOKABLE static QColor gradientStop(const QColor &baseColor);
55 Q_INVOKABLE static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50);
56 Q_INVOKABLE static QColor grooveColor(QQuickPalette *palette);
57};
58
60
61#endif // QQUICKFUSIONSTYLE_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore
Definition qobject.h:103
Contains color groups for each QML item state. \inmodule QtQuick.
Combined button and popup list for selecting options.
GLenum GLenum GLsizei const GLuint GLboolean enabled
#define QML_NAMED_ELEMENT(NAME)
#define QML_SINGLETON
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define explicit