summaryrefslogtreecommitdiff
path: root/dgedit/canvastoolselections.h
diff options
context:
space:
mode:
Diffstat (limited to 'dgedit/canvastoolselections.h')
-rw-r--r--dgedit/canvastoolselections.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/dgedit/canvastoolselections.h b/dgedit/canvastoolselections.h
index 730f99d..a8b37a3 100644
--- a/dgedit/canvastoolselections.h
+++ b/dgedit/canvastoolselections.h
@@ -26,4 +26,51 @@
*/
#ifndef __DRUMGIZMO_CANVASTOOLSELECTIONS_H__
#define __DRUMGIZMO_CANVASTOOLSELECTIONS_H__
+
+#include "canvastool.h"
+
+#include <QColor>
+
+#include "canvas.h"
+
+#include "selection.h"
+
+class CanvasToolSelections : public CanvasTool {
+Q_OBJECT
+public:
+ CanvasToolSelections(Canvas *canvas);
+
+ bool mouseMoveEvent(QMouseEvent *event);
+ bool mousePressEvent(QMouseEvent *event);
+ bool mouseReleaseEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event, QPainter &painter);
+ void keyReleaseEvent(QKeyEvent *event);
+
+ Selections selections();
+
+signals:
+ void selectionsChanged(Selections selections);
+ void activeSelectionChanged(Selection selection);
+
+public slots:
+ void autoCreateSelections();
+ void clearSelections();
+
+private:
+ bool selection_is_moving_left;
+ bool selection_is_moving_right;
+ Selection *active_selection;
+ Selections _selections;
+
+ Canvas *canvas;
+
+ float *data;
+ size_t size;
+
+ QColor colSelBg;
+ QColor colSel;
+ QColor colActiveSelBg;
+ QColor colActiveSel;
+};
+
#endif/*__DRUMGIZMO_CANVASTOOLSELECTIONS_H__*/