summaryrefslogblamecommitdiffstats
path: root/qt-ui/profile/diveeventitem.h
blob: f358fee6da28b3f61acb66fc96cac8f18ce1a2bf (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12










                                             
                                           
                                        
                                 
                                                                            

                                                        
                              
      
                                                  
 
                                  
                           

                                     
                                    
  
                         
#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);
	struct event *getEvent();
	void eventVisibilityChanged(const QString &eventName, bool visible);
	void setVerticalAxis(DiveCartesianAxis *axis);
	void setHorizontalAxis(DiveCartesianAxis *axis);
	void setModel(DivePlotDataModel *model);
	bool shouldBeHidden();
public
slots:
	void recalculatePos(bool instant = false);

private:
	void setupToolTipString();
	void setupPixmap();
	DiveCartesianAxis *vAxis;
	DiveCartesianAxis *hAxis;
	DivePlotDataModel *dataModel;
	struct event *internalEvent;
};

#endif // DIVEEVENTITEM_H