GraphingWindow: add a menu option
This commit is contained in:
@@ -586,6 +586,13 @@ void GraphingWindow::removeAllGraphs()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GraphingWindow::rescaleToData()
|
||||||
|
{
|
||||||
|
ui->graphingView->xAxis->rescale(true);
|
||||||
|
ui->graphingView->yAxis->rescale(true);
|
||||||
|
ui->graphingView->replot();
|
||||||
|
}
|
||||||
|
|
||||||
void GraphingWindow::toggleFollowMode()
|
void GraphingWindow::toggleFollowMode()
|
||||||
{
|
{
|
||||||
followGraphEnd = !followGraphEnd;
|
followGraphEnd = !followGraphEnd;
|
||||||
@@ -627,6 +634,10 @@ void GraphingWindow::contextMenuRequest(QPoint pos)
|
|||||||
}
|
}
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
menu->addAction(tr("Reset View"), this, SLOT(resetView()));
|
menu->addAction(tr("Reset View"), this, SLOT(resetView()));
|
||||||
|
if (ui->graphingView->graphCount() > 0)
|
||||||
|
{
|
||||||
|
menu->addAction(tr("Rescale to data"), this, SLOT(rescaleToData()));
|
||||||
|
}
|
||||||
menu->addAction(tr("Zoom In"), this, SLOT(zoomIn()));
|
menu->addAction(tr("Zoom In"), this, SLOT(zoomIn()));
|
||||||
menu->addAction(tr("Zoom Out"), this, SLOT(zoomOut()));
|
menu->addAction(tr("Zoom Out"), this, SLOT(zoomOut()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ private slots:
|
|||||||
void saveSpreadsheet();
|
void saveSpreadsheet();
|
||||||
void saveDefinitions();
|
void saveDefinitions();
|
||||||
void loadDefinitions();
|
void loadDefinitions();
|
||||||
|
void rescaleToData();
|
||||||
void toggleFollowMode();
|
void toggleFollowMode();
|
||||||
void addNewGraph();
|
void addNewGraph();
|
||||||
void createGraph(GraphParams ¶ms, bool createGraphParam = true);
|
void createGraph(GraphParams ¶ms, bool createGraphParam = true);
|
||||||
|
|||||||
Reference in New Issue
Block a user