]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs_provider.hpp
Qt4: Please help...
[vlc] / modules / gui / qt4 / dialogs_provider.hpp
1 /*****************************************************************************
2  * dialogs_provider.hpp : Dialogs provider
3  ****************************************************************************
4  * Copyright (C) 2006 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *
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.
13  *
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.
18  *
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. *****************************************************************************/
22
23 #ifndef _DIALOGS_PROVIDER_H_
24 #define _DIALOGS_PROVIDER_H_
25
26 #include <QObject>
27 #include <QTimer>
28 #include <QApplication>
29
30 #include "dialogs/interaction.hpp"
31
32 #include <assert.h>
33 #include <vlc/vlc.h>
34 #include <vlc_interface.h>
35
36 class QEvent;
37 class QSignalMapper;
38 class QVLCMenu;
39
40 class DialogsProvider : public QObject
41 {
42     Q_OBJECT;
43 public:
44     static DialogsProvider *getInstance()
45     {
46         assert( instance );
47         return instance;
48     }
49     static DialogsProvider *getInstance( intf_thread_t *p_intf )
50     {
51         if( !instance )
52             instance = new DialogsProvider( p_intf );
53         return instance;
54     }
55     static void killInstance()
56     {
57         if( instance ) delete instance;
58         instance=NULL;
59     }
60     virtual ~DialogsProvider();
61     QTimer *fixed_timer;
62 protected:
63     friend class QVLCMenu;
64     QSignalMapper *menusMapper;
65     QSignalMapper *menusUpdateMapper;
66     QSignalMapper *SDMapper;
67     void customEvent( QEvent *);
68 private:
69     DialogsProvider( intf_thread_t *);
70     intf_thread_t *p_intf;
71     static DialogsProvider *instance;
72     QStringList showSimpleOpen();
73
74 public slots:
75     void playlistDialog();
76     void bookmarksDialog();
77     void MediaInfoDialog();
78     void prefsDialog();
79     void extendedDialog();
80     void messagesDialog();
81     void simplePLAppendDialog();
82     void simpleMLAppendDialog();
83     void simpleOpenDialog();
84     void openDialog();
85     void PLAppendDialog();
86     void MLAppendDialog();
87     void openDialog( int );
88     void popupMenu( int );
89     void doInteraction( intf_dialog_args_t * );
90     void menuAction( QObject *);
91     void menuUpdateAction( QObject *);
92     void SDMenuAction( QString );
93     void streamingDialog();
94     void openPlaylist();
95     void openDirectory();
96     void openMLDirectory();
97     void quit();
98     void switchToSkins();
99     void helpDialog();
100     void aboutDialog();
101 };
102
103 #endif