| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /****************************************************************************** 00002 * VRS - The Virtual Rendering System 00003 * Copyright (C) 2003 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: qtaxmainwindow.h 6014 2007-08-09 07:51:16Z Konstantin_Baumann $ 00019 // $Date: 2007-08-09 09:51:16 +0200 (Thu, 09 Aug 2007) $ 00020 // $Revision: 6014 $ 00021 // $State$ 00022 // $Author: Konstantin_Baumann $ 00023 // 00024 // $Log$ 00025 // Revision 1.9 2005/04/05 10:42:39 baumann 00026 // macro VRS_QT3_API removed from template class 00027 // 00028 // Revision 1.8 2005/04/05 09:15:54 baumann 00029 // updated 00030 // 00031 // Revision 1.7 2004/11/09 15:05:55 kirsch 00032 // further changes to class comments due to doxygen 00033 // 00034 // Revision 1.6 2004/03/12 16:28:41 baumann 00035 // macros VRS_NAMESPACE_BEGIN/_END expanded and removed 00036 // 00037 // Revision 1.5 2003/07/28 09:57:18 baumann 00038 // typo fixed (2nd time) 00039 // 00040 // Revision 1.4 2003/07/28 09:56:12 baumann 00041 // typo fixed 00042 // 00043 // Revision 1.3 2003/07/28 09:51:10 baumann 00044 // updated 00045 // 00046 // Revision 1.2 2003/07/28 09:21:14 baumann 00047 // updated 00048 // 00049 // Revision 1.1 2003/07/25 08:12:12 baumann 00050 // new class QtAxMainWindow added 00051 // 00052 00053 #ifndef VRS_QT_QTAXMAINWINDOW_H 00054 #define VRS_QT_QTAXMAINWINDOW_H 00055 00056 #include <vrs/qt3/config.h> 00057 #include <qmainwindow.h> 00058 00059 #ifdef WIN32 00060 00061 # include <qaxbindable.h> 00062 00063 # pragma comment(lib, "qaxserver.lib") 00064 # pragma comment(lib, "qaxcontainer.lib") 00065 # pragma comment(lib, "delayimp.lib") 00066 # pragma comment(lib, "ole32.lib") 00067 # pragma comment(lib, "oleaut32.lib") 00068 00069 #else // WIN32 00070 00071 // create some dummy classes for the non-WIN32 case 00072 // to reduce the number of #ifdef's 00073 class QAxBindable { }; 00074 class QAxAggregated { }; 00075 00076 #endif // WIN32 00077 00078 namespace VRS { 00079 00080 class VRS_QT3_API QtAxWidgetBase : public QAxBindable { 00081 public: 00082 QtAxWidgetBase(bool isActiveX); 00083 virtual bool isActiveX() const; 00084 00085 private: 00086 QAxAggregated* createAggregate(); 00087 // internal method needed by Qt for ActiveX-plugins 00088 00089 private: 00090 const bool m_isActiveX; 00091 }; // class QtAxWidgetBase 00092 00093 template<class QWIDGET> 00094 class QtAxWidget : public QWIDGET, public QtAxWidgetBase { 00095 public: 00096 QtAxWidget( 00097 QWidget* parent = NULL, 00098 const char* name = NULL, 00099 bool isActiveX = true 00100 ) : 00101 QWIDGET(parent, name), 00102 QtAxWidgetBase(isActiveX) 00103 { } 00104 }; // class QtAxWidget<QWIDGET> 00105 00106 class VRS_QT3_API QtAxMainWindow : public QtAxWidget<QMainWindow> { 00107 public: 00108 QtAxMainWindow( 00109 QWidget* parent = NULL, 00110 const char* name = NULL, 00111 bool isActiveX = true 00112 ) : 00113 QtAxWidget<QMainWindow>(parent, name, isActiveX) 00114 { } 00115 }; // class QtAxMainWindow 00116 00117 } // namespace VRS 00118 00119 #endif // VRS_QT_QTAXMAINWINDOW_H