Commit 75c86db7 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

* Qt4: added network and disk UIs to Open

Still not functionnal and ugly code.
parent 4b9be2f7
...@@ -51,29 +51,56 @@ QString FileOpenPanel::getUpdatedMRL() ...@@ -51,29 +51,56 @@ QString FileOpenPanel::getUpdatedMRL()
return ui.fileInput->currentText(); return ui.fileInput->currentText();
} }
/************************************************************************** /**************************************************************************
* Net open * Disk open
**************************************************************************/ **************************************************************************/
#if 0 DiskOpenPanel::DiskOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
OpenPanel( _parent, _p_intf ) OpenPanel( _parent, _p_intf )
{ {
ui.setupUi( this ); 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() void NetOpenPanel::sendUpdate()
{ {
QString *mrl = new QString(); QString *mrl = new QString();
QString *cache = new QString(); QString *cache = new QString();
getUpdatedMRL( mrl, cache );, getUpdatedMRL( mrl, cache );,
emit dataUpdated( mrl, cache ); emit dataUpdated( mrl, cache );
}*/
QString NetOpenPanel::getUpdatedMRL()
{
// return ui.NetInput->currentText();
return NULL;
} }
#endif
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include <QWidget> #include <QWidget>
#include <QString> #include <QString>
#include "ui/open_file.h" #include "ui/open_file.h"
#include "ui/open_disk.h"
#include "ui/open_net.h"
class OpenPanel: public QWidget class OpenPanel: public QWidget
{ {
...@@ -62,4 +64,38 @@ signals: ...@@ -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 #endif
...@@ -39,7 +39,11 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -39,7 +39,11 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
setWindowTitle( _("Open" ) ); setWindowTitle( _("Open" ) );
ui.setupUi( this ); ui.setupUi( this );
fileOpenPanel = new FileOpenPanel(this , _p_intf ); 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() OpenDialog::~OpenDialog()
......
...@@ -52,6 +52,8 @@ private: ...@@ -52,6 +52,8 @@ private:
input_thread_t *p_input; input_thread_t *p_input;
Ui::Open ui; Ui::Open ui;
FileOpenPanel *fileOpenPanel; FileOpenPanel *fileOpenPanel;
NetOpenPanel *netOpenPanel;
DiskOpenPanel *diskOpenPanel;
public slots: public slots:
void cancel(); void cancel();
void ok(); void ok();
......
<ui version="4.0" > <ui version="4.0" >
<author>Jean-Baptiste Kempf</author> <author>Jean-Baptiste Kempf</author>
<class>OpenNetwork</class> <class>OpenNet</class>
<widget class="QWidget" name="OpenNetwork" > <widget class="QWidget" name="OpenNetwork" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment