mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 06:53:37 +00:00
Add markers by right-clicking a graph
This commit is contained in:
parent
93f5eba6a8
commit
ba3527d7b6
16 changed files with 253 additions and 91 deletions
|
|
@ -44,12 +44,14 @@ protected:
|
|||
virtual bool supported(Trace *t) = 0;
|
||||
std::map<Trace*, bool> traces;
|
||||
QMenu *contextmenu;
|
||||
QPoint contextmenuClickpoint; // mouse coordinates when the contextmenu was invoked
|
||||
QTime lastUpdate;
|
||||
QTimer replotTimer;
|
||||
bool markedForDeletion;
|
||||
static std::set<TracePlot*> plots;
|
||||
|
||||
virtual QPoint markerToPixel(TraceMarker *m) = 0;
|
||||
virtual double nearestTracePoint(Trace *t, QPoint pixel) = 0;
|
||||
virtual double nearestTracePoint(Trace *t, QPoint pixel, double *distance = nullptr) = 0;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
|
|
@ -57,6 +59,8 @@ protected:
|
|||
|
||||
TraceMarker *markerAtPosition(QPoint p, bool onlyMovable = false);
|
||||
|
||||
void createMarkerAtPosition(QPoint p);
|
||||
|
||||
// handle trace drops
|
||||
virtual bool dropSupported(Trace *t) = 0;
|
||||
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue