extract method
This commit is contained in:
@@ -308,7 +308,7 @@ void GraphingWindow::axisDoubleClick(QCPAxis *axis, QCPAxis::SelectablePart part
|
|||||||
}
|
}
|
||||||
} else if (part == QCPAxis::spAxis) // Resize an axis to fit by double clicking it
|
} else if (part == QCPAxis::spAxis) // Resize an axis to fit by double clicking it
|
||||||
{
|
{
|
||||||
axis->rescale(true);
|
this->rescaleAxis(axis);
|
||||||
ui->graphingView->replot();
|
ui->graphingView->replot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -586,10 +586,15 @@ void GraphingWindow::removeAllGraphs()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GraphingWindow::rescaleAxis(QCPAxis *axis)
|
||||||
|
{
|
||||||
|
axis->rescale(true);
|
||||||
|
}
|
||||||
|
|
||||||
void GraphingWindow::rescaleToData()
|
void GraphingWindow::rescaleToData()
|
||||||
{
|
{
|
||||||
ui->graphingView->xAxis->rescale(true);
|
this->rescaleAxis(ui->graphingView->xAxis);
|
||||||
ui->graphingView->yAxis->rescale(true);
|
this->rescaleAxis(ui->graphingView->yAxis);
|
||||||
ui->graphingView->replot();
|
ui->graphingView->replot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ private slots:
|
|||||||
void saveSpreadsheet();
|
void saveSpreadsheet();
|
||||||
void saveDefinitions();
|
void saveDefinitions();
|
||||||
void loadDefinitions();
|
void loadDefinitions();
|
||||||
|
void rescaleAxis(QCPAxis* axis);
|
||||||
void rescaleToData();
|
void rescaleToData();
|
||||||
void toggleFollowMode();
|
void toggleFollowMode();
|
||||||
void addNewGraph();
|
void addNewGraph();
|
||||||
|
|||||||
Reference in New Issue
Block a user