[vlmc-devel] main.qml: Fx button for the master output

Yikai Lu git at videolan.org
Tue Aug 16 03:36:58 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Aug 15 17:47:17 2016 -0500| [9f9b0d4ffb4a7d6d851c990a0a30c867d87b8be3] | committer: Yikai Lu

main.qml: Fx button for the master output

> https://code.videolan.org/videolan/vlmc/commit/9f9b0d4ffb4a7d6d851c990a0a30c867d87b8be3
---

 src/Gui/timeline/main.qml     | 11 +++++++++++
 src/Workflow/MainWorkflow.cpp |  9 +++++++++
 src/Workflow/MainWorkflow.h   |  1 +
 3 files changed, 21 insertions(+)

diff --git a/src/Gui/timeline/main.qml b/src/Gui/timeline/main.qml
index f8b5749..74145cc 100644
--- a/src/Gui/timeline/main.qml
+++ b/src/Gui/timeline/main.qml
@@ -508,6 +508,17 @@ Rectangle {
                                 selected = false;
                             }
                         }
+
+                        PropertyButton {
+                            id: fxButton
+                            text: "Fx"
+                            selected: false
+
+                            onPressed: {
+                                workflow.showEffectStack();
+                                selected = false;
+                            }
+                        }
                     }
                 }
             }
diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index b52eca7..8b3b9ca 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -141,6 +141,15 @@ MainWorkflow::setFps( double fps )
 }
 
 void
+MainWorkflow::showEffectStack()
+{
+#ifdef HAVE_GUI
+    auto w = new EffectStack( m_sequenceWorkflow->input() );
+    w->show();
+#endif
+}
+
+void
 MainWorkflow::showEffectStack( quint32 trackId )
 {
 #ifdef HAVE_GUI
diff --git a/src/Workflow/MainWorkflow.h b/src/Workflow/MainWorkflow.h
index eeb15ba..6d8429c 100644
--- a/src/Workflow/MainWorkflow.h
+++ b/src/Workflow/MainWorkflow.h
@@ -209,6 +209,7 @@ class   MainWorkflow : public QObject
         // FIXME: We can't use #ifdef HAVE_GUI here because qml files can't find them
         //        You'll get:
         //        TypeError: Property 'showEffectStack' of object MainWorkflow is not a function
+        void                            showEffectStack();
         void                            showEffectStack( quint32 trackId );
         void                            showEffectStack( const QString& uuid );
 



More information about the Vlmc-devel mailing list