mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 23:43:42 +00:00
pan/zoom for smith chart and polar plot
This commit is contained in:
parent
7889676ac7
commit
dfd1abeea5
9 changed files with 189 additions and 71 deletions
|
|
@ -61,6 +61,38 @@ void TraceWaterfall::replot()
|
|||
TracePlot::replot();
|
||||
}
|
||||
|
||||
//void TraceWaterfall::move(const QPoint &vect)
|
||||
//{
|
||||
// if(!xAxis.getLog()) {
|
||||
// // can only move axis in linear mode
|
||||
// // calculate amount of movement
|
||||
// double distance = xAxis.inverseTransform(vect.x(), 0, plotAreaWidth) - xAxis.getRangeMin();
|
||||
// xAxis.set(xAxis.getType(), false, false, xAxis.getRangeMin() - distance, xAxis.getRangeMax() - distance, xAxis.getRangeDiv());
|
||||
// }
|
||||
// replot();
|
||||
//}
|
||||
|
||||
//void TraceWaterfall::zoom(const QPoint ¢er, double factor, bool horizontally, bool vertically)
|
||||
//{
|
||||
// if(horizontally && !xAxis.getLog()) {
|
||||
// // can only zoom axis in linear mode
|
||||
// // calculate center point
|
||||
// double cp = xAxis.inverseTransform(center.x(), plotAreaLeft, plotAreaLeft + plotAreaWidth);
|
||||
// double min = ((xAxis.getRangeMin() - cp) * factor) + cp;
|
||||
// double max = ((xAxis.getRangeMax() - cp) * factor) + cp;
|
||||
// xAxis.set(xAxis.getType(), false, false, min, max, xAxis.getRangeDiv() * factor);
|
||||
// }
|
||||
// replot();
|
||||
//}
|
||||
|
||||
//void TraceWaterfall::setAuto(bool horizontally, bool vertically)
|
||||
//{
|
||||
// if(horizontally) {
|
||||
// xAxis.set(xAxis.getType(), xAxis.getLog(), true, xAxis.getRangeMin(), xAxis.getRangeMax(), xAxis.getRangeDiv());
|
||||
// }
|
||||
// replot();
|
||||
//}
|
||||
|
||||
void TraceWaterfall::fromJSON(nlohmann::json j)
|
||||
{
|
||||
resetWaterfall();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue