-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtool.h
37 lines (29 loc) · 930 Bytes
/
tool.h
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
31
32
33
34
35
36
37
#ifndef TOOL_H
#define TOOL_H
#include "guiimage.h"
#include "imageviewer.h"
#include <QPointF>
#include <QString>
class Tool : public QObject {
Q_OBJECT
protected:
GuiImage * guiImage;
ImageViewer *viewer;
bool m_visible;
bool m_hasLabel = false;
public:
Tool( GuiImage *guiImage, ImageViewer *viewer );
virtual int type( ) = 0;
virtual void mouseReleased( QPointF pt, Qt::MouseButtons buttons, size_t axis ) = 0;
virtual void mouseClicked( QPointF pt, Qt::MouseButtons buttons, size_t axis ) = 0;
virtual void mouseDragged( QPointF pt, Qt::MouseButtons buttons, size_t axis ) = 0;
virtual void mouseMoved( QPointF pt, size_t axis ) = 0;
virtual void sliceChanged( size_t axis, size_t slice ) = 0;
void setVisible( bool value );
virtual QPixmap getLabel( size_t axis );
bool visible( ) const;
bool hasLabel( ) const;
protected:
void setHasLabel( bool sHasLabel );
};
#endif /* TOOL_H */