/*****************************************************************************
* open.hpp : Panels for the open dialogs
****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright (C) 2007 Société des arts technologiques
+ * Copyright (C) 2007 Savoir-faire Linux
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
- * Jean-Baptiste Kempf <jb@videolan.org>
+ * Jean-Baptiste Kempf <jb@videolan.org>
+ * Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define _OPENPANELS_H_
#include <vlc/vlc.h>
-#include <QWidget>
-#include <QString>
+
+#include <QFileDialog>
+
#include "ui/open_file.h"
#include "ui/open_disk.h"
#include "ui/open_net.h"
+#include "ui/open_capture.h"
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#define setSpinBoxFreq( spinbox ){ spinbox->setRange ( 0, INT_MAX ); \
+ spinbox->setAccelerated( true ); }
+
+enum
+{
+ V4L_DEVICE,
+ V4L2_DEVICE,
+ PVR_DEVICE,
+ DVB_DEVICE,
+ BDA_DEVICE,
+ DSHOW_DEVICE,
+ SCREEN_DEVICE,
+ JACK_DEVICE
+};
+
+class QWidget;
+class QLineEdit;
+class QString;
class OpenPanel: public QWidget
{
{
p_intf = _p_intf;
}
- virtual ~OpenPanel();
- virtual QString getUpdatedMRL() = 0;
-private:
+ virtual ~OpenPanel() {};
+ virtual void clear() = 0;
+protected:
intf_thread_t *p_intf;
public slots:
- virtual void sendUpdate() = 0;
+ virtual void updateMRL() = 0;
+signals:
+ void mrlUpdated( QString );
+ void methodChanged( 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();
};
class FileOpenPanel: public OpenPanel
public:
FileOpenPanel( QWidget *, intf_thread_t * );
virtual ~FileOpenPanel();
- virtual QString getUpdatedMRL();
- void clear();
+ virtual void clear() ;
+ virtual void accept() ;
private:
Ui::OpenFile ui;
- QStringList browse();
- void updateSubsMRL();
+ QStringList browse( QString );
+ FileOpenBox *dialogBox;
+ QLineEdit *lineFileEdit;
+ QStringList fileCompleteList ;
public slots:
- virtual void sendUpdate() ;
- void toggleExtraAudio() ;
- void updateMRL();
- void browseFile();
+ virtual void updateMRL();
+private slots:
void browseFileSub();
- void browseFileAudio();
-signals:
- void mrlUpdated( QString ) ;
+ void toggleSubtitleFrame();
};
class NetOpenPanel: public OpenPanel
public:
NetOpenPanel( QWidget *, intf_thread_t * );
virtual ~NetOpenPanel();
- virtual QString getUpdatedMRL();
+ virtual void clear() ;
private:
- Ui::OpenNet ui;
+ Ui::OpenNetwork ui;
public slots:
- virtual void sendUpdate() ;
-signals:
- void dataUpdated( QString, QString ) ;
-
+ virtual void updateMRL();
+private slots:
+ void updateProtocol( int );
};
-class DiskOpenPanel: public OpenPanel
+class DiscOpenPanel: public OpenPanel
{
Q_OBJECT;
public:
- DiskOpenPanel( QWidget *, intf_thread_t * );
- virtual ~DiskOpenPanel();
- virtual QString getUpdatedMRL();
+ DiscOpenPanel( QWidget *, intf_thread_t * );
+ virtual ~DiscOpenPanel();
+ virtual void clear() ;
+ virtual void accept() ;
private:
Ui::OpenDisk ui;
+ char *psz_dvddiscpath, *psz_vcddiscpath, *psz_cddadiscpath;
+ bool b_firstdvd, b_firstvcd, b_firstcdda;
public slots:
- virtual void sendUpdate() ;
-signals:
- void dataUpdated( QString, QString ) ;
-
+ virtual void updateMRL() ;
+private slots:
+ void browseDevice();
+ void updateButtons() ;
};
+class CaptureOpenPanel: public OpenPanel
+{
+ Q_OBJECT;
+public:
+ CaptureOpenPanel( QWidget *, intf_thread_t * );
+ virtual ~CaptureOpenPanel();
+ virtual void clear() ;
+private:
+ Ui::OpenCapture ui;
+ QRadioButton *dvbs, *dvbt, *dvbc;
+ QRadioButton *bdas, *bdat, *bdac;
+ QSpinBox *v4lFreq, *pvrFreq, *pvrBitr;
+ QLineEdit *v4lVideoDevice, *v4lAudioDevice;
+ QLineEdit *v4l2VideoDevice, *v4l2AudioDevice;
+ QLineEdit *pvrDevice, *pvrRadioDevice;
+ QComboBox *v4lNormBox, *v4l2StdBox, *pvrNormBox, *bdaBandBox;
+ QSpinBox *dvbCard, *dvbFreq, *dvbSrate;
+ QSpinBox *bdaCard, *bdaFreq, *bdaSrate;
+ QSpinBox *jackChannels, *jackCaching;
+ QCheckBox *jackPace, *jackConnect;
+ QLineEdit *jackPortsSelected;
+
+ QLabel *bdaSrateLabel, *bdaBandLabel;
+
+public slots:
+ virtual void updateMRL();
+private slots:
+ void updateButtons();
+};
#endif