##// END OF EJS Templates
Fix model resetting in with model mappers...
Joni Poikelin -
r2870:ea9744cf9a34
parent child
Show More
@@ -52,6 +52,7 void QBarModelMapper::setModel(QAbstractItemModel *model)
52 d->m_model = model;
52 d->m_model = model;
53 d->initializeBarFromModel();
53 d->initializeBarFromModel();
54 // connect signals from the model
54 // connect signals from the model
55 connect(d->m_model, SIGNAL(modelReset()), d, SLOT(initializeBarFromModel()));
55 connect(d->m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), d, SLOT(modelUpdated(QModelIndex,QModelIndex)));
56 connect(d->m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), d, SLOT(modelUpdated(QModelIndex,QModelIndex)));
56 connect(d->m_model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), d, SLOT(modelHeaderDataUpdated(Qt::Orientation,int,int)));
57 connect(d->m_model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), d, SLOT(modelHeaderDataUpdated(Qt::Orientation,int,int)));
57 connect(d->m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), d, SLOT(modelRowsAdded(QModelIndex,int,int)));
58 connect(d->m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), d, SLOT(modelRowsAdded(QModelIndex,int,int)));
@@ -52,6 +52,7 void QBoxPlotModelMapper::setModel(QAbstractItemModel *model)
52 d->m_model = model;
52 d->m_model = model;
53 d->initializeBoxFromModel();
53 d->initializeBoxFromModel();
54 // connect signals from the model
54 // connect signals from the model
55 connect(d->m_model, SIGNAL(modelReset()), d, SLOT(initializeBoxFromModel()));
55 connect(d->m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), d, SLOT(modelUpdated(QModelIndex,QModelIndex)));
56 connect(d->m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), d, SLOT(modelUpdated(QModelIndex,QModelIndex)));
56 connect(d->m_model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), d, SLOT(modelHeaderDataUpdated(Qt::Orientation,int,int)));
57 connect(d->m_model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), d, SLOT(modelHeaderDataUpdated(Qt::Orientation,int,int)));
57 connect(d->m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), d, SLOT(modelRowsAdded(QModelIndex,int,int)));
58 connect(d->m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), d, SLOT(modelRowsAdded(QModelIndex,int,int)));
@@ -52,6 +52,7 void QPieModelMapper::setModel(QAbstractItemModel *model)
52 d->m_model = model;
52 d->m_model = model;
53 d->initializePieFromModel();
53 d->initializePieFromModel();
54 // connect signals from the model
54 // connect signals from the model
55 connect(d->m_model, SIGNAL(modelReset()), d, SLOT(initializePieFromModel()));
55 connect(d->m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), d, SLOT(modelUpdated(QModelIndex,QModelIndex)));
56 connect(d->m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), d, SLOT(modelUpdated(QModelIndex,QModelIndex)));
56 connect(d->m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), d, SLOT(modelRowsAdded(QModelIndex,int,int)));
57 connect(d->m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), d, SLOT(modelRowsAdded(QModelIndex,int,int)));
57 connect(d->m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)), d, SLOT(modelRowsRemoved(QModelIndex,int,int)));
58 connect(d->m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)), d, SLOT(modelRowsRemoved(QModelIndex,int,int)));
General Comments 0
You need to be logged in to leave comments. Login now