mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-22 01:29:59 +01:00
Query can be edited. Project database can be exported
User can now define the information to display in the nomenclature table. WIP The internal database of project can be exported to file.
This commit is contained in:
@@ -42,10 +42,14 @@ void QetGraphicsHeaderItem::setModel(QAbstractItemModel *model)
|
||||
{
|
||||
if (m_model) {
|
||||
disconnect(m_model, &QAbstractItemModel::headerDataChanged, this, &QetGraphicsHeaderItem::headerDataChanged);
|
||||
disconnect(m_model, &QAbstractItemModel::modelReset, this, &QetGraphicsHeaderItem::modelReseted);
|
||||
disconnect(m_model, &QAbstractItemModel::columnsInserted, this, &QetGraphicsHeaderItem::modelReseted);
|
||||
}
|
||||
|
||||
m_model = model;
|
||||
connect(m_model, &QAbstractItemModel::headerDataChanged, this, &QetGraphicsHeaderItem::headerDataChanged);
|
||||
connect(m_model, &QAbstractItemModel::modelReset, this, &QetGraphicsHeaderItem::modelReseted);
|
||||
connect(m_model, &QAbstractItemModel::columnsInserted, this, &QetGraphicsHeaderItem::modelReseted);
|
||||
setUpMinimumSectionsSize();
|
||||
m_current_sections_width.clear();
|
||||
m_current_sections_width.resize(m_sections_minimum_width.size());
|
||||
@@ -264,3 +268,11 @@ void QetGraphicsHeaderItem::adjustSize()
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void QetGraphicsHeaderItem::modelReseted()
|
||||
{
|
||||
setUpMinimumSectionsSize();
|
||||
m_current_sections_width.clear();
|
||||
m_current_sections_width.resize(m_sections_minimum_width.size());
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user