X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fdialogs%2Fvlm.hpp;h=6feee5893d16528f295a00f796053d93402c6ff9;hb=c8ab1739f952be53c7dfe9e96eaf309f69cafecf;hp=92f02bd21209e9ee7d88d0c32f010cb51e049938;hpb=5d9c12fbc07dc5e80082ebed7b0d0c17838c5701;p=vlc diff --git a/modules/gui/qt4/dialogs/vlm.hpp b/modules/gui/qt4/dialogs/vlm.hpp index 92f02bd212..6feee5893d 100644 --- a/modules/gui/qt4/dialogs/vlm.hpp +++ b/modules/gui/qt4/dialogs/vlm.hpp @@ -2,7 +2,7 @@ * vlm.hpp : VLM Management **************************************************************************** * Copyright ( C ) 2006 the VideoLAN team - * $Id: vlm.hpp 21875 2007-09-08 16:01:33Z jb $ + * $Id$ * * Authors: Jean-François Massol * Jean-Baptiste Kempf @@ -22,19 +22,21 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#ifndef _VLM_DIALOG_H_ -#define _VLM_DIALOG_H_ +#ifndef QVLC_VLM_DIALOG_H_ +#define QVLC_VLM_DIALOG_H_ 1 +#ifdef HAVE_CONFIG_H # include "config.h" +#endif -#include +#ifdef ENABLE_VLM #include -#ifdef ENABLE_VLM - #include "ui/vlm.h" #include "util/qvlcframe.hpp" +#include "util/singleton.hpp" +#include enum{ QVLM_Broadcast, @@ -66,25 +68,23 @@ class VLMAWidget; class VLMWrapper; -class VLMDialog : public QVLCDialog +class VLMDialog : public QVLCDialog, public Singleton { - Q_OBJECT; + Q_OBJECT + public: - static VLMDialog * getInstance( intf_thread_t *p_intf ) - { - if( !instance) - instance = new VLMDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf ); - return instance; - }; - virtual ~VLMDialog(); + void toggleVisible(); VLMWrapper *vlmWrapper; vlm_t *p_vlm; private: - VLMDialog( QWidget *, intf_thread_t * ); - static VLMDialog *instance; + VLMDialog( intf_thread_t * ); + virtual ~VLMDialog(); + Ui::Vlm ui; + QString inputOptions; + QList vlmItems; int currentIndex; @@ -94,7 +94,8 @@ private: QComboBox *mediatype; QDateTimeEdit *time, *date, *repeatTime; QSpinBox *scherepeatnumber, *repeatDays; - bool isNameGenuine( QString ); + bool isNameGenuine( const QString& ); + void mediasPopulator(); public slots: void removeVLMItem( VLMAWidget * ); void startModifyVLMItem( VLMAWidget * ); @@ -106,6 +107,10 @@ private slots: void selectVLMItem( int ); void selectInput(); void selectOutput(); + bool exportVLMConf(); + bool importVLMConf(); + + friend class Singleton; }; class VLMWrapper @@ -114,19 +119,31 @@ public: VLMWrapper( vlm_t * ); virtual ~VLMWrapper(); - static void AddBroadcast( const QString, const QString, const QString, - bool b_enabled = true, - bool b_loop = false ); - static void EditBroadcast( const QString, const QString, const QString, - bool b_enabled = true, - bool b_loop = false ); - static void AddVod( const QString, const QString, const QString, - bool b_enabled = true, QString mux = "" ); - static void EditVod( const QString, const QString, const QString, - bool b_enabled = true, QString mux = "" ); - - static void ControlBroadcast( const QString, int, unsigned int seek = 0 ); - static void EnableItem( const QString, bool ); + static void AddBroadcast( const QString&, const QString&, + const QString&, const QString&, + bool b_enabled = true, bool b_loop = false ); + static void EditBroadcast( const QString&, const QString&, + const QString&, const QString&, + bool b_enabled = true, bool b_loop = false ); + static void EditSchedule( const QString&, const QString&, + const QString&, const QString&, + QDateTime _schetime, QDateTime _schedate, + int _scherepeatnumber, int _repeatDays, + bool b_enabled = true, const QString& mux = "" ); + static void AddVod( const QString&, const QString&, + const QString&, const QString&, + bool b_enabled = true, const QString& mux = "" ); + static void EditVod( const QString&, const QString&, + const QString&, const QString&, + bool b_enabled = true, const QString& mux = "" ); + static void AddSchedule( const QString&, const QString&, + const QString&, const QString&, + QDateTime _schetime, QDateTime _schedate, + int _scherepeatnumber, int _repeatDays, + bool b_enabled = true, const QString& mux = "" ); + + static void ControlBroadcast( const QString&, int, unsigned int seek = 0 ); + static void EnableItem( const QString&, bool ); /* We don't have yet the accessors in the core, so the following is commented */ //unsigned int NbMedia() { if( p_vlm ) return p_vlm->i_media; return 0; } @@ -142,18 +159,19 @@ class VLMAWidget : public QGroupBox Q_OBJECT friend class VLMDialog; public: - VLMAWidget( QString name, QString input, QString output, - bool _enable, VLMDialog *parent, int _type = QVLM_Broadcast ); + VLMAWidget( const QString& name, const QString& input, + const QString& inputOptions, const QString& output, + bool _enable, VLMDialog *parent, int _type = QVLM_Broadcast ); virtual void update() = 0; protected: QLabel *nameLabel; QString name; QString input; + QString inputOptions; QString output; bool b_enabled; int type; VLMDialog *parent; - virtual void enterEvent( QEvent * ); QGridLayout *objLayout; private slots: virtual void modify(); @@ -166,8 +184,9 @@ class VLMBroadcast : public VLMAWidget Q_OBJECT friend class VLMDialog; public: - VLMBroadcast( QString name, QString input, QString output, - bool _enable, bool _loop, VLMDialog *parent ); + VLMBroadcast( const QString& name, const QString& input, + const QString& inputOptions, const QString& output, + bool _enable, bool _loop, VLMDialog *parent ); void update(); private: bool b_looped; @@ -184,8 +203,9 @@ class VLMVod : public VLMAWidget Q_OBJECT friend class VLMDialog; public: - VLMVod( QString name, QString input, QString output, - bool _enable, QString _mux, VLMDialog *parent ); + VLMVod( const QString& name, const QString& input, + const QString& inputOptions, const QString& output, + bool _enable, const QString& _mux, VLMDialog *parent ); void update(); private: QString mux; @@ -194,12 +214,19 @@ private: class VLMSchedule : public VLMAWidget { + Q_OBJECT friend class VLMDialog; public: - VLMSchedule( QString name, QString input, QString output, bool _enable, VLMDialog *parent ); + VLMSchedule( const QString& name, const QString& input, + const QString& inputOptions, const QString& output, + QDateTime schetime, QDateTime schedate, int repeatnumber, + int repeatdays, bool enabled, VLMDialog *parent ); void update(); private: - + QDateTime schetime; + QDateTime schedate; + int rNumber; + int rDays; }; #endif