summaryrefslogtreecommitdiff
path: root/src/canvastoolselections.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/canvastoolselections.h
parent9364b9bb84f607d8603f60b86f965b77e03d8c70 (diff)
Update all fiels to adhere to style-guide
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__*/