Implement the modelDataChanged to repopulate the widget on Statistics

The modelDataChanged method will remove all items and recreate everything
*right* now we will never use it, because we are not triggering any
changes on the model, but simply deleting and recreating it everytime
we open the dialog. to be changed in the future.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-08-25 16:55:26 -03:00 committed by Dirk Hohndel
parent 4a6a9a6706
commit 18da0b1911

View file

@ -26,7 +26,10 @@ void YearlyStatisticsWidget::modelRowsInserted(const QModelIndex &index, int fir
void YearlyStatisticsWidget::modelDataChanged(const QModelIndex &topLeft, const QModelIndex& bottomRight)
{
// stub
Q_UNUSED(topLeft);
Q_UNUSED(bottomRight);
scene()->clear();
modelRowsInserted(QModelIndex(),0,m_model->rowCount()-1);
}
void YearlyStatisticsWidget::resizeEvent(QResizeEvent *event)