AusweisApp2/src/qml/VersionInformationModel.h

39 lines
690 B
C
Raw Normal View History

2017-07-03 09:30:10 +02:00
/*!
2018-03-28 15:10:51 +02:00
* \copyright Copyright (c) 2016-2018 Governikus GmbH & Co. KG, Germany
2017-07-03 09:30:10 +02:00
*/
#pragma once
#include <QAbstractListModel>
#include <QList>
#include <QPair>
#include <QString>
namespace governikus
{
class VersionInformationModel
: public QAbstractListModel
{
Q_OBJECT
2017-12-20 14:54:05 +01:00
private:
enum HistoryRoles
{
LABEL = Qt::UserRole + 1,
TEXT
};
QVector<QPair<QString, QString> > mData;
void init();
2017-07-03 09:30:10 +02:00
public:
VersionInformationModel(QObject* pParent = nullptr);
int rowCount(const QModelIndex& = QModelIndex()) const override;
QVariant data(const QModelIndex& pIndex, int pRole = Qt::DisplayRole) const override;
QHash<int, QByteArray> roleNames() const override;
};
}