Qt4 - Sout: Hide the UDP output options by default, but provide an easy way to activa...
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 8 Sep 2007 15:11:58 +0000 (15:11 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 8 Sep 2007 15:11:58 +0000 (15:11 +0000)
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/ui/sout.ui

index 15b3194..c7e18b9 100644 (file)
@@ -41,6 +41,8 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
     /* UI stuff */
     ui.setupUi( this );
 
+    ui.UDPEdit->hide(); ui.UDPLabel->hide();
+    ui.UDPPort->hide(); ui.UDPPortLabel->hide();
 /* ADD HERE for new profiles */
 #define ADD_PROFILE( name, shortname ) ui.profileBox->addItem( qtr( name ), QVariant( QString( shortname ) ) );
     ADD_PROFILE( "Custom" , "Custom" )
index 04165ad..d8f4fc5 100644 (file)
         </item>
         <item row="5" column="0" >
          <widget class="QCheckBox" name="UDPOutput" >
+          <property name="toolTip" >
+           <string>_("Using this option is not recommended in most of the cases.")</string>
+          </property>
           <property name="text" >
-           <string>UDP</string>
+           <string>_("Prefer UDP over RTP")</string>
           </property>
          </widget>
         </item>
         <item row="5" column="1" >
          <widget class="QLabel" name="UDPLabel" >
-          <property name="enabled" >
-           <bool>false</bool>
-          </property>
           <property name="text" >
            <string>_("Address")</string>
           </property>
          </widget>
         </item>
         <item row="5" column="2" >
-         <widget class="QLineEdit" name="UDPEdit" >
-          <property name="enabled" >
-           <bool>false</bool>
-          </property>
-         </widget>
+         <widget class="QLineEdit" name="UDPEdit" />
         </item>
         <item row="5" column="3" >
          <widget class="QLabel" name="UDPPortLabel" >
-          <property name="enabled" >
-           <bool>false</bool>
-          </property>
           <property name="text" >
            <string>_("Port")</string>
           </property>
         </item>
         <item row="5" column="4" >
          <widget class="QSpinBox" name="UDPPort" >
-          <property name="enabled" >
-           <bool>false</bool>
-          </property>
           <property name="maximumSize" >
            <size>
             <width>90</width>
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>UDPOutput</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>UDPPort</receiver>
+   <slot>setVisible(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>98</x>
+     <y>212</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>493</x>
+     <y>212</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>UDPOutput</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>UDPPortLabel</receiver>
+   <slot>setVisible(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>107</x>
+     <y>212</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>396</x>
+     <y>212</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>UDPOutput</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>UDPLabel</receiver>
+   <slot>setVisible(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>107</x>
+     <y>212</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>241</x>
+     <y>212</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>UDPOutput</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>UDPEdit</receiver>
+   <slot>setVisible(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>107</x>
+     <y>212</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>315</x>
+     <y>212</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
 </ui>