##// END OF EJS Templates
Removing unused connections and slots...
Mika Salmela -
r2559:c86e17a9d40c
parent child
Show More
@@ -437,47 +437,6 void QBoxPlotModelMapperPrivate::boxSetsRemoved(QList<QBoxSet *> sets)
437 initializeBoxFromModel();
437 initializeBoxFromModel();
438 }
438 }
439
439
440 void QBoxPlotModelMapperPrivate::valuesAdded(int index, int count)
441 {
442 if (m_seriesSignalsBlock)
443 return;
444
445 if (m_count != -1)
446 m_count += count;
447
448 int boxSetIndex = m_boxSets.indexOf(qobject_cast<QBoxSet *>(QObject::sender()));
449
450 blockModelSignals();
451 if (m_orientation == Qt::Vertical)
452 m_model->insertRows(index + m_first, count);
453 else
454 m_model->insertColumns(index + m_first, count);
455
456 for (int j = index; j < index + count; j++)
457 m_model->setData(boxModelIndex(boxSetIndex + m_firstBoxSetSection, j), m_boxSets.at(boxSetIndex)->at(j));
458
459 blockModelSignals(false);
460 initializeBoxFromModel();
461 }
462
463 void QBoxPlotModelMapperPrivate::valuesRemoved(int index, int count)
464 {
465 if (m_seriesSignalsBlock)
466 return;
467
468 if (m_count != -1)
469 m_count -= count;
470
471 blockModelSignals();
472 if (m_orientation == Qt::Vertical)
473 m_model->removeRows(index + m_first, count);
474 else
475 m_model->removeColumns(index + m_first, count);
476
477 blockModelSignals(false);
478 initializeBoxFromModel();
479 }
480
481 void QBoxPlotModelMapperPrivate::boxValueChanged(int index)
440 void QBoxPlotModelMapperPrivate::boxValueChanged(int index)
482 {
441 {
483 if (m_seriesSignalsBlock)
442 if (m_seriesSignalsBlock)
@@ -513,8 +472,6 void QBoxPlotModelMapperPrivate::initializeBoxFromModel()
513 posInBar++;
472 posInBar++;
514 boxIndex = boxModelIndex(i, posInBar);
473 boxIndex = boxModelIndex(i, posInBar);
515 }
474 }
516 connect(boxSet, SIGNAL(valuesAdded(int,int)), this, SLOT(valuesAdded(int,int)));
517 connect(boxSet, SIGNAL(valuesRemoved(int,int)), this, SLOT(valuesRemoved(int,int)));
518 connect(boxSet, SIGNAL(valueChanged(int)), this, SLOT(boxValueChanged(int)));
475 connect(boxSet, SIGNAL(valueChanged(int)), this, SLOT(boxValueChanged(int)));
519 m_series->append(boxSet);
476 m_series->append(boxSet);
520 m_boxSets.append(boxSet);
477 m_boxSets.append(boxSet);
@@ -58,8 +58,6 public Q_SLOTS:
58 // for the series
58 // for the series
59 void boxSetsAdded(QList<QBoxSet *> sets);
59 void boxSetsAdded(QList<QBoxSet *> sets);
60 void boxSetsRemoved(QList<QBoxSet *> sets);
60 void boxSetsRemoved(QList<QBoxSet *> sets);
61 void valuesAdded(int index, int count);
62 void valuesRemoved(int index, int count);
63 void boxValueChanged(int index);
61 void boxValueChanged(int index);
64 void handleSeriesDestroyed();
62 void handleSeriesDestroyed();
65
63
@@ -107,7 +107,7 MainWidget::MainWidget(QWidget *parent) :
107 initThemeCombo(grid);
107 initThemeCombo(grid);
108 initCheckboxes(grid);
108 initCheckboxes(grid);
109
109
110 m_model = new CustomTableModel;
110 m_model = new CustomTableModel();
111 QTableView *tableView = new QTableView;
111 QTableView *tableView = new QTableView;
112 tableView->setModel(m_model);
112 tableView->setModel(m_model);
113 tableView->setMaximumWidth(200);
113 tableView->setMaximumWidth(200);
General Comments 0
You need to be logged in to leave comments. Login now