fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Contrib / ComplexSceneManagerQt / OSGCSMQT4GLWidget_qt.h
bloba454ab7d6cb17352c83dba3fe2a3c7929b2a7822
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGCSMQT4GLWIDGET_H_
40 #define _OSGCSMQT4GLWIDGET_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 //---------------------------------------------------------------------------
46 // Includes
47 //---------------------------------------------------------------------------
49 #include "OSGConfig.h"
51 #ifdef OSG_WITH_QT
53 #include "OSGContribCSMQtDef.h"
54 #include "OSGBaseTypes.h"
56 #include "OSGQ4GLWidget_qt.h"
58 namespace OSG {
60 class CSMQT4Window;
62 /*! \brief OSGQGL widget class. See \ref PageWindowQT for a description.
63 \ingroup GrpWindowQt4Obj
64 \ingroup GrpLibOSGWindowQt4
65 \includebasedoc
68 class OSG_CONTRIBCSMQT_DLLMAPPING CSMQT4GLWidget : public OSGQGLWidget
70 Q_OBJECT
72 /*========================== PUBLIC =================================*/
74 public:
76 /*---------------------------------------------------------------------*/
77 /*! \name Constructors */
78 /*! \{ */
80 CSMQT4GLWidget( QWidget *pParent,
81 const Char8 *szName = 0,
82 const QGLWidget *pShareWidget = 0,
83 Qt::WindowFlags f = 0 );
84 CSMQT4GLWidget( GLContext *pContext,
85 QWidget *pParent = 0,
86 const QGLWidget *pShareWidget = 0,
87 Qt::WindowFlags f = 0 );
89 CSMQT4GLWidget(const QGLFormat &oformat = QGLFormat::defaultFormat(),
90 QWidget *pParent = 0,
91 const Char8 *szName = 0,
92 const QGLWidget *pShareWidget = 0,
93 Qt::WindowFlags f = 0 );
95 /*! \} */
96 /*---------------------------------------------------------------------*/
97 /*! \name Desstructor */
98 /*! \{ */
100 virtual ~CSMQT4GLWidget(void);
102 /*! \} */
103 /*---------------------------------------------------------------------*/
104 /*! \name Desstructor */
105 /*! \{ */
107 void setQT4Window(CSMQT4Window *pWindow);
109 /*! \} */
110 /*---------------------------------------------------------------------*/
111 /*! \name OpenGL handling */
112 /*! \{ */
114 /*! \} */
115 /*========================= PROTECTED ===============================*/
117 protected:
119 typedef OSGQGLWidget Inherited;
121 CSMQT4Window *_pOSGWindow;
123 /*---------------------------------------------------------------------*/
124 /*! \name OpenGL handling */
125 /*! \{ */
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);
135 /*! \} */
136 /*========================== PRIVATE ================================*/
138 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_