| 1 | // Copyright (C) 2020 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 QQUICKNATIVESTYLE_H |
| 5 | #define QQUICKNATIVESTYLE_H |
| 6 | |
| 7 | #include "qquickstyle.h" |
| 8 | |
| 9 | QT_BEGIN_NAMESPACE |
| 10 | |
| 11 | namespace QQC2 { |
| 12 | |
| 13 | class QQuickNativeStyle |
| 14 | { |
| 15 | public: |
| 16 | static void setStyle(QStyle *style) |
| 17 | { |
| 18 | if (s_style) |
| 19 | delete s_style; |
| 20 | s_style = style; |
| 21 | } |
| 22 | |
| 23 | inline static QStyle *style() |
| 24 | { |
| 25 | return s_style; |
| 26 | } |
| 27 | |
| 28 | private: |
| 29 | static QStyle *s_style; |
| 30 | }; |
| 31 | |
| 32 | } // namespace QQC2 |
| 33 | |
| 34 | QT_END_NAMESPACE |
| 35 | |
| 36 | #endif // QQUICKNATIVESTYLE_H |
| 37 | |