16#include <QQmlApplicationEngine>
17#include <QQuickWindow>
18#include <QScopedPointer>
19#if defined (Q_OS_MACOS)
24Q_FORWARD_DECLARE_OBJC_CLASS(FontChangeTracker);
28class test_UIPlugInQml;
38 Q_PLUGIN_METADATA(IID
"governikus.UIPlugIn" FILE
"metadata.json")
39 Q_INTERFACES(governikus::UIPlugIn)
57 QScopedPointer<QQmlApplicationEngine> mEngine;
58 qsizetype mQmlEngineWarningCount;
59 QString mExplicitPlatformStyle;
60 bool mUpdateInformationPending;
63 bool mHighContrastEnabled;
65#if defined(Q_OS_MACOS)
68 bool mShowFocusIndicator;
69 constexpr static qreal DEFAULT_SCALE_FACTOR = 0.6;
71 qreal mFontScaleFactor;
73 [[nodiscard]] QString getPlatformSelectors()
const;
74 [[nodiscard]]
static QUrl getPath(
const QString& pRelativePath,
bool pQrc =
true);
75 [[nodiscard]] QQuickWindow* getRootWindow()
const;
76 [[nodiscard]]
bool isHidden()
const;
77 [[nodiscard]]
bool isTablet()
const;
78 [[nodiscard]]
bool showUpdateInformationIfPending();
79 [[nodiscard]] qreal getSystemFontScaleFactor()
const;
80 void setFontScaleFactor(qreal pFactor);
81 void setOsDarkMode(
bool pState);
88 FontChangeTracker*
const mFontChangeTracker;
90 const QScopedPointer<Private> mPrivate;
94 [[nodiscard]]
bool eventFilter(QObject* pObj, QEvent* pEvent)
override;
120 Q_INVOKABLE
void init();
139 void doShutdown()
override;
140 void onWorkflowStarted(
const QSharedPointer<WorkflowRequest>& pRequest)
override;
141 void onWorkflowFinished(
const QSharedPointer<WorkflowRequest>& pRequest)
override;
142 void onApplicationInitialized()
override;
143 void onApplicationStarted()
override;
144 void onShowUi(UiModule pModule)
override;
145 void onHideUi()
override;
146 void onTranslationChanged()
override;
147 void onProxyAuthenticationRequired(
const QNetworkProxy& pProxy, QAuthenticator* pAuthenticator)
override;
148 void onUiDomination(
const UIPlugIn* pUi,
const QString& pInformation,
bool pAccepted)
override;
149 void onUiDominationReleased()
override;
150 void onShowUserInformation(
const QString& pMessage)
override;
151 void onUpdateScheduled()
const;
152 void onUpdateAvailable(
bool pUpdateAvailable,
const GlobalStatus& pStatus);
154 void onQmlWarnings(
const QList<QQmlError>& pWarnings);
155 void onQmlObjectCreated(QObject* pObject);
156 void onSceneGraphError(QQuickWindow::SceneGraphError pError,
const QString& pMessage);
158 void onRawLog(
const QString& pMessage,
const QString& pCategoryName);
160 void onWindowPaletteChanged();
161 void onUseSystemFontChanged()
const;
162 void onAutoStartChanged();
163 void onAppConfigChanged();
Definition GlobalStatus.h:22
Definition ProxyCredentials.h:17
Definition UIPlugInQml.h:36
~UIPlugInQml() override=default
void fireShowRequest(UiModule pModule)
QString getPlatformStyle() const
Definition UIPlugInQml.cpp:790
void fireShowFocusIndicator()
bool isDeveloperVersion() const
Definition UIPlugInQml.cpp:808
bool eventFilter(QObject *pObj, QEvent *pEvent) override
Definition UIPlugInQml.cpp:624
QString dominator
Definition UIPlugInQml.h:43
bool isOsDarkModeEnabled() const
Definition UIPlugInQml.cpp:895
QVariantMap safeAreaMargins
Definition UIPlugInQml.h:45
Q_INVOKABLE void hideFromTaskbar() const
Definition UIPlugInQml.cpp:304
qreal getScaleFactor() const
Definition UIPlugInQml.cpp:944
void fireSafeAreaMarginsChanged()
bool highContrastEnabled
Definition UIPlugInQml.h:46
bool isHighContrastEnabled() const
Definition UIPlugInQml.cpp:879
QString getDominator() const
Definition UIPlugInQml.cpp:814
static void registerQmlTypes()
Definition UIPlugInQml.cpp:204
bool isDominated() const
Definition UIPlugInQml.cpp:820
bool debugBuild
Definition UIPlugInQml.h:41
void fireTranslationChanged()
qreal scaleFactor
Definition UIPlugInQml.h:52
void setScaleFactor(qreal pScaleFactor)
Definition UIPlugInQml.cpp:951
bool showFocusIndicator
Definition UIPlugInQml.h:51
void fireOsDarkModeChanged()
bool dominated
Definition UIPlugInQml.h:44
QVariantMap getSafeAreaMargins() const
Definition UIPlugInQml.cpp:827
qreal getFontScaleFactor() const
Definition UIPlugInQml.cpp:964
void fireScaleFactorChanged()
QString getFixedFontFamily() const
Definition UIPlugInQml.cpp:924
void fireDominatorChanged()
bool osDarkModeEnabled
Definition UIPlugInQml.h:47
void fireProxyAuthenticationRequired(ProxyCredentials *pProxyCredentials)
Q_INVOKABLE void init()
Definition UIPlugInQml.cpp:249
QSize initialWindowSize
Definition UIPlugInQml.h:50
QString fixedFontFamily
Definition UIPlugInQml.h:49
void fireHighContrastEnabledChanged()
friend class ::test_UIPlugInQml
Definition UIPlugInQml.h:54
bool developerVersion
Definition UIPlugInQml.h:42
void fireFontScaleFactorChanged()
UIPlugInQml()
Definition UIPlugInQml.cpp:161
bool getShowFocusIndicator() const
Definition UIPlugInQml.cpp:938
QString platformStyle
Definition UIPlugInQml.h:40
qreal fontScaleFactor
Definition UIPlugInQml.h:53
Q_INVOKABLE void applyPlatformStyle(const QString &pPlatformStyle)
Definition UIPlugInQml.cpp:1038
void doRefresh()
Definition UIPlugInQml.cpp:783
bool isOsDarkModeSupported() const
Definition UIPlugInQml.cpp:912
bool osDarkModeSupported
Definition UIPlugInQml.h:48
void fireAppConfigChanged()
QSize getInitialWindowSize() const
Definition UIPlugInQml.cpp:930
bool isDebugBuild() const
Definition UIPlugInQml.cpp:796
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:16