base viewmodel and interactions

This commit is contained in:
Andrew nuark G 2020-12-21 23:39:04 +07:00
parent 50aa95e659
commit d69b18f083
14 changed files with 228 additions and 77 deletions

View file

@ -0,0 +1,22 @@
#ifndef USERSVIEWMODEL_H
#define USERSVIEWMODEL_H
#include "system/apparatus.h"
#include <QAbstractTableModel>
class UsersViewModel : public QAbstractTableModel
{
Q_OBJECT
public:
UsersViewModel(QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
public slots:
void update();
};
#endif // USERSVIEWMODEL_H