32 :
public QAbstractListModel
37 friend class ::test_DiagnosisModel;
44 ContentRole = Qt::UserRole + 1
47 enum class Section :
int
55 QMap<Section, QSharedPointer<SectionModel>> mSections;
56 QSharedPointer<DiagnosisContext> mContext;
57 DiagnosisController mDiagnosisController;
59 QList<ContentItem> mAusweisAppSection;
60 QList<ContentItem> mTimestampSection;
62 bool mRemoteDeviceSectionRunning;
63 QList<ContentItem> mRemoteDeviceSection;
64 bool mCardReaderSectionRunning;
65 QList<ContentItem> mCardReaderSection;
66 bool mPcscSectionRunning;
67 QList<ContentItem> mPcscSection;
69 DiagnosisConnectionTest mConnectionTest;
70 QList<ContentItem> mNetworkConnectionSection;
71 QList<ContentItem> mNetworkInterfaceSection;
73 bool mAntivirusSectionRunning;
74 DiagnosisAntivirusDetection mAntivirusDetection;
75 QList<ContentItem> mAntivirusSection;
76 bool mFirewallSectionRunning;
77 DiagnosisFirewallDetection mFirewallDetection;
78 QList<ContentItem> mFirewallSection;
80 [[nodiscard]] QString getSectionName(Section pSection)
const;
81 void initGeneralSections();
82 void updateGeneralSection();
83 void initNetworkSections();
84 void updateNetworkSection(
bool pUpdateTimestamp =
true);
85 void initCardReaderSections();
86 void updateCardReaderSection(
bool pUpdateTimestamp =
true);
87 void initAntiVirusAndFirewallSection();
88 void updateAntiVirusAndFirewallSection(
bool pUpdateTimestamp =
true);
89 void connectSignals()
const;
90 void disconnectSignals()
const;
92 [[nodiscard]] QString boolToString(
bool pBoolean)
const;
93 [[nodiscard]] QString getAsPlaintext()
const;
101 [[nodiscard]] QVariant
data(
const QModelIndex& pIndex,
int pRole = Qt::DisplayRole)
const override;
102 [[nodiscard]]
int rowCount(
const QModelIndex& pParent = QModelIndex())
const override;
103 [[nodiscard]] QHash<int, QByteArray>
roleNames()
const override;
106 Q_INVOKABLE
void saveToFile(
const QUrl& pFilename)
const;
113 void onTimestampChanged();
114 void onNetworkInfoChanged();
115 void onConnectionTestDone();
116 void onAntivirusInformationChanged();
117 void onAntivirusDetectionFailed();
118 void onFirewallInformationReady();
119 void onFirewallInformationFailed();
120 void onPcscInfoChanged();
121 void onRemoteInfosChanged();
122 void onReaderInfosChanged();