Qt4 - Sout: add a function to toggleVisibility of StreamOut widgets... Yes I will...
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 19 Apr 2007 23:49:01 +0000 (23:49 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 19 Apr 2007 23:49:01 +0000 (23:49 +0000)
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/dialogs/sout.hpp

index f31a1f8..7de7de0 100644 (file)
@@ -110,6 +110,20 @@ void SoutDialog::fileBrowse()
     updateMRL();
 }
 
+void SoutDialog::toggleSout()
+{
+#define TGV(x) { \
+     if( (x->isHidden()) )  \
+        x->show();          \
+     else  x->hide();\
+}
+ TGV( ui.HTTPOutput ) ; TGV( ui.UDPOutput ) ; TGV( ui.MMSHOutput ) ;
+ TGV( ui.HTTPEdit ) ; TGV( ui.UDPEdit ) ; TGV( ui.MMSHEdit ) ;
+ TGV( ui.HTTPLabel ) ; TGV( ui.UDPLabel ) ; TGV( ui.MMSHLabel ) ;
+ TGV( ui.HTTPPortLabel ) ; TGV( ui.UDPPortLabel ) ; TGV( ui.MMSHPortLabel ) ;
+ TGV( ui.HTTPPort ) ; TGV( ui.UDPPort ) ; TGV( ui.MMSHPort ) ;
+}
+
 void SoutDialog::ok()
 {
     mrl = ui.mrlEdit->text();
index f6fa510..eb08a28 100644 (file)
@@ -46,6 +46,7 @@ public slots:
     void cancel();
     void updateMRL();
     void fileBrowse();
+    void toggleSout();
 };
 
 #endif