X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fdialogs_provider.hpp;h=314e3ac07d2d8d101c6f723b757cbfcf53363ed3;hb=9e9b88590430f51228ad3f0c72d219543ca1e1f0;hp=269a2886ba69e47bee8d78380d5b0ed004305608;hpb=885113ae46f9ca51f3581e45da5dfadabffa70ee;p=vlc diff --git a/modules/gui/qt4/dialogs_provider.hpp b/modules/gui/qt4/dialogs_provider.hpp index 269a2886ba..314e3ac07d 100644 --- a/modules/gui/qt4/dialogs_provider.hpp +++ b/modules/gui/qt4/dialogs_provider.hpp @@ -1,10 +1,11 @@ /***************************************************************************** * dialogs_provider.hpp : Dialogs provider **************************************************************************** - * Copyright (C) 2006 the VideoLAN team + * Copyright (C) 2006-2007 the VideoLAN team * $Id$ * * Authors: Clément Stenac + * Jean-Baptiste Kempf * * 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 @@ -18,50 +19,64 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + *****************************************************************************/ #ifndef _DIALOGS_PROVIDER_H_ #define _DIALOGS_PROVIDER_H_ -#include -#include -#include - -#include "dialogs/interaction.hpp" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include -#include +#include #include -#define ADD_FILTER_MEDIA( string ) \ - string += _("Media Files"); \ - string += " ( "; \ - string += EXTENSIONS_MEDIA; \ +#include "qt4.hpp" +#include "dialogs/interaction.hpp" +#include "dialogs/open.hpp" + +#include +#include +#include + +#define ADD_FILTER_MEDIA( string ) \ + string += qtr( "Media Files" ); \ + string += " ( "; \ + string += EXTENSIONS_MEDIA; \ string += ");;"; -#define ADD_FILTER_VIDEO( string ) \ - string += _("Video Files"); \ - string += " ( "; \ - string += EXTENSIONS_VIDEO; \ +#define ADD_FILTER_VIDEO( string ) \ + string += qtr( "Video Files" ); \ + string += " ( "; \ + string += EXTENSIONS_VIDEO; \ string += ");;"; -#define ADD_FILTER_AUDIO( string ) \ - string += _("Audio Files"); \ - string += " ( "; \ - string += EXTENSIONS_AUDIO; \ +#define ADD_FILTER_AUDIO( string ) \ + string += qtr( "Audio Files" ); \ + string += " ( "; \ + string += EXTENSIONS_AUDIO; \ string += ");;"; -#define ADD_FILTER_PLAYLIST( string )\ - string += _("Playlist Files"); \ - string += " ( "; \ - string += EXTENSIONS_PLAYLIST; \ +#define ADD_FILTER_PLAYLIST( string ) \ + string += qtr( "Playlist Files" ); \ + string += " ( "; \ + string += EXTENSIONS_PLAYLIST; \ string += ");;"; -#define ADD_FILTER_SUBTITLE( string )\ - string += _("Subtitles Files"); \ - string += " ( "; \ - string += EXTENSIONS_SUBTITLE; \ +#define ADD_FILTER_SUBTITLE( string ) \ + string += qtr( "Subtitles Files" );\ + string += " ( "; \ + string += EXTENSIONS_SUBTITLE; \ string += ");;"; -#define ADD_FILTER_ALL( string ) \ - string += _("All Files"); \ +#define ADD_FILTER_ALL( string ) \ + string += qtr( "All Files" ); \ string += " (*.*)"; +enum { + EXT_FILTER_MEDIA = 0x01, + EXT_FILTER_VIDEO = 0x02, + EXT_FILTER_AUDIO = 0x04, + EXT_FILTER_PLAYLIST = 0x08, + EXT_FILTER_SUBTITLE = 0x10, +}; class QEvent; class QSignalMapper; @@ -70,6 +85,8 @@ class QVLCMenu; class DialogsProvider : public QObject { Q_OBJECT; + friend class QVLCMenu; + public: static DialogsProvider *getInstance() { @@ -85,20 +102,22 @@ public: static void killInstance() { if( instance ) delete instance; - instance=NULL; + instance = NULL; } virtual ~DialogsProvider(); QTimer *fixed_timer; - QStringList showSimpleOpen( QString help = QString(), bool all = true, - bool video = true, bool audio = true, - bool subs = false, bool pls = true ); + QStringList showSimpleOpen( QString help = QString(), + int filters = EXT_FILTER_MEDIA | + EXT_FILTER_VIDEO | EXT_FILTER_AUDIO | + EXT_FILTER_PLAYLIST, + QString path = QString() ); protected: - friend class QVLCMenu; QSignalMapper *menusMapper; QSignalMapper *menusUpdateMapper; QSignalMapper *SDMapper; void customEvent( QEvent *); + private: DialogsProvider( intf_thread_t *); intf_thread_t *p_intf; @@ -106,6 +125,11 @@ private: void addFromSimple( bool, bool ); public slots: + void doInteraction( intf_dialog_args_t * ); + void menuAction( QObject *); + void menuUpdateAction( QObject * ); + void SDMenuAction( QString ); + void playlistDialog(); void bookmarksDialog(); void mediaInfoDialog(); @@ -113,31 +137,45 @@ public slots: void prefsDialog(); void extendedDialog(); void messagesDialog(); +#ifdef ENABLE_VLM + void vlmDialog(); +#endif + void helpDialog(); +#ifdef UPDATE_CHECK + void updateDialog(); +#endif + void aboutDialog(); + void gotoTimeDialog(); + void podcastConfigureDialog(); + + void simpleOpenDialog(); void simplePLAppendDialog(); void simpleMLAppendDialog(); - void simpleOpenDialog(); + void openDialog(); - void openDialog(int ); + void openDialog( int ); + void openFileGenericDialog( intf_dialog_args_t * ); + void openDiscDialog(); void openFileDialog(); void openNetDialog(); void openCaptureDialog(); - void openDiscDialog(); + void PLAppendDialog(); void MLAppendDialog(); - void popupMenu( int ); - void doInteraction( intf_dialog_args_t * ); - void menuAction( QObject *); - void menuUpdateAction( QObject *); - void SDMenuAction( QString ); - void streamingDialog(); - void openPlaylist(); - void savePlaylist(); void PLAppendDir(); void MLAppendDir(); + + void streamingDialog( QWidget *parent, QString mrl = "", + bool b_stream = true ); + void openThenStreamingDialogs(); + void openThenTranscodingDialogs(); + + void openAPlaylist(); + void saveAPlaylist(); + + void loadSubtitlesFile(); + void quit(); - void switchToSkins(); - void helpDialog(); - void aboutDialog(); }; #endif