2 * \file qt4/GuiApplication.h
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
13 #ifndef QT4_APPLICATION_H
14 #define QT4_APPLICATION_H
16 #include "GuiImplementation.h"
17 #include "FontLoader.h"
19 #include "frontends/Application.h"
21 #include <QApplication>
23 ///////////////////////////////////////////////////////////////
27 #include <Carbon/Carbon.h>
29 ///////////////////////////////////////////////////////////////
38 /// The Qt main application class
40 There should be only one instance of this class. No Qt object
41 initialisation should be done before the instanciation of this class.
43 \todo The work areas handling could be moved to a base virtual class
44 comon to all frontends.
46 class GuiApplication : public QApplication, public Application
49 GuiApplication(int & argc, char ** argv);
51 /// Method inherited from \c Application class
53 virtual int const exec();
54 virtual Gui & gui() { return gui_; }
55 virtual void exit(int status);
59 FontLoader & fontLoader() { return font_loader_; }
62 LyXView & createView(unsigned int width, unsigned int height,
63 int posx, int posy, bool maximize);
67 GuiImplementation gui_;
70 FontLoader font_loader_;
74 bool x11EventFilter (XEvent * ev);
79 bool macEventFilter(EventRef event);
81 // static OSStatus handleOpenDocuments(
82 static pascal OSErr handleOpenDocuments(
83 const AppleEvent* inEvent, AppleEvent*, long);
87 } // namespace frontend
90 extern lyx::frontend::GuiApplication * guiApp;
93 #endif // QT4_APPLICATION_H