From 0fcacc1c3329e905228ceb80903f69561a7db732 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 15 Apr 2014 09:55:45 +0200 Subject: New selections model. --- dgedit/canvastoolselections.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'dgedit/canvastoolselections.h') diff --git a/dgedit/canvastoolselections.h b/dgedit/canvastoolselections.h index 64c52b8..8b877de 100644 --- a/dgedit/canvastoolselections.h +++ b/dgedit/canvastoolselections.h @@ -38,7 +38,7 @@ class CanvasToolSelections : public CanvasTool { Q_OBJECT public: - CanvasToolSelections(Canvas *canvas); + CanvasToolSelections(Canvas *canvas, Selections &selections); QString name() { return "Selections"; } bool mouseMoveEvent(QMouseEvent *event); @@ -47,11 +47,11 @@ public: void paintEvent(QPaintEvent *event, QPainter &painter); void keyReleaseEvent(QKeyEvent *event); - Selections selections(); + //Selections selections(); signals: - void selectionsChanged(Selections selections); - void activeSelectionChanged(Selection selection); + //void selectionsChanged(Selections selections); + //void activeSelectionChanged(sel_id_t id); public slots: void autoCreateSelections(); @@ -59,13 +59,10 @@ public slots: void thresholdChanged(double threshold); void noiseFloorChanged(int t); void fadeoutChanged(int t); - void setActiveSelection(Selection s); private: bool selection_is_moving_left; bool selection_is_moving_right; - Selection *active_selection; - Selections _selections; Canvas *canvas; @@ -77,6 +74,8 @@ private: QColor colSel; QColor colActiveSelBg; QColor colActiveSel; + + Selections &selections; }; #endif/*__DRUMGIZMO_CANVASTOOLSELECTIONS_H__*/ -- cgit v1.2.3