summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveeventitem.h
blob: cd55f56789d575b19dd1a1c63ae47459da5d9d6c (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
#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);
private:
	void setupToolTipString();
	void recalculatePos();
	void setupPixmap();
	DiveCartesianAxis *vAxis;
	DiveCartesianAxis *hAxis;
	DivePlotDataModel *dataModel;
	struct event* internalEvent;
};

#endif // DIVEEVENTITEM_H