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_SUBTITLE( string )\
57 string += _("Subtitles Files"); \
59 string += EXTENSIONS_SUBTITLE; \
61 #define ADD_FILTER_ALL( string ) \
62 string += _("All Files"); \
70 class DialogsProvider : public QObject
74 static DialogsProvider *getInstance()
79 static DialogsProvider *getInstance( intf_thread_t *p_intf )
82 instance = new DialogsProvider( p_intf );
85 static void killInstance()
87 if( instance ) delete instance;
90 virtual ~DialogsProvider();
93 QStringList showSimpleOpen( QString help = QString(), bool all = true,
94 bool video = true, bool audio = true,
95 bool subs = false, bool pls = true );
97 friend class QVLCMenu;
98 QSignalMapper *menusMapper;
99 QSignalMapper *menusUpdateMapper;
100 QSignalMapper *SDMapper;
101 void customEvent( QEvent *);
103 DialogsProvider( intf_thread_t *);
104 intf_thread_t *p_intf;
105 static DialogsProvider *instance;
106 void addFromSimple( bool, bool );
109 void playlistDialog();
110 void bookmarksDialog();
111 void mediaInfoDialog();
112 void mediaCodecDialog();
114 void extendedDialog();
115 void messagesDialog();
116 void simplePLAppendDialog();
117 void simpleMLAppendDialog();
118 void simpleOpenDialog();
120 void openDialog(int );
121 void openFileDialog();
122 void openNetDialog();
123 void openCaptureDialog();
124 void openDiscDialog();
125 void PLAppendDialog();
126 void MLAppendDialog();
127 void popupMenu( int );
128 void doInteraction( intf_dialog_args_t * );
129 void menuAction( QObject *);
130 void menuUpdateAction( QObject *);
131 void SDMenuAction( QString );
132 void streamingDialog();
138 void switchToSkins();