qvlcapp.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _QVLC_APP_H_
00026 #define _QVLC_APP_H_
00027
00028 #include <QApplication>
00029 #include <QEvent>
00030
00031 #if defined(Q_WS_WIN)
00032 # include <windows.h>
00033 # include <vlc_common.h>
00034 # include <vlc_interface.h>
00035 # include "qt4.hpp"
00036 # include "input_manager.hpp"
00037 #endif
00038
00039 class QVLCApp : public QApplication
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 QVLCApp( int & argc, char ** argv ) : QApplication( argc, argv, true )
00045 {
00046 connect( this, SIGNAL(quitSignal()), this, SLOT(quit()) );
00047 }
00048
00049 static void triggerQuit()
00050 {
00051 QVLCApp *app = qobject_cast<QVLCApp*>( instance() );
00052 if ( app )
00053 emit app->quitSignal();
00054 }
00055
00056 #if defined (Q_WS_X11)
00057 QVLCApp( Display *dp, int & argc, char ** argv )
00058 : QApplication( dp, argc, argv )
00059 {
00060 connect( this, SIGNAL(quitSignal()), this, SLOT(quit()) );
00061 }
00062 #endif
00063
00064 signals:
00065 void quitSignal();
00066
00067 };
00068
00069 #endif