mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Create stub methods and connects the model with the new statistics
Connects the YearlyStatistics model with the YearlyStatisticsWidget nothing is shown right now, mostly because I need to do everything but now it's easyer to add the things that are missing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
750fc529b7
commit
1c56c9f626
3 changed files with 44 additions and 2 deletions
|
@ -1,5 +1,36 @@
|
|||
#include "statisticswidget.h"
|
||||
#include "models.h"
|
||||
#include <QModelIndex>
|
||||
|
||||
YearlyStatisticsWidget::YearlyStatisticsWidget(QWidget *parent): QGraphicsView(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void YearlyStatisticsWidget::setModel(YearlyStatisticsModel *m)
|
||||
{
|
||||
m_model = m;
|
||||
connect(m, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
|
||||
this, SLOT(modelDataChanged(QModelIndex,QModelIndex)));
|
||||
connect(m, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(modelRowsRemoved(QModelIndex,int,int)));
|
||||
connect(m, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(modelRowsInserted(QModelIndex,int,int)));
|
||||
|
||||
modelRowsRemoved(QModelIndex(),0,m_model->rowCount()-1);
|
||||
modelRowsInserted(QModelIndex(),0,m_model->rowCount()-1);
|
||||
}
|
||||
|
||||
void YearlyStatisticsWidget::modelRowsInserted(const QModelIndex &index, int first, int last)
|
||||
{
|
||||
// stub
|
||||
}
|
||||
|
||||
void YearlyStatisticsWidget::modelRowsRemoved(const QModelIndex &index, int first, int last)
|
||||
{
|
||||
// stub
|
||||
}
|
||||
|
||||
void YearlyStatisticsWidget::modelDataChanged(const QModelIndex &topLeft, const QModelIndex& bottomRight)
|
||||
{
|
||||
// stub
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue