aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/fusion/qquickfusionstyle_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/fusion/qquickfusionstyle_p.h')
-rw-r--r--src/quickcontrols/fusion/qquickfusionstyle_p.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/quickcontrols/fusion/qquickfusionstyle_p.h b/src/quickcontrols/fusion/qquickfusionstyle_p.h
new file mode 100644
index 0000000000..47fdd77fd7
--- /dev/null
+++ b/src/quickcontrols/fusion/qquickfusionstyle_p.h
@@ -0,0 +1,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