AusweisApp2
Lade ...
Suche ...
Keine Treffer
UIPlugInQml.h
gehe zur Dokumentation dieser Datei
7#pragma once
8
9#include "GlobalStatus.h"
10#include "HistoryModel.h"
11#include "NumberModel.h"
12#include "ProxyCredentials.h"
13#include "SettingsModel.h"
14#include "TrayIcon.h"
15#include "UIPlugIn.h"
16
17#include <QQmlApplicationEngine>
18#include <QQuickWindow>
19#include <QScopedPointer>
20#if defined (Q_OS_MACOS)
21#include <QMenuBar>
22#endif
23
24namespace governikus
25{
26
28 : public UIPlugIn
29{
30 Q_OBJECT
31 Q_PLUGIN_METADATA(IID "governikus.UIPlugIn" FILE "metadata.json")
32 Q_INTERFACES(governikus::UIPlugIn)
33 Q_PROPERTY(QString platformStyle READ getPlatformStyle CONSTANT FINAL)
34 Q_PROPERTY(bool debugBuild READ isDebugBuild CONSTANT)
35 Q_PROPERTY(bool developerVersion READ isDeveloperVersion CONSTANT)
36 Q_PROPERTY(QString dominator READ getDominator NOTIFY fireDominatorChanged)
37 Q_PROPERTY(bool dominated READ isDominated NOTIFY fireDominatorChanged)
38 Q_PROPERTY(QVariantMap safeAreaMargins READ getSafeAreaMargins NOTIFY fireSafeAreaMarginsChanged)
40 Q_PROPERTY(QString fixedFontFamily READ getFixedFontFamily CONSTANT)
41 Q_PROPERTY(bool tablet READ isTablet CONSTANT)
42
43 private:
44 QScopedPointer<QQmlApplicationEngine> mEngine;
45 int mQmlEngineWarningCount;
46 QString mExplicitPlatformStyle;
47 bool mUpdateInformationPending;
48 TrayIcon mTrayIcon;
49 QString mDominator;
50 bool mHighContrastEnabled;
51#if defined(Q_OS_MACOS)
52 QMenuBar mMenuBar;
53#endif
54
55 QString getPlatformSelectors() const;
56 static QUrl getPath(const QString& pRelativePath, bool pQrc = true);
57 QQuickWindow* getRootWindow() const;
58 bool isHidden() const;
59 bool isTablet() const;
60 bool isTabletLayout() const;
61 bool showUpdateInformationIfPending();
62
63 public:
65 ~UIPlugInQml() override = default;
66
67 static void registerQmlTypes();
68
69 QString getPlatformStyle() const;
70 bool isDebugBuild() const;
71 bool isDeveloperVersion() const;
72 QString getDominator() const;
73 bool isDominated() const;
74 QVariantMap getSafeAreaMargins() const;
75 bool isHighContrastEnabled() const;
76 QString getFixedFontFamily() const;
77
78 Q_INVOKABLE void applyPlatformStyle(const QString& pPlatformStyle);
79 Q_INVOKABLE void init();
80 Q_INVOKABLE void hideFromTaskbar();
81
82 Q_SIGNALS:
83 void fireShowRequest(UiModule pModule);
89
90 private Q_SLOTS:
91 void show();
92 void doShutdown() override;
93 void onWorkflowStarted(QSharedPointer<WorkflowContext> pContext) override;
94 void onWorkflowFinished(QSharedPointer<WorkflowContext> pContext) override;
95 void onApplicationInitialized() override;
96 void onApplicationStarted() override;
97 void onShowUi(UiModule pModule) override;
98 void onHideUi() override;
99 void onTranslationChanged() override;
100 void onProxyAuthenticationRequired(const QNetworkProxy& pProxy, QAuthenticator* pAuthenticator) override;
101 void onUiDomination(const UIPlugIn* pUi, const QString& pInformation, bool pAccepted) override;
102 void onUiDominationReleased() override;
103 void onShowUserInformation(const QString& pMessage);
104 void onUpdateScheduled();
105 void onUpdateAvailable(bool pUpdateAvailable, const GlobalStatus& pStatus);
106
107 void onQmlWarnings(const QList<QQmlError>& pWarnings);
108 void onQmlObjectCreated(QObject* pObject);
109 void onSceneGraphError(QQuickWindow::SceneGraphError pError, const QString& pMessage);
110
111 void onRawLog(const QString& pMessage, const QString& pCategoryName);
112
113 void onWindowPaletteChanged();
114
115 public Q_SLOTS:
116 void doRefresh();
117};
118
119} // namespace governikus
Definition: GlobalStatus.h:20
Definition: ProxyCredentials.h:17
Definition: TrayIcon.h:21
Definition: UIPlugInQml.h:29
~UIPlugInQml() override=default
void fireShowRequest(UiModule pModule)
QString getPlatformStyle() const
Definition: UIPlugInQml.cpp:702
Q_INVOKABLE void hideFromTaskbar()
Definition: UIPlugInQml.cpp:296
bool isDeveloperVersion() const
Definition: UIPlugInQml.cpp:720
QString dominator
Definition: UIPlugInQml.h:36
QVariantMap safeAreaMargins
Definition: UIPlugInQml.h:38
bool highContrastEnabled
Definition: UIPlugInQml.h:39
bool isHighContrastEnabled() const
Definition: UIPlugInQml.cpp:790
QString getDominator() const
Definition: UIPlugInQml.cpp:726
static void registerQmlTypes()
Definition: UIPlugInQml.cpp:190
bool isDominated() const
Definition: UIPlugInQml.cpp:732
bool debugBuild
Definition: UIPlugInQml.h:34
bool tablet
Definition: UIPlugInQml.h:41
bool dominated
Definition: UIPlugInQml.h:37
QVariantMap getSafeAreaMargins() const
Definition: UIPlugInQml.cpp:739
QString getFixedFontFamily() const
Definition: UIPlugInQml.cpp:807
void fireProxyAuthenticationRequired(ProxyCredentials *pProxyCredentials)
Q_INVOKABLE void init()
Definition: UIPlugInQml.cpp:229
QString fixedFontFamily
Definition: UIPlugInQml.h:40
void fireHighContrastEnabledChanged()
bool developerVersion
Definition: UIPlugInQml.h:35
UIPlugInQml()
Definition: UIPlugInQml.cpp:132
QString platformStyle
Definition: UIPlugInQml.h:33
Q_INVOKABLE void applyPlatformStyle(const QString &pPlatformStyle)
Definition: UIPlugInQml.cpp:824
void doRefresh()
Definition: UIPlugInQml.cpp:695
bool isDebugBuild() const
Definition: UIPlugInQml.cpp:708
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15