mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: show selected dives in scatter plot
As a visual feedback, show the selected dives in the scatter plot. React to application-wide selection changes. Currently, the dive list is deactivated while in statistics mode, but that may change. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5c098eea29
commit
d85b321784
9 changed files with 68 additions and 8 deletions
|
|
@ -174,16 +174,23 @@ public:
|
|||
ChartScatterItem(StatsView &v, ChartZValue z);
|
||||
~ChartScatterItem();
|
||||
|
||||
// Currently, there is no highlighted and selected status.
|
||||
enum class Highlight {
|
||||
Unselected,
|
||||
Selected,
|
||||
Highlighted
|
||||
};
|
||||
void setPos(QPointF pos); // Specifies the *center* of the item.
|
||||
void setHighlight(bool highlight); // In the future, support different kinds of scatter items.
|
||||
void setHighlight(Highlight highlight); // In the future, support different kinds of scatter items.
|
||||
void render() override; // Only call on render thread!
|
||||
QRectF getRect() const;
|
||||
bool contains(QPointF point) const;
|
||||
private:
|
||||
QSGTexture *getTexture() const;
|
||||
QRectF rect;
|
||||
QSizeF textureSize;
|
||||
bool positionDirty, textureDirty;
|
||||
bool highlighted;
|
||||
Highlight highlight;
|
||||
};
|
||||
|
||||
// Implementation detail of templates - move to serparate header file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue