]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/sout.hpp
Qt: includes barrier fix.
[vlc] / modules / gui / qt4 / dialogs / sout.hpp
index 1518c55ccb148a5fbe0959694c4deebcf7a955b8..1aade2983e904ddffa910f84ea1464b667f2f3bd 100644 (file)
@@ -21,8 +21,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef _SOUT_DIALOG_H_
-#define _SOUT_DIALOG_H_
+#ifndef QVLC_SOUT_DIALOG_H_
+#define QVLC_SOUT_DIALOG_H_ 1
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -34,6 +34,7 @@
 #include "util/qvlcframe.hpp"
 
 class QPushButton;
+class QToolButton;
 class QCheckBox;
 class QGridLayout;
 class QTextEdit;
@@ -41,7 +42,7 @@ class QTextEdit;
 class SoutMrl
 {
 public:
-    SoutMrl( const QString head = "")
+    SoutMrl( const QString& head = "")
     {
         mrl = head;
         b_first = true;
@@ -53,7 +54,7 @@ public:
         return mrl;
     }
 
-    void begin( QString module )
+    void begin( const QString& module )
     {
         if( !b_first )
             mrl += ":";
@@ -67,7 +68,7 @@ public:
         if( b_has_bracket )
             mrl += "}";
     }
-    void option( const QString option, const QString value = "" )
+    void option( const QString& option, const QString& value = "" )
     {
         if( !b_has_bracket )
             mrl += "{";
@@ -82,21 +83,21 @@ public:
             char *psz = config_StringEscape( qtu(value) );
             if( psz )
             {
-                mrl += "=\"" + qfu( psz ) + "\"";
+                mrl += "=" + qfu( psz );
                 free( psz );
             }
         }
     }
-    void option( const QString name, const int i_value, const int i_precision = 10 )
+    void option( const QString& name, const int i_value, const int i_precision = 10 )
     {
         option( name, QString::number( i_value, i_precision ) );
     }
-    void option( const QString name, const double f_value )
+    void option( const QString& name, const double f_value )
     {
         option( name, QString::number( f_value ) );
     }
 
-    void option( const QString name, const QString base, const int i_value, const int i_precision = 10 )
+    void option( const QString& name, const QString& base, const int i_value, const int i_precision = 10 )
     {
         option( name, base + ":" + QString::number( i_value, i_precision ) );
     }
@@ -113,16 +114,14 @@ class SoutDialog : public QVLCDialog
     Q_OBJECT;
 public:
     static SoutDialog* getInstance( QWidget *parent, intf_thread_t *p_intf,
-                                    bool transcode_only )
+                                    QString mrl = "" )
     {
         if( !instance )
-            instance = new SoutDialog( parent, p_intf, transcode_only );
+            instance = new SoutDialog( parent, p_intf, mrl );
         else
         {
             /* Recenter the dialog on the parent */
             instance->setParent( parent, Qt::Dialog );
-            instance->b_transcode_only = transcode_only;
-            instance->toggleSout();
         }
         return instance;
     }
@@ -134,11 +133,11 @@ public:
 private:
     Ui::Sout ui;
     static SoutDialog *instance;
-    SoutDialog( QWidget* parent, intf_thread_t *,
-                bool _transcode_only = false );
-    QPushButton *okButton;
+    SoutDialog( QWidget* parent, intf_thread_t *, QString mrl );
+
     QString mrl;
-    bool b_transcode_only;
+    QPushButton *okButton;
+    QToolButton *closeTabButton;
 
 public slots:
     void updateMRL();
@@ -146,12 +145,11 @@ public slots:
 private slots:
     void ok();
     void cancel();
-    void toggleSout();
-    void setOptions();
-    void fileBrowse();
-    void setRawOptions( bool );
-    void changeUDPandRTPmess( bool );
-    void RTPtoggled( bool );
+    void next();
+    void prev();
+    void closeTab();
+    void tabChanged( int );
+    void addDest();
 };
 
 #endif