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
|
|
@ -14,7 +14,6 @@ class QFontMetrics;
|
|||
class Legend : public ChartRectItem {
|
||||
public:
|
||||
Legend(StatsView &view, const std::vector<QString> &names);
|
||||
void hover(QPointF pos);
|
||||
void resize(); // called when the chart size changes.
|
||||
private:
|
||||
// Each entry is a text besides a rectangle showing the color
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue