mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-02 19:39:58 +02:00
Remove table useless qetgraphicstableitem when model is reseted
When the model of a qetgraphicstableitem is reseted (for exemple when the sql query is modified) we check if there is useless tables (table with 0 row displayed) and remove it.
This commit is contained in:
@@ -79,6 +79,7 @@ class QetGraphicsTableItem : public QetGraphicsItem
|
||||
void setTableName(const QString &name);
|
||||
QString tableName() const;
|
||||
int displayNRowOffset() const;
|
||||
int displayedRowCount() const;
|
||||
QetGraphicsTableItem *previousTable() const;
|
||||
QetGraphicsTableItem *nextTable() const;
|
||||
void setToMinimumHeight();
|
||||
@@ -120,13 +121,14 @@ class QetGraphicsTableItem : public QetGraphicsItem
|
||||
void headerSectionResized();
|
||||
void adjustSize();
|
||||
void previousTableDisplayRowChanged();
|
||||
void removeUselessNextTable(bool recursive = true);
|
||||
|
||||
QAbstractItemModel *m_model= nullptr;
|
||||
|
||||
QVector<int> m_minimum_column_width;
|
||||
int
|
||||
m_minimum_row_height,
|
||||
m_number_of_displayed_row = 0,
|
||||
m_number_of_row_to_display = 0,
|
||||
m_br_margin = 10;
|
||||
|
||||
QSize
|
||||
|
||||
Reference in New Issue
Block a user