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  std::string m_tmpDirName;
70 
71  protected:
72 
73 #ifdef Q_OS_MACX
74 
77  virtual void customEvent ( QCustomEvent * event );
78 #endif
79 
80 public:
81 
84  QtApp ( int & argc, char ** argv );
85 
88  QtApp ( int & argc, char ** argv, bool gui );
89 
91  ~QtApp();
92 
94  static QtApp * instance ();
95 
107  void setFirstWindow ( );
108 
110  CanvasWindow * currentCanvas ();
111 
112 };
113 
114 } // namespace hippodraw
115 
116 #endif // QtApp_H
static QtApp * s_instance
The instance of the application.
Definition: QtApp.h:44
#define MDL_QTHIPPOPLOT_API
Definition: libqthippo.h:36
A derived class of QApplication that instantiates the components of HippoDraw.
Definition: QtApp.h:39
A concrete window class that contains the canvas and responds to menu item and tool bar events from t...
Definition: CanvasWindow.h:106
std::string m_tmpDirName
Definition: QtApp.h:69

Generated for HippoDraw Class Library by doxygen