check queue WIP
This commit is contained in:
30
widgets/checkqueuetablemodel.h
Normal file
30
widgets/checkqueuetablemodel.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef CHECKQUEUETABLEMODEL_H
|
||||
#define CHECKQUEUETABLEMODEL_H
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
#include <check/check.h>
|
||||
|
||||
class CheckQueueTableModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CheckQueueTableModel(std::vector<Check> *checks, QObject *parent = nullptr);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
bool insertRow(int row, int count, const QModelIndex &parent = QModelIndex());
|
||||
private:
|
||||
std::vector<Check> *checks;
|
||||
signals:
|
||||
void editCompleted(const QString &);
|
||||
};
|
||||
|
||||
#endif // CHECKQUEUETABLEMODEL_H
|
||||
Reference in New Issue
Block a user