AusweisApp2
Lade ...
Suche ...
Keine Treffer
ReleaseInformationModel.h
gehe zur Dokumentation dieser Datei
1
7#pragma once
8
9#include "Env.h"
10#include "FormattedTextModel.h"
11#include "GlobalStatus.h"
12#include "ReleaseInformation.h"
13
14#include <QObject>
15#include <QScopedPointer>
16#include <QSharedPointer>
17
18class test_ReleaseInformationModel;
19
20namespace governikus
21{
22
24 : public QObject
25{
26 Q_OBJECT
27 friend class Env;
28 friend class ::test_ReleaseInformationModel;
29
30 Q_PROPERTY(QSharedPointer<FormattedTextModel> currentRelease READ getCurrentRelease NOTIFY fireCurrentInformationChanged)
31 Q_PROPERTY(QSharedPointer<FormattedTextModel> updateRelease READ getUpdateRelease NOTIFY fireUpdateInformationChanged)
32 Q_PROPERTY(bool allowRetry READ allowRetry NOTIFY fireCurrentInformationChanged)
33
34 private:
35 QScopedPointer<ReleaseInformation> mReleaseInformationCurrent;
36 QScopedPointer<ReleaseInformation> mReleaseInformationUpdate;
37 QSharedPointer<FormattedTextModel> mFallbackModel;
38 QSharedPointer<FormattedTextModel> mModelCurrent;
39 QSharedPointer<FormattedTextModel> mModelUpdate;
40
42 QSharedPointer<FormattedTextModel> createModel(const ReleaseInformation& pInformation) const;
43
44 private Q_SLOTS:
45 void onLanguageChanged();
46 void onCurrentChanged();
47 void onUpdateChanged();
48 void onAppcastCheckFinished(bool pUpdateAvailable, const GlobalStatus& pStatus);
49
50 public:
51 ~ReleaseInformationModel() override = default;
52 QSharedPointer<FormattedTextModel> getCurrentRelease() const;
53 QSharedPointer<FormattedTextModel> getUpdateRelease() const;
54 Q_INVOKABLE void update();
55 bool requiresInitialUpdate() const;
56 void setUpdateVersion(const VersionNumber& pVersion);
57 bool allowRetry() const;
58
59 Q_SIGNALS:
62};
63
64} // namespace governikus
Definition: Env.h:44
Definition: GlobalStatus.h:20
Definition: ReleaseInformationModel.h:25
QSharedPointer< FormattedTextModel > updateRelease
Definition: ReleaseInformationModel.h:31
QSharedPointer< FormattedTextModel > getCurrentRelease() const
Definition: ReleaseInformationModel.cpp:109
bool requiresInitialUpdate() const
Definition: ReleaseInformationModel.cpp:131
Q_INVOKABLE void update()
Definition: ReleaseInformationModel.cpp:121
void setUpdateVersion(const VersionNumber &pVersion)
Definition: ReleaseInformationModel.cpp:137
~ReleaseInformationModel() override=default
QSharedPointer< FormattedTextModel > getUpdateRelease() const
Definition: ReleaseInformationModel.cpp:115
QSharedPointer< FormattedTextModel > currentRelease
Definition: ReleaseInformationModel.h:30
bool allowRetry
Definition: ReleaseInformationModel.h:32
Definition: ReleaseInformation.h:22
Definition: VersionNumber.h:15
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15