10#include <QQmlApplicationEngine>
11#include <QQuickWindow>
12#include <QScopedPointer>
13#if defined (Q_OS_MACOS)
18Q_FORWARD_DECLARE_OBJC_CLASS(FontChangeTracker);
22class test_UiPluginQml;
32 Q_PLUGIN_METADATA(IID
"governikus.UiPlugin" FILE
"metadata.json")
33 Q_INTERFACES(governikus::UiPlugin)
37 QScopedPointer<QQmlApplicationEngine> mEngine;
39 QScopedPointer<QMenuBar> mMenuBar;
41 qsizetype mQmlEngineWarningCount;
44 bool mHighContrastEnabled;
46 bool mShowFocusIndicator;
48 qreal mFontScaleFactor;
51 [[nodiscard]]
static QString getOverridePlatform();
52 [[nodiscard]] QQuickWindow* getRootWindow()
const;
53 [[nodiscard]]
bool isHidden()
const;
54 [[nodiscard]] qreal getSystemFontScaleFactor()
const;
55 void setFontScaleFactor(qreal pFactor);
56 void setOsDarkMode(
bool pState);
63 FontChangeTracker*
const mFontChangeTracker;
65 const QScopedPointer<Private> mPrivate;
69 [[nodiscard]]
bool eventFilter(QObject* pObj, QEvent* pEvent)
override;
96 [[nodiscard]]
bool isChromeOS()
const override;
107 void doShutdown()
override;
108 void onWorkflowStarted(
const QSharedPointer<WorkflowRequest>& pRequest)
override;
109 void onWorkflowFinished(
const QSharedPointer<WorkflowRequest>& pRequest)
override;
110 void onApplicationInitialized()
override;
111 void onApplicationStarted()
override;
112 void onShowUi(UiModule pModule)
override;
113 void onHideUi()
override;
114 void onTranslationChanged()
override;
115 void onProxyAuthenticationRequired(
const QNetworkProxy& pProxy, QAuthenticator* pAuthenticator)
override;
116 void onUiDomination(
const UiPlugin* pUi,
const QString& pInformation,
bool pAccepted)
override;
117 void onUiDominationReleased()
override;
118 void onShowUserInformation(
const QString& pMessage)
override;
119 void onUpdateScheduled()
const;
121 void onQmlWarnings(
const QList<QQmlError>& pWarnings);
122 void onQmlObjectCreated(
const QObject* pObject);
123 void onSceneGraphError(QQuickWindow::SceneGraphError pError,
const QString& pMessage);
125 void onRawLog(
const QString& pMessage,
const QString& pCategoryName);
127 void onWindowPaletteChanged();
128 void onUserDarkModeChanged()
const;
129 void onUseSystemFontChanged()
const;
130 void onTrayIconEnabledChanged();
131 void onAppConfigChanged();
Definition UiPluginModel.h:21
Definition UiPluginQml.h:30
Q_INVOKABLE void hideFromTaskbar() const override
Definition UiPluginQml.cpp:228
bool isChromeOS() const override
Definition UiPluginQml.cpp:875
bool isDarkModeEnabled() const override
Definition UiPluginQml.cpp:809
bool isDeveloperVersion() const override
Definition UiPluginQml.cpp:690
bool getShowFocusIndicator() const override
Definition UiPluginQml.cpp:845
bool eventFilter(QObject *pObj, QEvent *pEvent) override
Definition UiPluginQml.cpp:540
static QString adjustQmlImportPath(QQmlEngine *pEngine)
Definition UiPluginQml.cpp:235
static void registerQmlTypes()
Definition UiPluginQml.cpp:136
bool isHighContrastEnabled() const override
Definition UiPluginQml.cpp:761
QString getDominator() const override
Definition UiPluginQml.cpp:696
bool isOsDarkModeEnabled() const
Definition UiPluginQml.cpp:777
void fireAppConfigChanged()
QVariantMap getSafeAreaMargins() const override
Definition UiPluginQml.cpp:709
~UiPluginQml() override=default
bool isOsDarkModeSupported() const override
Definition UiPluginQml.cpp:797
bool isDominated() const override
Definition UiPluginQml.cpp:702
qreal getScaleFactor() const override
Definition UiPluginQml.cpp:851
void setScaleFactor(qreal pScaleFactor) override
Definition UiPluginQml.cpp:858
QString getFixedFontFamily() const override
Definition UiPluginQml.cpp:828
QString getQtVersion() const override
Definition UiPluginQml.cpp:672
qreal getFontScaleFactor() const override
Definition UiPluginQml.cpp:869
QSize getInitialWindowSize() const override
Definition UiPluginQml.cpp:834
bool isDebugBuild() const override
Definition UiPluginQml.cpp:678
Q_INVOKABLE void doRefresh() override
Definition UiPluginQml.cpp:660
friend class ::test_UiPluginQml
Definition UiPluginQml.h:34
void fireTranslationChanged()
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17