1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGCSMQT4GLWIDGET_H_
40 #define _OSGCSMQT4GLWIDGET_H_
45 //---------------------------------------------------------------------------
47 //---------------------------------------------------------------------------
49 #include "OSGConfig.h"
53 #include "OSGContribCSMQtDef.h"
54 #include "OSGBaseTypes.h"
56 #include "OSGQ4GLWidget_qt.h"
62 /*! \brief OSGQGL widget class. See \ref PageWindowQT for a description.
63 \ingroup GrpWindowQt4Obj
64 \ingroup GrpLibOSGWindowQt4
68 class OSG_CONTRIBCSMQT_DLLMAPPING CSMQT4GLWidget
: public OSGQGLWidget
72 /*========================== PUBLIC =================================*/
76 /*---------------------------------------------------------------------*/
77 /*! \name Constructors */
80 CSMQT4GLWidget( QWidget
*pParent
,
81 const Char8
*szName
= 0,
82 const QGLWidget
*pShareWidget
= 0,
83 Qt::WindowFlags f
= 0 );
84 CSMQT4GLWidget( GLContext
*pContext
,
86 const QGLWidget
*pShareWidget
= 0,
87 Qt::WindowFlags f
= 0 );
89 CSMQT4GLWidget(const QGLFormat
&oformat
= QGLFormat::defaultFormat(),
91 const Char8
*szName
= 0,
92 const QGLWidget
*pShareWidget
= 0,
93 Qt::WindowFlags f
= 0 );
96 /*---------------------------------------------------------------------*/
97 /*! \name Desstructor */
100 virtual ~CSMQT4GLWidget(void);
103 /*---------------------------------------------------------------------*/
104 /*! \name Desstructor */
107 void setQT4Window(CSMQT4Window
*pWindow
);
110 /*---------------------------------------------------------------------*/
111 /*! \name OpenGL handling */
115 /*========================= PROTECTED ===============================*/
119 typedef OSGQGLWidget Inherited
;
121 CSMQT4Window
*_pOSGWindow
;
123 /*---------------------------------------------------------------------*/
124 /*! \name OpenGL handling */
127 virtual void resizeEvent (QResizeEvent
*pEvent
);
128 virtual void mousePressEvent (QMouseEvent
*pEvent
);
129 virtual void mouseReleaseEvent(QMouseEvent
*pEvent
);
130 virtual void mouseMoveEvent (QMouseEvent
*pEvent
);
131 virtual void wheelEvent (QWheelEvent
*pEvent
);
132 virtual void keyPressEvent (QKeyEvent
*pEvent
);
133 virtual void keyReleaseEvent (QKeyEvent
*pEvent
);
136 /*========================== PRIVATE ================================*/
140 /* prohibit default function (move to 'public' if needed) */
141 CSMQT4GLWidget(const CSMQT4GLWidget
&source
);
142 /* prohibit default function (move to 'public' if needed) */
143 void operator =(const CSMQT4GLWidget
&source
);
146 typedef CSMQT4GLWidget
* CSMQT4GLWidgetP
;
150 //#include "OSGQ4GLWidget_qt.inl"
152 #endif // OSG_WITH_QT
154 #endif // _OSGCSMQT4GLWIDGET_H_