2017-04-27 20:26:36 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2014-01-16 15:02:32 -02:00
|
|
|
#ifndef DIVEEVENTITEM_H
|
|
|
|
#define DIVEEVENTITEM_H
|
|
|
|
|
|
|
|
#include "divepixmapitem.h"
|
|
|
|
|
|
|
|
class DiveCartesianAxis;
|
|
|
|
class DivePlotDataModel;
|
|
|
|
struct event;
|
|
|
|
|
|
|
|
class DiveEventItem : public DivePixmapItem {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-02-27 20:09:57 -08:00
|
|
|
DiveEventItem(QObject *parent = 0);
|
2015-12-03 21:42:23 -08:00
|
|
|
virtual ~DiveEventItem();
|
2014-01-16 15:02:32 -02:00
|
|
|
void setEvent(struct event *ev);
|
2014-02-25 12:27:12 -08:00
|
|
|
struct event *getEvent();
|
2014-02-27 20:09:57 -08:00
|
|
|
void eventVisibilityChanged(const QString &eventName, bool visible);
|
2014-01-16 15:02:32 -02:00
|
|
|
void setVerticalAxis(DiveCartesianAxis *axis);
|
|
|
|
void setHorizontalAxis(DiveCartesianAxis *axis);
|
|
|
|
void setModel(DivePlotDataModel *model);
|
2014-03-16 15:10:03 -07:00
|
|
|
bool shouldBeHidden();
|
2014-02-27 20:09:57 -08:00
|
|
|
public
|
|
|
|
slots:
|
2014-02-15 21:05:47 -02:00
|
|
|
void recalculatePos(bool instant = false);
|
2014-02-27 20:09:57 -08:00
|
|
|
|
2014-01-16 15:02:32 -02:00
|
|
|
private:
|
|
|
|
void setupToolTipString();
|
2014-01-16 16:21:23 -02:00
|
|
|
void setupPixmap();
|
2014-01-16 15:02:32 -02:00
|
|
|
DiveCartesianAxis *vAxis;
|
|
|
|
DiveCartesianAxis *hAxis;
|
|
|
|
DivePlotDataModel *dataModel;
|
2014-02-27 20:09:57 -08:00
|
|
|
struct event *internalEvent;
|
2014-01-16 15:02:32 -02:00
|
|
|
};
|
|
|
|
|
2014-02-11 19:14:46 +01:00
|
|
|
#endif // DIVEEVENTITEM_H
|