diff options
Diffstat (limited to 'profile-widget/divehandler.h')
-rw-r--r-- | profile-widget/divehandler.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/profile-widget/divehandler.h b/profile-widget/divehandler.h new file mode 100644 index 000000000..ecd0248c8 --- /dev/null +++ b/profile-widget/divehandler.h @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef DIVEHANDLER_HPP +#define DIVEHANDLER_HPP + +#include <QGraphicsPathItem> +#include <QElapsedTimer> + +class DiveHandler : public QObject, public QGraphicsEllipseItem { + Q_OBJECT +public: + DiveHandler(); + +protected: + void contextMenuEvent(QGraphicsSceneContextMenuEvent *event); + void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); +signals: + void moved(); + void clicked(); + void released(); +private: + int parentIndex(); +public +slots: + void selfRemove(); + void changeGas(); +private: + QElapsedTimer t; +}; + +#endif |