mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: move zooming/panning code to ProfileView
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9ab7819fd1
commit
413b236867
4 changed files with 94 additions and 85 deletions
|
|
@ -26,12 +26,16 @@ public:
|
|||
|
||||
void plotDive(const struct dive *d, int dc, int flags = RenderFlags::None);
|
||||
void clear();
|
||||
void resetZoom();
|
||||
void anim(double fraction);
|
||||
private:
|
||||
const struct dive *d;
|
||||
int dc;
|
||||
int zoomLevel;
|
||||
double zoomedPosition; // Position when zoomed: 0.0 = beginning, 1.0 = end.
|
||||
bool panning; // Currently panning.
|
||||
double panningOriginalMousePosition;
|
||||
double panningOriginalProfilePosition;
|
||||
bool empty; // No dive shown.
|
||||
bool shouldCalculateMax; // Calculate maximum time and depth (default). False when dragging handles.
|
||||
QColor background;
|
||||
|
|
@ -42,6 +46,12 @@ private:
|
|||
void plotAreaChanged(const QSizeF &size) override;
|
||||
void resetPointers() override;
|
||||
void replot();
|
||||
void setZoom(int level);
|
||||
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue