2017-07-03 09:30:10 +02:00
|
|
|
/*!
|
|
|
|
* \brief UIPlugIn implementation of QML.
|
|
|
|
*
|
2018-03-28 15:10:51 +02:00
|
|
|
* \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany
|
2017-07-03 09:30:10 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "view/UIPlugIn.h"
|
|
|
|
|
|
|
|
#include "ApplicationModel.h"
|
|
|
|
#include "AuthModel.h"
|
|
|
|
#include "CertificateDescriptionModel.h"
|
|
|
|
#include "ChangePinModel.h"
|
|
|
|
#include "ChatModel.h"
|
2017-07-03 09:33:28 +02:00
|
|
|
#include "ConnectivityManager.h"
|
2017-07-03 09:30:10 +02:00
|
|
|
#include "HistoryModel.h"
|
|
|
|
#include "NumberModel.h"
|
2017-07-03 09:33:28 +02:00
|
|
|
#include "ProviderCategoryFilterModel.h"
|
|
|
|
#include "QmlExtension.h"
|
2017-12-20 14:54:05 +01:00
|
|
|
#include "RemoteServiceModel.h"
|
2017-07-03 09:30:10 +02:00
|
|
|
#include "SelfAuthenticationModel.h"
|
|
|
|
#include "SettingsModel.h"
|
|
|
|
#include "StatusBarUtil.h"
|
|
|
|
#include "VersionInformationModel.h"
|
2017-12-20 14:54:05 +01:00
|
|
|
|
2017-07-03 09:30:10 +02:00
|
|
|
#include <QQmlApplicationEngine>
|
|
|
|
#include <QScopedPointer>
|
|
|
|
|
|
|
|
namespace governikus
|
|
|
|
{
|
|
|
|
|
|
|
|
class UIPlugInQml
|
|
|
|
: public UIPlugIn
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_PLUGIN_METADATA(IID "governikus.UIPlugIn" FILE "metadata.json")
|
|
|
|
Q_INTERFACES(governikus::UIPlugIn)
|
|
|
|
Q_PROPERTY(QString platformStyle READ getPlatformStyle CONSTANT)
|
|
|
|
Q_PROPERTY(bool developerBuild READ isDeveloperBuild CONSTANT)
|
|
|
|
|
|
|
|
private:
|
|
|
|
QScopedPointer<QQmlApplicationEngine> mEngine;
|
|
|
|
qreal mDpi;
|
2017-07-03 09:33:28 +02:00
|
|
|
ProviderCategoryFilterModel mProviderModel;
|
2017-07-03 09:30:10 +02:00
|
|
|
HistoryModel mHistoryModel;
|
|
|
|
ChangePinModel mChangePinModel;
|
|
|
|
AuthModel mAuthModel;
|
|
|
|
VersionInformationModel mVersionInformationModel;
|
2017-07-03 09:33:28 +02:00
|
|
|
QmlExtension mQmlExtension;
|
2017-07-03 09:30:10 +02:00
|
|
|
SelfAuthenticationModel mSelfAuthenticationModel;
|
|
|
|
SettingsModel mSettingsModel;
|
|
|
|
CertificateDescriptionModel mCertificateDescriptionModel;
|
|
|
|
ChatModel mChatModel;
|
|
|
|
NumberModel mNumberModel;
|
|
|
|
ApplicationModel mApplicationModel;
|
|
|
|
QString mExplicitPlatformStyle;
|
|
|
|
StatusBarUtil mStatusBarUtil;
|
2017-07-03 09:33:28 +02:00
|
|
|
ConnectivityManager mConnectivityManager;
|
2017-12-20 14:54:05 +01:00
|
|
|
RemoteServiceModel mRemoteServiceModel;
|
2017-07-03 09:30:10 +02:00
|
|
|
|
|
|
|
QString getPlatformSelectors() const;
|
2017-12-20 14:54:05 +01:00
|
|
|
static QUrl getPath(const QString& pRelativePath);
|
2017-07-03 09:30:10 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
UIPlugInQml();
|
2017-12-20 14:54:05 +01:00
|
|
|
virtual ~UIPlugInQml() override;
|
2017-07-03 09:30:10 +02:00
|
|
|
QString getPlatformStyle() const;
|
|
|
|
Q_INVOKABLE void applyPlatformStyle(const QString& pPlatformStyle);
|
|
|
|
Q_INVOKABLE bool isDeveloperBuild() const;
|
|
|
|
Q_INVOKABLE void init();
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
virtual void doShutdown() override;
|
|
|
|
virtual void onWorkflowStarted(QSharedPointer<WorkflowContext> pContext) override;
|
|
|
|
virtual void onWorkflowFinished(QSharedPointer<WorkflowContext> pContext) override;
|
2017-12-20 14:54:05 +01:00
|
|
|
void onShowUserInformation(const QString& pMessage);
|
2017-07-03 09:30:10 +02:00
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
void doRefresh();
|
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace governikus */
|