-
Notifications
You must be signed in to change notification settings - Fork 0
/
PluginBase.h
52 lines (40 loc) · 1.06 KB
/
PluginBase.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef PLUGINBASE_H
#define PLUGINBASE_H
/**
* This is a base class for plugins
*/
#include <Matrix3D.h>
#include <QObject>
#include <QMenu>
#include <QList>
#include "CommonTypes.h"
#include "PluginServices.h"
class AnnotatorWnd;
class PluginBase : public QObject
{
Q_OBJECT
public:
explicit PluginBase( QObject *parent = 0 ) : QObject(parent) {}
virtual bool initializePlugin( const PluginServices & ) = 0;
// must return the plugin's name
virtual QString pluginName() = 0;
// called on mouse release
virtual void mouseReleaseEvent( QMouseEvent *evt, unsigned int imgX, unsigned int imgY, unsigned int imgZ )
{
// don't do anything default
(void) evt;
(void) imgX;
(void) imgY;
(void) imgZ;
}
// called on mouse move
virtual void mouseMoveEvent( QMouseEvent *evt, unsigned int imgX, unsigned int imgY, unsigned int imgZ )
{
// don't do anything default
(void) evt;
(void) imgX;
(void) imgY;
(void) imgZ;
}
};
#endif // PLUGINBASE_H