summaryrefslogtreecommitdiff
path: root/src/canvastool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/canvastool.h')
-rw-r--r--src/canvastool.h37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/canvastool.h b/src/canvastool.h
index 56cfa84..c890422 100644
--- a/src/canvastool.h
+++ b/src/canvastool.h
@@ -24,8 +24,7 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_CANVASTOOL_H__
-#define __DRUMGIZMO_CANVASTOOL_H__
+#pragma once
#include <QMouseEvent>
#include <QResizeEvent>
@@ -34,29 +33,29 @@
#include <QPainter>
#include <QString>
-class CanvasTool : public QObject {
-Q_OBJECT
+class CanvasTool
+ : public QObject
+{
+ Q_OBJECT
public:
- virtual QString name() = 0;
- virtual bool mouseMoveEvent(QMouseEvent *event);
- virtual bool mousePressEvent(QMouseEvent *event);
- virtual bool mouseReleaseEvent(QMouseEvent *event);
- virtual void resizeEvent(QResizeEvent *event);
- virtual void paintEvent(QPaintEvent *event, QPainter &painter);
- virtual void keyReleaseEvent(QKeyEvent *event);
+ virtual QString name() = 0;
+ virtual bool mouseMoveEvent(QMouseEvent* event);
+ virtual bool mousePressEvent(QMouseEvent* event);
+ virtual bool mouseReleaseEvent(QMouseEvent* event);
+ virtual void resizeEvent(QResizeEvent* event);
+ virtual void paintEvent(QPaintEvent* event, QPainter& painter);
+ virtual void keyReleaseEvent(QKeyEvent* event);
- bool isActive();
+ bool isActive();
signals:
- void activateChanged(bool activestate);
+ void activateChanged(bool activestate);
public slots:
- void setActive(bool active);
- void activate();
- void disactivate();
+ void setActive(bool active);
+ void activate();
+ void disactivate();
private:
- bool _active;
+ bool _active;
};
-
-#endif/*__DRUMGIZMO_CANVASTOOL_H__*/