[vlmc-devel] commit: TrackControls: Adding a Fx button. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Mon Aug 30 00:55:27 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Aug 29 22:36:27 2010 +0200| [376e3d750918411426b849451637c8573c3b6f22] | committer: Hugo Beauzée-Luyssen 

TrackControls: Adding a Fx button.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=376e3d750918411426b849451637c8573c3b6f22
---

 resources.qrc                       |    1 +
 resources/images/fx.png             |  Bin 0 -> 541 bytes
 src/Gui/widgets/TrackControls.cpp   |    3 ++
 src/Gui/widgets/ui/TrackControls.ui |   47 ++++++++++++++++++++++++++++++++--
 4 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/resources.qrc b/resources.qrc
index 344caf2..65a86f6 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -49,6 +49,7 @@
         <file alias="close">resources/images/close.png</file>
         <file alias="help">resources/images/help.png</file>
         <file alias="about">resources/images/about.png</file>
+        <file alias="fx">resources/images/fx.png</file>
     </qresource>
     <qresource prefix="/text">
         <file>AUTHORS</file>
diff --git a/resources/images/fx.png b/resources/images/fx.png
new file mode 100644
index 0000000..6179c94
Binary files /dev/null and b/resources/images/fx.png differ
diff --git a/src/Gui/widgets/TrackControls.cpp b/src/Gui/widgets/TrackControls.cpp
index e3a1bcb..c35140f 100644
--- a/src/Gui/widgets/TrackControls.cpp
+++ b/src/Gui/widgets/TrackControls.cpp
@@ -40,7 +40,10 @@ TrackControls::TrackControls( GraphicsTrack* track, QWidget *parent ) :
     else if ( track->mediaType() == Workflow::AudioTrack &&
                 s.contains( "audio" + QString::number( track->trackNumber() ) ) )
         m_title = s.value( "audio" + QString::number( track->trackNumber() ) ).toString();
+
     m_ui->setupUi( this );
+    if ( track->mediaType() != Workflow::VideoTrack )
+        m_ui->fxButton->hide();
     setTrackDisabled( !m_track->isEnabled() );
     connect( m_ui->disableButton, SIGNAL( clicked(bool) ),
              this, SLOT( setTrackDisabled(bool) ) );
diff --git a/src/Gui/widgets/ui/TrackControls.ui b/src/Gui/widgets/ui/TrackControls.ui
index f115c1a..6624dab 100644
--- a/src/Gui/widgets/ui/TrackControls.ui
+++ b/src/Gui/widgets/ui/TrackControls.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>104</width>
-    <height>22</height>
+    <width>131</width>
+    <height>29</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -52,6 +52,45 @@
     </widget>
    </item>
    <item>
+    <widget class="QPushButton" name="fxButton">
+     <property name="maximumSize">
+      <size>
+       <width>22</width>
+       <height>22</height>
+      </size>
+     </property>
+     <property name="icon">
+      <iconset resource="../../../../resources.qrc">
+       <normaloff>:/images/fx</normaloff>:/images/fx</iconset>
+     </property>
+     <property name="iconSize">
+      <size>
+       <width>20</width>
+       <height>20</height>
+      </size>
+     </property>
+     <property name="checkable">
+      <bool>false</bool>
+     </property>
+     <property name="flat">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <spacer name="horizontalSpacer">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>10</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
     <widget class="ExtendedLabel" name="trackLabel">
      <property name="text">
       <string>TextLabel</string>
@@ -67,6 +106,8 @@
    <header>ExtendedLabel.h</header>
   </customwidget>
  </customwidgets>
- <resources/>
+ <resources>
+  <include location="../../../../resources.qrc"/>
+ </resources>
  <connections/>
 </ui>



More information about the Vlmc-devel mailing list