]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs_provider.hpp
* Fix QT detection and make dist
[vlc] / modules / gui / qt4 / dialogs_provider.hpp
1 /*****************************************************************************
2  * dialogs_provider.hpp : Dialogs provider
3  ****************************************************************************
4  * Copyright (C) 2000-2005 the VideoLAN team
5  * $Id: wxwidgets.cpp 15731 2006-05-25 14:43:53Z zorglub $
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 #include <vlc/vlc.h>
30
31 class QEvent;
32
33 class DialogsProvider : public QObject
34 {
35     Q_OBJECT;
36 public:
37     static DialogsProvider *getInstance( intf_thread_t *p_intf )
38     {
39         if( !instance )
40             instance = new DialogsProvider( p_intf );
41         return instance;
42     }
43     virtual ~DialogsProvider();
44
45     void init();
46     QTimer *idle_timer;
47     QTimer *fixed_timer;
48 protected:
49     void customEvent( QEvent *);
50 private:
51     DialogsProvider( intf_thread_t *);
52     intf_thread_t *p_intf;
53     static DialogsProvider *instance;
54
55 public slots:
56     void playlistDialog();
57     void streaminfoDialog();
58     void prefsDialog();
59     void messagesDialog();
60     void openDialog( int );
61     void popupMenu( int );
62 };
63
64
65 #endif