mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: first rudimentary port of the ToolTipItem to qt-quick
Still behaves weirdly when panning the chart. No support for moving the ToolTipItem. Doesn't add information on bookmarks under the mouse cursor. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e3767976a3
commit
13c9218ecf
14 changed files with 260 additions and 48 deletions
|
|
@ -8,6 +8,7 @@
|
|||
class ChartGraphicsSceneItem;
|
||||
class ProfileAnimation;
|
||||
class ProfileScene;
|
||||
class ToolTipItem;
|
||||
|
||||
class ProfileView : public ChartView {
|
||||
Q_OBJECT
|
||||
|
|
@ -47,6 +48,7 @@ signals:
|
|||
private:
|
||||
const struct dive *d;
|
||||
int dc;
|
||||
double dpr;
|
||||
double zoomLevel, zoomLevelPinchStart;
|
||||
double zoomedPosition; // Position when zoomed: 0.0 = beginning, 1.0 = end.
|
||||
bool panning; // Currently panning.
|
||||
|
|
@ -64,11 +66,15 @@ private:
|
|||
void replot();
|
||||
void setZoom(double level);
|
||||
|
||||
void hoverEnterEvent(QHoverEvent *event) override;
|
||||
void hoverMoveEvent(QHoverEvent *event) override;
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
|
||||
ChartItemPtr<ToolTipItem> tooltip;
|
||||
|
||||
// For mobile
|
||||
int getDiveId() const;
|
||||
void setDiveId(int id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue