summaryrefslogtreecommitdiff
path: root/src/canvastoolselections.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/canvastoolselections.h')
-rw-r--r--src/canvastoolselections.h83
1 files changed, 41 insertions, 42 deletions
diff --git a/src/canvastoolselections.h b/src/canvastoolselections.h
index 0557520..f911e70 100644
--- a/src/canvastoolselections.h
+++ b/src/canvastoolselections.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_CANVASTOOLSELECTIONS_H__
-#define __DRUMGIZMO_CANVASTOOLSELECTIONS_H__
+#pragma once
#include "canvastool.h"
@@ -35,59 +34,59 @@
#include "selection.h"
-class CanvasToolSelections : public CanvasTool {
-Q_OBJECT
+class CanvasToolSelections
+ : public CanvasTool
+{
+ Q_OBJECT
public:
- CanvasToolSelections(Canvas *canvas, Selections &selections,
- Selections &selections_preview);
+ CanvasToolSelections(Canvas* canvas, Selections& selections,
+ Selections& selections_preview);
- QString name() { return "Selections"; }
- bool mouseMoveEvent(QMouseEvent *event);
- bool mousePressEvent(QMouseEvent *event);
- bool mouseReleaseEvent(QMouseEvent *event);
- void paintEvent(QPaintEvent *event, QPainter &painter);
- void keyReleaseEvent(QKeyEvent *event);
+ QString name() { return "Selections"; }
+ bool mouseMoveEvent(QMouseEvent* event);
+ bool mousePressEvent(QMouseEvent* event);
+ bool mouseReleaseEvent(QMouseEvent* event);
+ void paintEvent(QPaintEvent* event, QPainter& painter);
+ void keyReleaseEvent(QKeyEvent* event);
- //Selections selections();
+ //Selections selections();
signals:
- //void selectionsChanged(Selections selections);
- //void activeSelectionChanged(sel_id_t id);
+ //void selectionsChanged(Selections selections);
+ //void activeSelectionChanged(sel_id_t id);
public slots:
- void autoCreateSelections();
- void autoCreateSelectionsPreview();
- void clearSelections();
- void thresholdChanged(double threshold);
- void noiseFloorChanged(int t);
- void holdChanged(int h);
- void fadeoutChanged(int f);
- void setShowPreview(bool show_preview);
+ void autoCreateSelections();
+ void autoCreateSelectionsPreview();
+ void clearSelections();
+ void thresholdChanged(double threshold);
+ void noiseFloorChanged(int t);
+ void holdChanged(int h);
+ void fadeoutChanged(int f);
+ void setShowPreview(bool show_preview);
private:
- void doAutoCreateSelections(bool preview);
+ void doAutoCreateSelections(bool preview);
- bool selection_is_moving_left;
- bool selection_is_moving_right;
+ bool selection_is_moving_left;
+ bool selection_is_moving_right;
- Canvas *canvas;
+ Canvas* canvas;
- double threshold;
- double noise_floor;
- double fadeout;
- int hold;
+ double threshold;
+ double noise_floor;
+ double fadeout;
+ int hold;
- QColor colSelBg;
- QColor colSel;
- QColor colActiveSelBg;
- QColor colActiveSel;
- QColor colPreviewSelBg;
- QColor colPreviewSel;
+ QColor colSelBg;
+ QColor colSel;
+ QColor colActiveSelBg;
+ QColor colActiveSel;
+ QColor colPreviewSelBg;
+ QColor colPreviewSel;
- Selections &selections;
- Selections &selections_preview;
+ Selections& selections;
+ Selections& selections_preview;
- bool show_preview;
+ bool show_preview;
};
-
-#endif/*__DRUMGIZMO_CANVASTOOLSELECTIONS_H__*/