summaryrefslogtreecommitdiff
path: root/src/canvastoollisten.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-03-18 18:18:57 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2018-03-18 18:18:57 +0100
commit57f4d38841c40cad3c206abdd16eebaed753aa1c (patch)
treec7e5a40b457845b2fb296563add9599d2e81384e /src/canvastoollisten.h
parent9364b9bb84f607d8603f60b86f965b77e03d8c70 (diff)
Update all fiels to adhere to style-guide
Diffstat (limited to 'src/canvastoollisten.h')
-rw-r--r--src/canvastoollisten.h37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/canvastoollisten.h b/src/canvastoollisten.h
index bfb2d41..8fb8770 100644
--- a/src/canvastoollisten.h
+++ b/src/canvastoollisten.h
@@ -24,38 +24,35 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_CANVASTOOLLISTEN_H__
-#define __DRUMGIZMO_CANVASTOOLLISTEN_H__
+#pragma once
#include "canvastool.h"
-//#include <QTimer>
-
#include "canvas.h"
#include "player.h"
-class CanvasToolListen : public CanvasTool {
-Q_OBJECT
+class CanvasToolListen
+ : public CanvasTool
+{
+ Q_OBJECT
public:
- CanvasToolListen(Canvas *canvas, Player &player);
+ CanvasToolListen(Canvas* canvas, Player& player);
+
+ QString name() { return "Listen"; }
+ bool mousePressEvent(QMouseEvent* event);
+ bool mouseReleaseEvent(QMouseEvent* event);
+ void paintEvent(QPaintEvent* event, QPainter& painter);
- QString name() { return "Listen"; }
- bool mousePressEvent(QMouseEvent *event);
- bool mouseReleaseEvent(QMouseEvent *event);
- void paintEvent(QPaintEvent *event, QPainter &painter);
+ void playRange(unsigned int from, unsigned int to);
- void playRange(unsigned int from, unsigned int to);
-
public slots:
- void update(size_t position);
+ void update(size_t position);
private:
- Canvas *canvas;
+ Canvas* canvas;
- Player &player;
+ Player& player;
- size_t lastpos;
- size_t pos;
+ size_t lastpos;
+ size_t pos;
};
-
-#endif/*__DRUMGIZMO_CANVASTOOLLISTEN_H__*/