|
|
| DAPyDataFrameTableModel (QUndoStack *stack, QObject *parent=nullptr) |
| |
|
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| |
| virtual QVariant | actualHeaderData (int actualSection, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| |
| virtual int | actualRowCount () const override |
| |
| virtual QVariant | actualData (int actualRow, int actualColumn, int role=Qt::DisplayRole) const override |
| |
| virtual bool | setActualData (int actualRow, int actualColumn, const QVariant &value, int role=Qt::EditRole) override |
| |
|
DAPyDataFrame & | dataFrame () |
| |
|
const DAPyDataFrame & | dataFrame () const |
| |
|
void | setDAData (const DAData &d) |
| |
|
void | setDataFrame (const DAPyDataFrame &d) |
| |
|
void | setUseCacheMode (bool on=true) |
| |
| virtual void | setCacheWindowStartRow (int startRow) override |
| | 设置滑动窗模式的起始行
|
| |
|
void | refreshData () |
| | 全部刷新
|
| |
| void | setExtraRowCount (int v) |
| | 设置超出模型实际数据行数的额外空行数量。
|
| |
| int | getExtraRowCount () const |
| | 超出模型实际数据行数的额外空行数量
|
| |
| void | setExtraColumnCount (int v) |
| | 设置超出模型实际数据列数的额外空列数量。
|
| |
| int | getExtraColumnCount () const |
| | 超出模型实际数据列数的额外空列数量
|
| |
|
void | setMinShowRowCount (int v) |
| |
|
int | getMinShowRowCount () const |
| |
|
void | setMinShowColumnCount (int v) |
| |
|
int | getMinShowColumnCount () const |
| |
|
| DAAbstractCacheWindowTableModel (QObject *parent=nullptr) |
| |
|
int | getCacheWindowStartRow () const |
| |
|
void | setCacheWindowSize (int s) |
| |
|
int | getCacheWindowSize () const |
| |
|
virtual Qt::ItemFlags | flags (const QModelIndex &index) const override |
| |
|
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| |
|
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| |
|
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| |
|
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| |
|
virtual Qt::ItemFlags | actualFlags (int actualRow, int actualColumn) const |
| |
|
void | notifyRowChanged (int row) |
| |
|
void | notifyColumnChanged (int col) |
| |
|
void | notifyDataChanged (int row, int col) |
| |
|
void | notifyDataChanged (int rowStart, int colStart, int rowEnd, int colEnd) |
| |
|
void | notifyRowsRemoved (const QList< int > &r) |
| |
|
void | notifyRowsInserted (const QList< int > &r) |
| |
|
void | notifyColumnsRemoved (const QList< int > &c) |
| |
|
void | notifyColumnsInserted (const QList< int > &c) |
| |
针对DAPyDataFrame的table model
- 注解
- QTableView有个bug,在面对超大规模的数据时,会出现遍历所有行的headerData情况,导致非常耗时,同时QHeaderView也有这个问题,在选中一列时, 要遍历这一列所有行的headerData,调试发现会大量调用columnCount,并不能实现真正的虚拟显示,因此,TableModel的实现,将数据进行缓存, 让数据在一个固定的区间里面刷新,从而解决这个问题。