* Qt4: added network and disk UIs to Open
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 20 Nov 2006 01:52:35 +0000 (01:52 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 20 Nov 2006 01:52:35 +0000 (01:52 +0000)
Still not functionnal and ugly code.

modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.hpp
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.hpp
modules/gui/qt4/ui/open_net.ui

index 8167d15..0e52a56 100644 (file)
@@ -51,29 +51,56 @@ QString FileOpenPanel::getUpdatedMRL()
     return ui.fileInput->currentText();
 }
 
+
 /**************************************************************************
- * Net open
+ * Disk open
  **************************************************************************/
-#if 0
-NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
+DiskOpenPanel::DiskOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
                                 OpenPanel( _parent, _p_intf )
 {
     ui.setupUi( this );
 }
 
-NetOpenPanel::~NetOpenPanel()
+DiskOpenPanel::~DiskOpenPanel()
+{}
+
+void DiskOpenPanel::sendUpdate()
 {}
 
-QString NetOpenPanel::getUpdatedMRL( )
+QString DiskOpenPanel::getUpdatedMRL()
 {
+    //return ui.DiskInput->currentText();
+    return NULL;
+}
+
+
 
+/**************************************************************************
+ * Net open
+ **************************************************************************/
+NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
+                                OpenPanel( _parent, _p_intf )
+{
+    ui.setupUi( this );
 }
 
+NetOpenPanel::~NetOpenPanel()
+{}
+
+void NetOpenPanel::sendUpdate()
+{}
+/*
 void NetOpenPanel::sendUpdate()
 {
     QString *mrl = new QString();
     QString *cache = new QString();
     getUpdatedMRL( mrl, cache );,
     emit dataUpdated( mrl, cache );
+}*/
+
+QString NetOpenPanel::getUpdatedMRL()
+{
+//  return ui.NetInput->currentText();
+    return NULL;
 }
-#endif
+
index ddb41dc..37e3a74 100644 (file)
@@ -29,6 +29,8 @@
 #include <QWidget>
 #include <QString>
 #include "ui/open_file.h"
+#include "ui/open_disk.h"
+#include "ui/open_net.h"
 
 class OpenPanel: public QWidget
 {
@@ -62,4 +64,38 @@ signals:
 
 };
 
+class NetOpenPanel: public OpenPanel
+{
+    Q_OBJECT;
+public:
+    NetOpenPanel( QWidget *, intf_thread_t * );
+    virtual ~NetOpenPanel();
+    virtual QString getUpdatedMRL();
+private:
+    Ui::OpenNet ui;
+public slots:
+    virtual void sendUpdate() ;
+signals:
+    void dataUpdated( QString, QString ) ;
+
+};
+
+class DiskOpenPanel: public OpenPanel
+{
+    Q_OBJECT;
+public:
+    DiskOpenPanel( QWidget *, intf_thread_t * );
+    virtual ~DiskOpenPanel();
+    virtual QString getUpdatedMRL();
+private:
+    Ui::OpenDisk ui;
+public slots:
+    virtual void sendUpdate() ;
+signals:
+    void dataUpdated( QString, QString ) ;
+
+};
+
+
+
 #endif
index 508d128..507af80 100644 (file)
@@ -39,7 +39,11 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
     setWindowTitle( _("Open" ) );
     ui.setupUi( this );
     fileOpenPanel = new FileOpenPanel(this , _p_intf );
-    ui.Tab->addTab(fileOpenPanel, "Test");
+    diskOpenPanel = new DiskOpenPanel(this , _p_intf );
+    netOpenPanel = new NetOpenPanel(this , _p_intf );
+    ui.Tab->addTab(fileOpenPanel, "File");
+    ui.Tab->addTab(diskOpenPanel, "Disk");
+    ui.Tab->addTab(netOpenPanel, "Network");
 }
 
 OpenDialog::~OpenDialog()
index 58c59e8..287d708 100644 (file)
@@ -52,6 +52,8 @@ private:
     input_thread_t *p_input;
     Ui::Open ui;
     FileOpenPanel *fileOpenPanel;
+    NetOpenPanel *netOpenPanel;
+    DiskOpenPanel *diskOpenPanel;
 public slots:
     void cancel();
     void ok();
index d4557b6..7801108 100644 (file)
@@ -1,6 +1,6 @@
 <ui version="4.0" >
  <author>Jean-Baptiste Kempf</author>
- <class>OpenNetwork</class>
+ <class>OpenNet</class>
  <widget class="QWidget" name="OpenNetwork" >
   <property name="geometry" >
    <rect>