1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#ifndef SQLQUERYROWNUMMODEL_H
#define SQLQUERYROWNUMMODEL_H
#include "guiSQLiteStudio_global.h"
#include <QAbstractItemModel>
class GUI_API_EXPORT SqlQueryRowNumModel : public QAbstractItemModel
{
Q_OBJECT
public:
SqlQueryRowNumModel(QAbstractItemModel *value, QObject *parent = 0);
QModelIndex index(int row, int column, const QModelIndex &parent) const;
QModelIndex parent(const QModelIndex &child) const;
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
void setRowNumBase(int value);
private:
int rowNumBase = 1;
QAbstractItemModel* mainModel = nullptr;
};
#endif // SQLQUERYROWNUMMODEL_H
|