| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /****************************************************************************** 00002 * VRS - The Virtual Rendering System 00003 * Copyright (C) 2000-2004 Computer Graphics Systems Group at the 00004 * Hasso-Plattner-Institute (HPI), Potsdam, Germany. 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 2.1 of the License, or (at 00009 * your option) any later version. This library is distributed in the hope 00010 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 00011 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. You should have received 00013 * a copy of the GNU Lesser+ General Public License along with this library; if 00014 * not, write to the FreeSoftware Foundation, Inc., 59 Temple Place, Suite 330, 00015 * Boston, MA, 02111-1307, USA. 00016 ******************************************************************************/ 00017 00018 // $Id: qt3winapplication.h 6667 2009-02-25 11:39:30Z Amir_Semmo $ 00019 // $Date: 2009-02-25 12:39:30 +0100 (Wed, 25 Feb 2009) $ 00020 // $Revision: 6667 $ 00021 // $State$ 00022 // $Author: Amir_Semmo $ 00023 // 00024 // $Log$ 00025 // Revision 1.4 2004/11/09 15:05:55 kirsch 00026 // further changes to class comments due to doxygen 00027 // 00028 // Revision 1.3 2004/10/05 12:50:44 baumann 00029 // fixed for Liunx: the classes can now be used for Linux too, but no impl is provided 00030 // 00031 // Revision 1.2 2004/04/22 15:58:06 kirsch 00032 // only compile for WIN32 00033 // 00034 // Revision 1.1 2004/04/21 14:41:37 buchholz 00035 // first check-in 00036 // 00037 00038 #ifndef VRS_QT3_QTWINAPPLICATION_H 00039 #define VRS_QT3_QTWINAPPLICATION_H 00040 00041 #include <vrs/qt3/config.h> 00042 #include <vrs/sharedobj.h> 00043 #include <qapplication.h> 00044 #include <vector> 00045 00046 #if !defined(WIN32) && !defined(__APPLE__) 00047 typedef int MSG; // dummy typedef in order to define a type for MSG below 00048 #endif // WIN32 00049 00050 namespace VRS { 00051 00052 class Event; 00053 template<typename T> class Array; 00054 00060 class VRS_QT3_API Qt3WinApplication : public QApplication { 00061 Q_OBJECT 00062 public: 00063 00064 Qt3WinApplication(int& argc, char** argv); 00065 Qt3WinApplication(int& argc, char** argv, bool GUIenabled); 00066 Qt3WinApplication(int& argc, char** argv, QApplication ::Type type); 00068 00069 00070 class Device : public VRS::SharedObj { 00071 public: 00072 virtual SO<VRS::Event> processEvent(const MSG& msg) = 0; 00073 }; 00077 void registerDevice(SO<Device> device); 00082 virtual bool winEventFilter(MSG* msg); 00086 private: 00087 std::vector<SO<Device> > m_devices; 00088 }; 00089 00090 } // namespace VRS 00091 00092 #endif // VRS_QT3_QTWINAPPLICATION_H