X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fcomponents%2Fopen_panels.hpp;h=bef2c8c6a3ea7259bf138fb5a3a5acd9e0d528ea;hb=2a100fcd186304e600d6d896325855836fa899e6;hp=0fc6be3d0dd7b2aa0bca73991ed50319f892b23f;hpb=28f24bd1521c58a64548cb42aa542b3d13ee1045;p=vlc diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp index 0fc6be3d0d..bef2c8c6a3 100644 --- a/modules/gui/qt4/components/open_panels.hpp +++ b/modules/gui/qt4/components/open_panels.hpp @@ -46,19 +46,6 @@ #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, @@ -75,10 +62,11 @@ class QWidget; class QLineEdit; class QString; class QStringListModel; +class QEvent; class OpenPanel: public QWidget { - Q_OBJECT; + Q_OBJECT public: OpenPanel( QWidget *p, intf_thread_t *_p_intf ) : QWidget( p ) { @@ -97,7 +85,7 @@ signals: class FileOpenBox: public QFileDialog { - Q_OBJECT; + Q_OBJECT public: FileOpenBox( QWidget *parent, const QString &caption, const QString &directory, const QString &filter ): @@ -110,7 +98,7 @@ public slots: class FileOpenPanel: public OpenPanel { - Q_OBJECT; + Q_OBJECT public: FileOpenPanel( QWidget *, intf_thread_t * ); virtual ~FileOpenPanel(); @@ -122,12 +110,15 @@ protected: if( event->type() == QEvent::Hide || event->type() == QEvent::HideToParent ) { - msg_Warn( p_intf, "here" ); event->accept(); return true; } return false; } + virtual void dropEvent( QDropEvent *); + virtual void dragEnterEvent( QDragEnterEvent * ); + virtual void dragMoveEvent( QDragMoveEvent * ); + virtual void dragLeaveEvent( QDragLeaveEvent * ); private: Ui::OpenFile ui; FileOpenBox *dialogBox; @@ -144,7 +135,7 @@ private slots: class NetOpenPanel: public OpenPanel { - Q_OBJECT; + Q_OBJECT public: NetOpenPanel( QWidget *, intf_thread_t * ); virtual ~NetOpenPanel(); @@ -155,13 +146,28 @@ private: public slots: virtual void updateMRL(); private slots: - void updateProtocol( int ); - void updateCompleter(); + void updateModel(); +}; + +class UrlValidator : public QValidator +{ + Q_OBJECT +public: + UrlValidator( QObject *parent ) : QValidator( parent ) { } + void fixup( QString& ) const; + QValidator::State validate( QString&, int& ) const; }; class DiscOpenPanel: public OpenPanel { - Q_OBJECT; + Q_OBJECT + enum DiscType + { + None, + Dvd, + Vcd, + Cdda + }; public: DiscOpenPanel( QWidget *, intf_thread_t * ); virtual ~DiscOpenPanel(); @@ -170,7 +176,7 @@ public: private: Ui::OpenDisk ui; char *psz_dvddiscpath, *psz_vcddiscpath, *psz_cddadiscpath; - bool b_firstdvd, b_firstvcd, b_firstcdda; + DiscType m_discType; public slots: virtual void updateMRL() ; private slots: @@ -182,7 +188,7 @@ private slots: class CaptureOpenPanel: public OpenPanel { - Q_OBJECT; + Q_OBJECT public: CaptureOpenPanel( QWidget *, intf_thread_t * ); virtual ~CaptureOpenPanel(); @@ -194,7 +200,7 @@ private: QString advMRL; QDialog *adv; #ifdef WIN32 - QRadioButton *bdas, *bdat, *bdac, *bdaa; + QRadioButton *bdas, *bdat, *bdac, *bdaa, *bdaq; QSpinBox *bdaCard, *bdaFreq, *bdaSrate; QLabel *bdaSrateLabel, *bdaBandLabel; QComboBox *bdaBandBox; @@ -213,7 +219,7 @@ private: QCheckBox *jackPace, *jackConnect; QLineEdit *jackPortsSelected; #endif - QSpinBox *screenFPS; + QDoubleSpinBox *screenFPS; public slots: virtual void updateMRL();