-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.h
More file actions
29 lines (26 loc) · 1.07 KB
/
models.h
File metadata and controls
29 lines (26 loc) · 1.07 KB
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
28
29
#pragma once
#include <QAbstractTableModel>
#include <QTableView>
class TBModel : public QAbstractTableModel {
public:
TBModel(QObject* p = NULL);
int rowCount(const QModelIndex& idx = QModelIndex()) const;
int columnCount(const QModelIndex& idx = QModelIndex()) const;
QVariant data(const QModelIndex&, int role = Qt::DisplayRole) const;
QVariant headerData(int,Qt::Orientation, int role = Qt::DisplayRole) const;
void update();
void updateLine(int);
void updateCell(int,int);
void insertRow(int, const QModelIndex& idx = QModelIndex());
void removeRow(int, const QModelIndex& idx = QModelIndex());
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
};
class BMLModel : public QAbstractTableModel {
public:
BMLModel(QObject* = NULL);
int rowCount(const QModelIndex& = QModelIndex()) const;
int columnCount(const QModelIndex& = QModelIndex()) const;
QVariant data(const QModelIndex&, int = Qt::DisplayRole) const;
void update();
QModelIndex index(int row, int column, const QModelIndex& = QModelIndex()) const;
};