1 /*****************************************************************************
2 * dialogs_provider.hpp : Dialogs provider
3 ****************************************************************************
4 * Copyright (C) 2006 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/
23 #ifndef _DIALOGS_PROVIDER_H_
24 #define _DIALOGS_PROVIDER_H_
28 #include <QApplication>
30 #include "dialogs/interaction.hpp"
34 #include <vlc_interface.h>
36 #define ADD_FILTER_MEDIA( string ) \
37 string += _("Media Files"); \
39 string += EXTENSIONS_MEDIA; \
41 #define ADD_FILTER_VIDEO( string ) \
42 string += _("Video Files"); \
44 string += EXTENSIONS_VIDEO; \
46 #define ADD_FILTER_AUDIO( string ) \
47 string += _("Audio Files"); \
49 string += EXTENSIONS_AUDIO; \
51 #define ADD_FILTER_PLAYLIST( string )\
52 string += _("Playlist Files"); \
54 string += EXTENSIONS_PLAYLIST; \
56 #define ADD_FILTER_ALL( string ) \
57 string += _("All Files"); \
65 class DialogsProvider : public QObject
69 static DialogsProvider *getInstance()
74 static DialogsProvider *getInstance( intf_thread_t *p_intf )
77 instance = new DialogsProvider( p_intf );
80 static void killInstance()
82 if( instance ) delete instance;
85 virtual ~DialogsProvider();
88 QStringList showSimpleOpen( QString help = QString(), bool all = true,
89 bool video = true, bool audio = true,
90 bool subs = true, bool pls = true );
92 friend class QVLCMenu;
93 QSignalMapper *menusMapper;
94 QSignalMapper *menusUpdateMapper;
95 QSignalMapper *SDMapper;
96 void customEvent( QEvent *);
98 DialogsProvider( intf_thread_t *);
99 intf_thread_t *p_intf;
100 static DialogsProvider *instance;
101 void addFromSimple( bool, bool );
104 void playlistDialog();
105 void bookmarksDialog();
106 void mediaInfoDialog();
108 void extendedDialog();
109 void messagesDialog();
110 void simplePLAppendDialog();
111 void simpleMLAppendDialog();
112 void simpleOpenDialog();
114 void openDialog(int );
115 void openFileDialog();
116 void openNetDialog();
117 void openCaptureDialog();
118 void openDiscDialog();
119 void PLAppendDialog();
120 void MLAppendDialog();
121 void popupMenu( int );
122 void doInteraction( intf_dialog_args_t * );
123 void menuAction( QObject *);
124 void menuUpdateAction( QObject *);
125 void SDMenuAction( QString );
126 void streamingDialog();
132 void switchToSkins();