@ -19,31 +19,17 @@
@@ -19,31 +19,17 @@
# include <osg/Config>
# if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
// disable warning "'QtConcurrent::BlockSizeManager' : assignment operator could not be generated"
# pragma warning( disable : 4512 )
# endif
# if QT_VERSION >= 400
# include <QtCore/QString>
# include <QtCore/QTimer>
# include <QtGui/QKeyEvent>
# include <QtGui/QApplication>
# include <QtGui/QtGui>
# include <QtGui/QWidget>
using Qt : : WindowFlags ;
# else
class QWidget ;
# include <qtimer.h>
# include <qgl.h>
# include <qapplication.h>
# define WindowFlags WFlags
// disable warning "'QtConcurrent::BlockSizeManager' : assignment operator could not be generated"
# pragma warning( disable : 4512 )
# endif
# include <QtCore/QString>
# include <QtCore/QTimer>
# include <QtGui/QKeyEvent>
# include <QtGui/QApplication>
# include <QtGui/QtGui>
# include <QtGui/QWidget>
using Qt : : WindowFlags ;
# include <osgViewer/Viewer>
# include <osgViewer/CompositeViewer>
@ -85,7 +71,7 @@ typedef osgViewer::GraphicsWindowX11::WindowData WindowData;
@@ -85,7 +71,7 @@ typedef osgViewer::GraphicsWindowX11::WindowData WindowData;
class QOSGWidget : public QWidget
{
public :
public :
QOSGWidget ( QWidget * parent = 0 , const char * name = 0 , WindowFlags f = 0 , bool overrideTraits = false ) ;
@ -94,7 +80,7 @@ class QOSGWidget : public QWidget
@@ -94,7 +80,7 @@ class QOSGWidget : public QWidget
osgViewer : : GraphicsWindow * getGraphicsWindow ( ) { return _gw . get ( ) ; }
const osgViewer : : GraphicsWindow * getGraphicsWindow ( ) const { return _gw . get ( ) ; }
protected :
protected :
void init ( ) ;
void createContext ( ) ;
@ -119,7 +105,7 @@ class QOSGWidget : public QWidget
@@ -119,7 +105,7 @@ class QOSGWidget : public QWidget
class ViewerQOSG : public osgViewer : : Viewer , public QOSGWidget
{
public :
public :
ViewerQOSG ( QWidget * parent = 0 , const char * name = 0 , WindowFlags f = 0 , int fps = 20 ) :
QOSGWidget ( parent , name , f )
@ -139,7 +125,7 @@ class ViewerQOSG : public osgViewer::Viewer, public QOSGWidget
@@ -139,7 +125,7 @@ class ViewerQOSG : public osgViewer::Viewer, public QOSGWidget
virtual void paintEvent ( QPaintEvent * event ) { frame ( ) ; }
protected :
protected :
QTimer _timer ;
} ;
@ -147,7 +133,7 @@ class ViewerQOSG : public osgViewer::Viewer, public QOSGWidget
@@ -147,7 +133,7 @@ class ViewerQOSG : public osgViewer::Viewer, public QOSGWidget
class CompositeViewerQOSG : public osgViewer : : CompositeViewer , public QOSGWidget
{
public :
public :
CompositeViewerQOSG ( QWidget * parent = 0 , const char * name = 0 , WindowFlags f = 0 , int fps = 20 )
: QOSGWidget ( parent , name , f )
{
@ -196,7 +182,7 @@ class CompositeViewerQOSG : public osgViewer::CompositeViewer, public QOSGWidget
@@ -196,7 +182,7 @@ class CompositeViewerQOSG : public osgViewer::CompositeViewer, public QOSGWidget
osg : : ref_ptr < osg : : Node > _scene ;
protected :
protected :
QTimer _timer ;
} ;