From 75c86db7cdc5a32b337aebbba77f0c9fefba9bd8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Mon, 20 Nov 2006 01:52:35 +0000 Subject: [PATCH] * Qt4: added network and disk UIs to Open Still not functionnal and ugly code. --- modules/gui/qt4/components/open.cpp | 39 ++++++++++++++++++++++++----- modules/gui/qt4/components/open.hpp | 36 ++++++++++++++++++++++++++ modules/gui/qt4/dialogs/open.cpp | 6 ++++- modules/gui/qt4/dialogs/open.hpp | 2 ++ modules/gui/qt4/ui/open_net.ui | 2 +- 5 files changed, 77 insertions(+), 8 deletions(-) diff --git a/modules/gui/qt4/components/open.cpp b/modules/gui/qt4/components/open.cpp index 8167d15fc4..0e52a56528 100644 --- a/modules/gui/qt4/components/open.cpp +++ b/modules/gui/qt4/components/open.cpp @@ -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 + diff --git a/modules/gui/qt4/components/open.hpp b/modules/gui/qt4/components/open.hpp index ddb41dce72..37e3a74764 100644 --- a/modules/gui/qt4/components/open.hpp +++ b/modules/gui/qt4/components/open.hpp @@ -29,6 +29,8 @@ #include #include #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 diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp index 508d12869e..507af80153 100644 --- a/modules/gui/qt4/dialogs/open.cpp +++ b/modules/gui/qt4/dialogs/open.cpp @@ -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() diff --git a/modules/gui/qt4/dialogs/open.hpp b/modules/gui/qt4/dialogs/open.hpp index 58c59e80b2..287d7089a1 100644 --- a/modules/gui/qt4/dialogs/open.hpp +++ b/modules/gui/qt4/dialogs/open.hpp @@ -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(); diff --git a/modules/gui/qt4/ui/open_net.ui b/modules/gui/qt4/ui/open_net.ui index d4557b68b3..7801108fe1 100644 --- a/modules/gui/qt4/ui/open_net.ui +++ b/modules/gui/qt4/ui/open_net.ui @@ -1,6 +1,6 @@ Jean-Baptiste Kempf - OpenNetwork + OpenNet -- 2.39.2