// Copyright (C) 2012 BogDan Vatra // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QANDROIDPLATFORMTHEME_H #define QANDROIDPLATFORMTHEME_H #include #include #include #include #include #include #include QT_BEGIN_NAMESPACE struct AndroidStyle { static QJsonObject loadStyleData(); QJsonObject m_styleData; QPalette m_standardPalette; QHash m_palettes; QHash m_fonts; QHash m_QWidgetsFonts; }; class QAndroidPlatformNativeInterface; class QAndroidPlatformTheme: public QPlatformTheme { public: QAndroidPlatformTheme(QAndroidPlatformNativeInterface * androidPlatformNativeInterface); QPlatformMenuBar *createPlatformMenuBar() const override; QPlatformMenu *createPlatformMenu() const override; QPlatformMenuItem *createPlatformMenuItem() const override; void showPlatformMenuBar() override; const QPalette *palette(Palette type = SystemPalette) const override; const QFont *font(Font type = SystemFont) const override; QVariant themeHint(ThemeHint hint) const override; QString standardButtonText(int button) const override; bool usePlatformNativeDialog(DialogType type) const override; QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const override; private: std::shared_ptr m_androidStyleData; QPalette m_defaultPalette; QFont m_systemFont; }; QT_END_NAMESPACE #endif // QANDROIDPLATFORMTHEME_H