aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveeventitem.h
blob: f43fee01f07d4a91b3e4a84664c44bf600e29f64 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#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