mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
87d5289920
The events were static on the canvas even if the profile changed its size because of a toggle of the partial pressure gas. This patch makes events move on the canvas to their correct place. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
30 lines
749 B
C++
30 lines
749 B
C++
#ifndef DIVEEVENTITEM_H
|
|
#define DIVEEVENTITEM_H
|
|
|
|
#include "divepixmapitem.h"
|
|
|
|
class DiveCartesianAxis;
|
|
class DivePlotDataModel;
|
|
struct event;
|
|
|
|
class DiveEventItem : public DivePixmapItem {
|
|
Q_OBJECT
|
|
public:
|
|
DiveEventItem(QObject* parent = 0);
|
|
void setEvent(struct event *ev);
|
|
void eventVisibilityChanged(const QString& eventName, bool visible);
|
|
void setVerticalAxis(DiveCartesianAxis *axis);
|
|
void setHorizontalAxis(DiveCartesianAxis *axis);
|
|
void setModel(DivePlotDataModel *model);
|
|
public slots:
|
|
void recalculatePos(bool instant = false);
|
|
private:
|
|
void setupToolTipString();
|
|
void setupPixmap();
|
|
DiveCartesianAxis *vAxis;
|
|
DiveCartesianAxis *hAxis;
|
|
DivePlotDataModel *dataModel;
|
|
struct event* internalEvent;
|
|
};
|
|
|
|
#endif // DIVEEVENTITEM_H
|