]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/open_panels.hpp
Added Qt::Tool flag on the fullscreen widget.
[vlc] / modules / gui / qt4 / components / open_panels.hpp
index 34a8c018abfb464ef632e919ce8e18ce651922e4..4d2d05b0a24fa16e7562ab0223f25a3e4157eddc 100644 (file)
 #define setSpinBoxFreq( spinbox ){ spinbox->setRange ( 0, INT_MAX ); \
     spinbox->setAccelerated( true ); }
 
-enum
-{
-    NO_PROTO,
-    HTTP_PROTO,
-    HTTPS_PROTO,
-    MMS_PROTO,
-    FTP_PROTO,
-    RTSP_PROTO,
-    RTP_PROTO,
-    UDP_PROTO,
-    RTMP_PROTO
-};
-
 enum
 {
     V4L_DEVICE,
@@ -78,7 +65,7 @@ class QStringListModel;
 
 class OpenPanel: public QWidget
 {
-    Q_OBJECT;
+    Q_OBJECT
 public:
     OpenPanel( QWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
     {
@@ -91,32 +78,59 @@ protected:
 public slots:
     virtual void updateMRL() = 0;
 signals:
-    void mrlUpdated( QStringList, QString );
-    void methodChanged( QString method );
+    void mrlUpdated( const QStringList&, const QString& );
+    void methodChanged( const QString& method );
+};
+
+class FileOpenBox: public QFileDialog
+{
+    Q_OBJECT
+public:
+    FileOpenBox( QWidget *parent, const QString &caption,
+                 const QString &directory, const QString &filter ):
+                QFileDialog( parent, caption, directory, filter ) {}
+public slots:
+    void accept(){}
+    void reject(){}
 };
 
+
 class FileOpenPanel: public OpenPanel
 {
-    Q_OBJECT;
+    Q_OBJECT
 public:
     FileOpenPanel( QWidget *, intf_thread_t * );
     virtual ~FileOpenPanel();
     virtual void clear() ;
     virtual void accept() ;
+protected:
+    bool eventFilter(QObject *obj, QEvent *event)
+    {
+        if( event->type() == QEvent::Hide ||
+            event->type() == QEvent::HideToParent )
+        {
+            event->accept();
+            return true;
+        }
+        return false;
+    }
 private:
     Ui::OpenFile ui;
+    FileOpenBox *dialogBox;
+    void BuildOldPanel();
 public slots:
     virtual void updateMRL();
 private slots:
     void browseFileSub();
     void browseFile();
-    void deleteFile();
+    void removeFile();
+    void updateButtons();
     void toggleSubtitleFrame( bool );
 };
 
 class NetOpenPanel: public OpenPanel
 {
-    Q_OBJECT;
+    Q_OBJECT
 public:
     NetOpenPanel( QWidget *, intf_thread_t * );
     virtual ~NetOpenPanel();
@@ -127,13 +141,12 @@ private:
 public slots:
     virtual void updateMRL();
 private slots:
-    void updateProtocol( int );
     void updateCompleter();
 };
 
 class DiscOpenPanel: public OpenPanel
 {
-    Q_OBJECT;
+    Q_OBJECT
 public:
     DiscOpenPanel( QWidget *, intf_thread_t * );
     virtual ~DiscOpenPanel();
@@ -154,7 +167,7 @@ private slots:
 
 class CaptureOpenPanel: public OpenPanel
 {
-    Q_OBJECT;
+    Q_OBJECT
 public:
     CaptureOpenPanel( QWidget *, intf_thread_t * );
     virtual ~CaptureOpenPanel();
@@ -174,17 +187,18 @@ private:
     QLineEdit *dshowVSizeLine;
 #else
     QRadioButton *dvbs, *dvbt, *dvbc;
+    QLabel *dvbBandLabel, *dvbSrateLabel;
     QSpinBox  *v4lFreq, *pvrFreq, *pvrBitr;
     QLineEdit *v4lVideoDevice, *v4lAudioDevice;
     QLineEdit *v4l2VideoDevice, *v4l2AudioDevice;
     QLineEdit *pvrDevice, *pvrRadioDevice;
-    QComboBox *v4lNormBox, *v4l2StdBox, *pvrNormBox;
+    QComboBox *v4lNormBox, *v4l2StdBox, *pvrNormBox, *dvbBandBox;
     QSpinBox *dvbCard, *dvbFreq, *dvbSrate;
     QSpinBox *jackChannels, *jackCaching;
     QCheckBox *jackPace, *jackConnect;
     QLineEdit *jackPortsSelected;
 #endif
-    QSpinBox *screenFPS;
+    QDoubleSpinBox *screenFPS;
 
 public slots:
     virtual void updateMRL();