QtApp.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef QtApp_H
15 #define QtApp_H
16 
17 #include "qt/libqthippo.h"
18 
19 #include <qapplication.h>
20 
21 #include <string>
22 
23 #ifdef Q_OS_MACX
24 #if QT_VERSION < 0x040000
25 #include <Carbon/Carbon.h>
26 #endif
27 #endif
28 
29 namespace hippodraw {
30 
31 class CanvasWindow;
32 
40 {
41 private:
42 
44  static QtApp * s_instance;
45 
48  void init ();
49 
56 #ifdef Q_OS_MACX
57 #if QT_VERSION < 0x040000
58  static OSErr appleEventHandler ( const AppleEvent * event,
59  AppleEvent *,
60  long );
61 #endif
62 #endif
63 
67  bool tryOpenFile ( const std::string & name );
68 
69  protected:
70 
71 #ifdef Q_OS_MACX
72 
75  virtual void customEvent ( QCustomEvent * event );
76 #endif
77 
78 public:
79 
82  QtApp ( int argc, char ** argv );
83 
86  QtApp ( int argc, char ** argv, bool gui );
87 
89  ~QtApp();
90 
92  static QtApp * instance ();
93 
105  void setFirstWindow ( );
106 
108  CanvasWindow * currentCanvas ();
109 
110 };
111 
112 } // namespace hippodraw
113 
114 #endif // QtApp_H

Generated for HippoDraw Class Library by doxygen