mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: implement moving of legend
Catch mouse move events and move the legend accordingly. Currently, this is the only item that can be dragged and therefore there is no need of doing some kind of fancy interface. Simply keep a pointer to the legend if it is dragged. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
2b961414d7
commit
1a869833d8
3 changed files with 53 additions and 4 deletions
|
|
@ -168,10 +168,14 @@ private:
|
|||
std::vector<ChartItem *> items; // Attention: currently, items are not automatically removed on destruction!
|
||||
StatsSeries *highlightedSeries;
|
||||
StatsAxis *xAxis, *yAxis;
|
||||
Legend *draggedItem;
|
||||
QPointF dragStartMouse, dragStartItem;
|
||||
|
||||
void hoverEnterEvent(QHoverEvent *event) override;
|
||||
void hoverMoveEvent(QHoverEvent *event) override;
|
||||
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
QSGImageNode *rootNode;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue