]> git.sesse.net Git - vlc/commitdiff
Qt4: change a bit the ui from sout to use the SoutInputBox and etter Sout integration...
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 5 Mar 2009 17:02:57 +0000 (18:02 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 5 Mar 2009 20:05:51 +0000 (21:05 +0100)
modules/gui/qt4/components/sout/sout_widgets.cpp
modules/gui/qt4/components/sout/sout_widgets.hpp
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/dialogs/sout.hpp
modules/gui/qt4/ui/sout.ui

index 81557f18355a3ff0f9be4afd287338ff6b9eb507..17e1997236acedaa5c6343fcd80716bcb00dcd28 100644 (file)
 #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 );
index faeba1d2eebac6bc69ef4426f916d0c5d6b066c1..ccc023adb437058c6181483a1c2a7ff538abf8d3 100644 (file)
 
 #include "qt4.hpp"
 
-#include <QWidget>
+#include <QGroupBox>
 
 #include "util/qvlcframe.hpp"
 
-class SoutInputBox : public QWidget
+class SoutInputBox : public QGroupBox
 {
     public:
         SoutInputBox( QWidget *);
index d97719126fd04048fa20546a48d547a9a23050e5..97d33c015a12f1356ead4cdf12dce95291c307f7 100644 (file)
@@ -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()
index 2be9cf3d9adec1be97ea54aef900beaf925918ff..2c435ef09e5a3b66ae559cb985ededf0e1adffcd 100644 (file)
@@ -146,6 +146,7 @@ private slots:
     void setRawOptions( bool );
     void changeUDPandRTPmess( bool );
     void RTPtoggled( bool );
+    void next();
 };
 
 #endif
index 2f59b853e19de92fe9797cce4f86daf2cd84bca7..0b82423fb7ebeeca45d49dbf1efa5d4f4391ff8e 100644 (file)
@@ -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">
    <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>_(&quot;Source&quot;)</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>_(&quot;Next&quot;)</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">_(&quot;Destination&quot;)</string>
+       <string>_(&quot;Destination&quot;)</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">
          </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>_(&quot;Next&quot;)</string>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="page_4">
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>693</width>
-        <height>330</height>
+        <width>697</width>
+        <height>389</height>
        </rect>
       </property>
       <attribute name="label">
     </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>
    <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/>