Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include "DataModel.h"
|
||||
|
||||
class AddModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
using QAbstractTableModel::QAbstractTableModel;
|
||||
|
||||
void setHeaderList(const HeaderList& headerList);
|
||||
void setTablename(const QString& tableName);
|
||||
const QString& getTableName() const;
|
||||
QVariant::Type getColumnType(const int column) const;
|
||||
const HeaderList& getHeaderList() const;
|
||||
|
||||
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) override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
bool removeRow(int row, const QModelIndex &parent = QModelIndex());
|
||||
void clear();
|
||||
|
||||
private:
|
||||
HeaderList m_headerList;
|
||||
DataList m_dataList;
|
||||
QString m_tableName;
|
||||
|
||||
};
|
||||
Reference in new issue
Block a user