[vlc-devel] commit: Qt4: change a bit the ui from sout to use the SoutInputBox and etter Sout integration and panel changing . (Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Mar 5 21:20:05 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Mar  5 18:02:57 2009 +0100| [91273f896285e55195814d741d62b07f73f8d318] | committer: Jean-Baptiste Kempf 

Qt4: change a bit the ui from sout to use the SoutInputBox and etter Sout integration and panel changing.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91273f896285e55195814d741d62b07f73f8d318
---

 modules/gui/qt4/components/sout/sout_widgets.cpp |    6 +-
 modules/gui/qt4/components/sout/sout_widgets.hpp |    4 +-
 modules/gui/qt4/dialogs/sout.cpp                 |    8 ++
 modules/gui/qt4/dialogs/sout.hpp                 |    1 +
 modules/gui/qt4/ui/sout.ui                       |  121 ++++++++++++++++------
 5 files changed, 104 insertions(+), 36 deletions(-)

diff --git a/modules/gui/qt4/components/sout/sout_widgets.cpp b/modules/gui/qt4/components/sout/sout_widgets.cpp
index 81557f1..17e1997 100644
--- a/modules/gui/qt4/components/sout/sout_widgets.cpp
+++ b/modules/gui/qt4/components/sout/sout_widgets.cpp
@@ -28,13 +28,13 @@
 #include <QLabel>
 #include <QLineEdit>
 
-SoutInputBox::SoutInputBox( QWidget *_parent ) : QWidget( _parent )
+SoutInputBox::SoutInputBox( QWidget *_parent ) : QGroupBox( _parent )
 {
     /**
      * Source Block
      **/
-    QGroupBox *sourceBox = new QGroupBox( qtr( "Source" ) );
-    QGridLayout *sourceLayout = new QGridLayout( sourceBox );
+    setTitle( qtr( "Source" ) );
+    QGridLayout *sourceLayout = new QGridLayout( this );
 
     QLabel *sourceLabel = new QLabel( qtr( "Source:" ) );
     sourceLayout->addWidget( sourceLabel, 0, 0 );
diff --git a/modules/gui/qt4/components/sout/sout_widgets.hpp b/modules/gui/qt4/components/sout/sout_widgets.hpp
index faeba1d..ccc023a 100644
--- a/modules/gui/qt4/components/sout/sout_widgets.hpp
+++ b/modules/gui/qt4/components/sout/sout_widgets.hpp
@@ -26,11 +26,11 @@
 
 #include "qt4.hpp"
 
-#include <QWidget>
+#include <QGroupBox>
 
 #include "util/qvlcframe.hpp"
 
-class SoutInputBox : public QWidget
+class SoutInputBox : public QGroupBox
 {
     public:
         SoutInputBox( QWidget *);
diff --git a/modules/gui/qt4/dialogs/sout.cpp b/modules/gui/qt4/dialogs/sout.cpp
index d977191..97d33c0 100644
--- a/modules/gui/qt4/dialogs/sout.cpp
+++ b/modules/gui/qt4/dialogs/sout.cpp
@@ -33,6 +33,7 @@
 
 #include "dialogs/sout.hpp"
 #include "util/qt_dirs.hpp"
+#include "components/sout/sout_widgets.hpp"
 
 #include <QString>
 #include <QFileDialog>
@@ -150,6 +151,13 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf )
     CONNECT( ui.UDPOutput, toggled( bool ), this, changeUDPandRTPmess( bool ) );
     CONNECT( ui.RTPOutput, clicked(bool), this, RTPtoggled( bool ) );
 
+    BUTTONACT( ui.nextButton, next() );
+    BUTTONACT( ui.nextButton2, next() );
+}
+
+void SoutDialog::next()
+{
+    ui.toolBox->setCurrentIndex( ui.toolBox->currentIndex() + 1 );
 }
 
 void SoutDialog::fileBrowse()
diff --git a/modules/gui/qt4/dialogs/sout.hpp b/modules/gui/qt4/dialogs/sout.hpp
index 2be9cf3..2c435ef 100644
--- a/modules/gui/qt4/dialogs/sout.hpp
+++ b/modules/gui/qt4/dialogs/sout.hpp
@@ -146,6 +146,7 @@ private slots:
     void setRawOptions( bool );
     void changeUDPandRTPmess( bool );
     void RTPtoggled( bool );
+    void next();
 };
 
 #endif
diff --git a/modules/gui/qt4/ui/sout.ui b/modules/gui/qt4/ui/sout.ui
index 2f59b85..0b82423 100644
--- a/modules/gui/qt4/ui/sout.ui
+++ b/modules/gui/qt4/ui/sout.ui
@@ -7,8 +7,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>711</width>
-    <height>470</height>
+    <width>715</width>
+    <height>507</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -18,27 +18,77 @@
    <item>
     <widget class="QToolBox" name="toolBox">
      <property name="currentIndex">
-      <number>2</number>
+      <number>0</number>
      </property>
      <widget class="QWidget" name="page">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>697</width>
+        <height>389</height>
+       </rect>
+      </property>
       <attribute name="label">
        <string>_("Source")</string>
       </attribute>
+      <layout class="QGridLayout" name="gridLayout_4">
+       <item row="1" column="0">
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>581</width>
+           <height>321</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="2" column="0">
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>581</width>
+           <height>26</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="2" column="1">
+        <widget class="QPushButton" name="nextButton">
+         <property name="text">
+          <string>_("Next")</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="0" colspan="2">
+        <widget class="SoutInputBox" name="groupBox">
+         <property name="title">
+          <string>GroupBox</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
      </widget>
      <widget class="QWidget" name="page_3">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>708</width>
-        <height>308</height>
+        <width>697</width>
+        <height>389</height>
        </rect>
       </property>
       <attribute name="label">
-       <string notr="true">_("Destination")</string>
+       <string>_("Destination")</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout">
-       <item row="0" column="0">
+       <item row="0" column="0" colspan="2">
         <layout class="QGridLayout" name="_3">
          <item row="0" column="1" colspan="2">
           <widget class="QCheckBox" name="localOutput">
@@ -435,6 +485,26 @@
          </item>
         </layout>
        </item>
+       <item row="1" column="0">
+        <spacer name="horizontalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>581</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="1" column="1">
+        <widget class="QPushButton" name="nextButton2">
+         <property name="text">
+          <string>_("Next")</string>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="page_4">
@@ -442,8 +512,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>693</width>
-        <height>330</height>
+        <width>697</width>
+        <height>389</height>
        </rect>
       </property>
       <attribute name="label">
@@ -555,28 +625,11 @@
     </widget>
    </item>
    <item>
-    <layout class="QHBoxLayout">
-     <item>
-      <spacer>
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QDialogButtonBox" name="acceptButtonBox">
-       <property name="standardButtons">
-        <set>QDialogButtonBox::NoButton</set>
-       </property>
-      </widget>
-     </item>
-    </layout>
+    <widget class="QDialogButtonBox" name="acceptButtonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::NoButton</set>
+     </property>
+    </widget>
    </item>
   </layout>
  </widget>
@@ -587,6 +640,12 @@
    <header>components/sout/profile_selector.hpp</header>
    <container>1</container>
   </customwidget>
+  <customwidget>
+   <class>SoutInputBox</class>
+   <extends>QGroupBox</extends>
+   <header>components/sout/sout_widgets.hpp</header>
+   <container>1</container>
+  </customwidget>
  </customwidgets>
  <resources/>
  <connections/>




More information about the vlc-devel mailing list