[vlmc-devel] MainWindow: Rework the way tool change is propagated

Hugo Beauzée-Luyssen git at videolan.org
Sun Oct 30 22:36:41 CET 2016


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Oct 30 19:19:27 2016 +0100| [f15cd463860d30329dbdbc84989e438e3f6533d1] | committer: Hugo Beauzée-Luyssen

MainWindow: Rework the way tool change is propagated

> https://code.videolan.org/videolan/vlmc/commit/f15cd463860d30329dbdbc84989e438e3f6533d1
---

 src/Gui/MainWindow.cpp | 4 ++--
 src/Gui/MainWindow.h   | 3 ++-
 src/vlmc.h             | 6 ------
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index ea5acb3..2c8039d 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -789,9 +789,9 @@ void
 MainWindow::toolButtonClicked( QAction *action )
 {
     if ( action == m_ui.actionSelection_mode )
-        emit toolChanged( TOOL_DEFAULT );
+        emit selectionToolSelected();
     else if ( action == m_ui.actionCut_mode )
-        emit toolChanged( TOOL_CUT );
+        emit cutToolSelected();
     else
         vlmcCritical() << "Unknown tool. This should not happen !";
 }
diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h
index c5a01c5..c5349d4 100644
--- a/src/Gui/MainWindow.h
+++ b/src/Gui/MainWindow.h
@@ -165,7 +165,8 @@ private slots:
     void                    onProjectSaved();
 
 signals:
-    void                    toolChanged( ToolButtons );
+    void                    selectionToolSelected();
+    void                    cutToolSelected();
     void                    scaleChanged( quint32 scaleLevel );
 };
 
diff --git a/src/vlmc.h b/src/vlmc.h
index 7f154d8..c606e40 100644
--- a/src/vlmc.h
+++ b/src/vlmc.h
@@ -43,10 +43,4 @@
 #define SleepS( x ) sleep( x )
 #endif
 
-enum ToolButtons
-{
-    TOOL_DEFAULT,
-    TOOL_CUT,
-};
-
 #endif // VLMC_H



More information about the Vlmc-devel mailing list