Commit d12070ba authored by Marcus Hanwell's avatar Marcus Hanwell
Browse files

ENH: Require Qt 4.5.0 or later as announced on the VTK mailing lists.

Changes to the build system to require Qt 4.5.0 or later when building the
optional Qt components. This means that due to the license change of Qt in
4.5.0 anyone can commit changes to the Qt VTK classes. It also allowed for
the simplification of the build system and removal of some old code.
parent a7d49a76
......@@ -294,19 +294,13 @@ MARK_AS_ADVANCED(VTK_NO_PYTHON_THREADS)
OPTION(VTK_USE_QT "Build Qt support" OFF)
IF(VTK_USE_QT)
# we need Qt3 or Qt4
# we ask up front so FindQt.cmake doesn't auto-find an undesired Qt version
SET(DESIRED_QT_VERSION 0 CACHE STRING "Pick a version of Qt to use: 3 or 4")
IF(DESIRED_QT_VERSION MATCHES 0)
MESSAGE("Please set the DESIRED_QT_VERSION")
ELSE(DESIRED_QT_VERSION MATCHES 0)
SET ( QT_USE_QTSQL 1 )
INCLUDE( ${CMAKE_ROOT}/Modules/FindQt${DESIRED_QT_VERSION}.cmake )
IF(NOT QT_FOUND)
MESSAGE("Qt was not found")
ENDIF(NOT QT_FOUND)
ENDIF(DESIRED_QT_VERSION MATCHES 0)
# Now require Qt 4.5.0 or later
SET ( QT_MIN_VERSION "4.5.0" )
SET ( QT_USE_QTSQL 1 )
INCLUDE( ${CMAKE_ROOT}/Modules/FindQt4.cmake )
IF(NOT QT_FOUND)
MESSAGE("Qt was not found")
ENDIF(NOT QT_FOUND)
ENDIF(VTK_USE_QT)
# Determine GUI Support.
......
# DESIRED_QT_VERSION is set in the VTK top-level CMakeLists.txt
IF(DESIRED_QT_VERSION MATCHES 0)
MESSAGE("Please set the DESIRED_QT_VERSION")
ELSE(DESIRED_QT_VERSION MATCHES 0)
# set up sources to build
SET ( QVTKLibSrcs
vtkEventQtSlotConnect.cxx
......@@ -11,7 +6,7 @@ SET ( QVTKLibSrcs
)
SET ( QVTKMocHeaders
${CMAKE_CURRENT_BINARY_DIR}/QVTKWidget.h
QVTKWidget.h
vtkQtConnection.h
)
......@@ -22,158 +17,109 @@ SET ( QVTKNonMocHeaders
INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_BINARY_DIR} )
IF(DESIRED_QT_VERSION MATCHES 4)
SET(Q_SIGNALS Q_SIGNALS)
SET(Q_SLOTS Q_SLOTS)
# add files that require Qt 4
SET ( QVTKLibSrcs
${QVTKLibSrcs}
QVTKPaintEngine.cxx
QVTKPaintEngine.h
vtkQtAbstractModelAdapter.cxx
vtkQtAnnotationLayersModelAdapter.cxx
vtkQtInitialization.cxx
vtkQtSQLDatabase.cxx
vtkQtSQLQuery.cxx
vtkQtTableModelAdapter.cxx
vtkQtTimePointUtility.cxx
vtkQtTreeModelAdapter.cxx
)
# add files that require Qt 4
SET ( QVTKLibSrcs
${QVTKLibSrcs}
QVTKPaintEngine.cxx
QVTKPaintEngine.h
vtkQtAbstractModelAdapter.cxx
vtkQtAnnotationLayersModelAdapter.cxx
vtkQtInitialization.cxx
vtkQtSQLDatabase.cxx
vtkQtSQLQuery.cxx
vtkQtTableModelAdapter.cxx
vtkQtTimePointUtility.cxx
vtkQtTreeModelAdapter.cxx
)
SET ( QVTKMocHeaders
${QVTKMocHeaders}
vtkQtAbstractModelAdapter.h
vtkQtAnnotationLayersModelAdapter.h
vtkQtTableModelAdapter.h
vtkQtTreeModelAdapter.h
)
# add additional files depending on infovis and/or views
IF(VTK_USE_VIEWS)
SET( QVTKLibSrcs ${QVTKLibSrcs}
vtkQtAnnotationView.cxx
vtkQtBarChartView.cxx
vtkQtChartRepresentation.cxx
vtkQtChartView.cxx
vtkQtLineChartView.cxx
vtkQtListView.cxx
vtkQtRecordView.cxx
vtkQtStackedChartView.cxx
vtkQtStatisticalBoxChartView.cxx
vtkQtTableRepresentation.cxx
vtkQtTableView.cxx
vtkQtView.cxx
)
SET_SOURCE_FILES_PROPERTIES(vtkQtView.cxx ABSTRACT )
SET ( QVTKMocHeaders ${QVTKMocHeaders}
vtkQtAnnotationView.h
vtkQtBarChartView.h
vtkQtChartView.h
vtkQtLineChartView.h
vtkQtListView.h
vtkQtRecordView.h
vtkQtStackedChartView.h
vtkQtStatisticalBoxChartView.h
vtkQtTableView.h
vtkQtView.h
)
SET ( QVTKNonMocHeaders ${QVTKNonMocHeaders}
vtkQtChartRepresentation.h
vtkQtTableRepresentation.h
)
# Tree view (because it contains QColumnView) is only supported in Qt >= 4.3.0
IF(QT_VERSION_MINOR GREATER 3 OR QT_VERSION_MINOR EQUAL 3)
SET(QVTKLibSrcs ${QVTKLibSrcs} vtkQtTreeView.cxx)
SET(QVTKMocHeaders ${QVTKMocHeaders} vtkQtTreeView.h)
ENDIF(QT_VERSION_MINOR GREATER 3 OR QT_VERSION_MINOR EQUAL 3)
# Rich-text view requires Qt >= 4.5.0
# Rich-text depends on QT Webkit which is not portable on Unix (AIX & HP-UX)
IF(QT_QTWEBKIT_FOUND)
IF(QT_VERSION_MINOR GREATER 5 OR QT_VERSION_MINOR EQUAL 5)
OPTION(VTK_QT_USE_WEBKIT "Option to use QT Webkit" ON)
MARK_AS_ADVANCED(VTK_QT_USE_WEBKIT)
IF( VTK_QT_USE_WEBKIT )
QT4_WRAP_UI(UI_FILES vtkQtRichTextView.ui)
SET(QVTKLibSrcs ${QVTKLibSrcs} ${UI_FILES} vtkQtRichTextView.cxx)
SET(QVTKMocHeaders ${QVTKMocHeaders} vtkQtRichTextView.h)
SET(QT_USE_PHONON 1)
SET(QT_USE_QTWEBKIT 1)
ENDIF( VTK_QT_USE_WEBKIT )
ENDIF(QT_VERSION_MINOR GREATER 5 OR QT_VERSION_MINOR EQUAL 5)
ENDIF(QT_QTWEBKIT_FOUND)
ENDIF(VTK_USE_VIEWS)
# help CMake find QtDesigner on Mac (binary install)
FIND_PATH(QT_QTDESIGNER_INCLUDE_DIR QDesignerComponents
PATHS ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
NO_DEFAULT_PATH)
# import Qt4 build settings
SET (QT_USE_QTNETWORK 1)
INCLUDE(${QT_USE_FILE})
SET ( PluginLibSrcs
Q4VTKWidgetPlugin.cxx
)
SET ( PluginMocHeaders
Q4VTKWidgetPlugin.h
)
# CMake apparently doesn't do this automatically
SET_SOURCE_FILES_PROPERTIES(Q4VTKWidgetPlugin.cxx PROPERTIES
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/QVTKWidget.xpm)
# Reduce the number of dirs that get included on moc command line
# since it causes issues on Windows 2000.
GET_DIRECTORY_PROPERTY(include_dirs_tmp INCLUDE_DIRECTORIES)
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${MOC_INCLUDE_DIRS}")
QT4_WRAP_CPP ( QVTKLibMocSrcs ${QVTKMocHeaders} )
SET ( QVTKMocHeaders
${QVTKMocHeaders}
vtkQtAbstractModelAdapter.h
vtkQtAnnotationLayersModelAdapter.h
vtkQtTableModelAdapter.h
vtkQtTreeModelAdapter.h
)
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${include_dirs_tmp}")
# add additional files depending on infovis and/or views
IF(VTK_USE_VIEWS)
SET( QVTKLibSrcs ${QVTKLibSrcs}
vtkQtAnnotationView.cxx
vtkQtBarChartView.cxx
vtkQtChartRepresentation.cxx
vtkQtChartView.cxx
vtkQtLineChartView.cxx
vtkQtListView.cxx
vtkQtRecordView.cxx
vtkQtStackedChartView.cxx
vtkQtStatisticalBoxChartView.cxx
vtkQtTableRepresentation.cxx
vtkQtTableView.cxx
vtkQtTreeView.cxx
vtkQtView.cxx
)
SET_SOURCE_FILES_PROPERTIES(vtkQtView.cxx ABSTRACT )
SET ( QVTKMocHeaders ${QVTKMocHeaders}
vtkQtAnnotationView.h
vtkQtBarChartView.h
vtkQtChartView.h
vtkQtLineChartView.h
vtkQtListView.h
vtkQtRecordView.h
vtkQtStackedChartView.h
vtkQtStatisticalBoxChartView.h
vtkQtTableView.h
vtkQtTreeView.h
vtkQtView.h
)
SET ( QVTKNonMocHeaders ${QVTKNonMocHeaders}
vtkQtChartRepresentation.h
vtkQtTableRepresentation.h
)
SET(QT_LIBS "${QT_LIBRARIES}")
# Rich-text view requires Qt >= 4.5.0
# Rich-text depends on QT Webkit which is not portable on Unix (AIX & HP-UX)
IF(QT_QTWEBKIT_FOUND)
OPTION(VTK_QT_USE_WEBKIT "Option to use QT Webkit" ON)
MARK_AS_ADVANCED(VTK_QT_USE_WEBKIT)
IF( VTK_QT_USE_WEBKIT )
QT4_WRAP_UI(UI_FILES vtkQtRichTextView.ui)
SET(QVTKLibSrcs ${QVTKLibSrcs} ${UI_FILES} vtkQtRichTextView.cxx)
SET(QVTKMocHeaders ${QVTKMocHeaders} vtkQtRichTextView.h)
SET(QT_USE_PHONON 1)
SET(QT_USE_QTWEBKIT 1)
ENDIF( VTK_QT_USE_WEBKIT )
ENDIF(QT_QTWEBKIT_FOUND)
ENDIF(VTK_USE_VIEWS)
ELSE(DESIRED_QT_VERSION MATCHES 4)
SET(Q_SIGNALS signals)
SET(Q_SLOTS slots)
# Qt3 settings
INCLUDE_DIRECTORIES ( ${QT_INCLUDE_DIR} )
# assume Qt dll
ADD_DEFINITIONS(-DQT_DLL)
# check for a multithreaded Qt3 dll
IF(QT_QT_LIBRARY MATCHES "mt")
ADD_DEFINITIONS(-DQT_THREAD_SUPPORT)
ENDIF(QT_QT_LIBRARY MATCHES "mt")
SET ( PluginLibSrcs
Q3VTKWidgetPlugin.cxx)
# help CMake find QtDesigner on Mac (binary install)
FIND_PATH(QT_QTDESIGNER_INCLUDE_DIR QDesignerComponents
PATHS ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
NO_DEFAULT_PATH)
SET ( PluginMocHeaders
Q3VTKWidgetPlugin.h
)
# import Qt4 build settings
SET (QT_USE_QTNETWORK 1)
INCLUDE(${QT_USE_FILE})
# CMake apparently doesn't do this automatically
SET_SOURCE_FILES_PROPERTIES(Q3VTKWidgetPlugin.cxx PROPERTIES
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/QVTKWidget.xpm)
SET ( PluginLibSrcs
Q4VTKWidgetPlugin.cxx
)
SET ( PluginMocHeaders
Q4VTKWidgetPlugin.h
)
QT_WRAP_CPP ( QVTK QVTKLibMocSrcs ${QVTKMocHeaders} )
SET(QT_LIBS ${QT_QT_LIBRARY})
# CMake apparently doesn't do this automatically
SET_SOURCE_FILES_PROPERTIES(Q4VTKWidgetPlugin.cxx PROPERTIES
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/QVTKWidget.xpm)
# Reduce the number of dirs that get included on moc command line
# since it causes issues on Windows 2000.
GET_DIRECTORY_PROPERTY(include_dirs_tmp INCLUDE_DIRECTORIES)
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${MOC_INCLUDE_DIRS}")
ENDIF(DESIRED_QT_VERSION MATCHES 4)
QT4_WRAP_CPP ( QVTKLibMocSrcs ${QVTKMocHeaders} )
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/QVTKWidget.h.in
${CMAKE_CURRENT_BINARY_DIR}/QVTKWidget.h
@ONLY)
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${include_dirs_tmp}")
ADD_LIBRARY(QVTK ${QVTKLibSrcs} ${QVTKLibMocSrcs})
......@@ -183,40 +129,34 @@ IF(VTK_LIBRARY_PROPERTIES)
ENDIF(VTK_LIBRARY_PROPERTIES)
TARGET_LINK_LIBRARIES( QVTK
${QT_LIBS}
${QT_LIBRARIES}
vtkRendering
vtkGraphics
vtkImaging
vtkCommon)
# add extra dependencies if necessary
IF(DESIRED_QT_VERSION MATCHES 4)
TARGET_LINK_LIBRARIES( QVTK vtkQtChart )
IF(VTK_USE_VIEWS)
TARGET_LINK_LIBRARIES( QVTK vtkViews )
ENDIF(VTK_USE_VIEWS)
ENDIF(DESIRED_QT_VERSION MATCHES 4)
TARGET_LINK_LIBRARIES( QVTK vtkQtChart )
IF(VTK_USE_VIEWS)
TARGET_LINK_LIBRARIES( QVTK vtkViews )
ENDIF(VTK_USE_VIEWS)
# build plugin
SET(QT_PLUGIN_LIBS ${QT_LIBS})
SET(QT_PLUGIN_LIBS ${QT_LIBRARIES})
ADD_DEFINITIONS(-DQT_PLUGIN)
IF(DESIRED_QT_VERSION MATCHES 4)
# A release build of the designer must have
# a release build of this plugin to work properly
# if the QtGui exists, a release build of the designer is assumed
IF(QT_QTGUI_LIBRARY)
ADD_DEFINITIONS(-DQT_NO_DEBUG)
SET(QT_PLUGIN_LIBS
# A release build of the designer must have
# a release build of this plugin to work properly
# if the QtGui exists, a release build of the designer is assumed
IF(QT_QTGUI_LIBRARY)
ADD_DEFINITIONS(-DQT_NO_DEBUG)
SET(QT_PLUGIN_LIBS
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
)
ENDIF(QT_QTGUI_LIBRARY)
INCLUDE_DIRECTORIES(${QT_QTDESIGNER_INCLUDE_DIR})
QT4_WRAP_CPP ( PluginMocSrcs ${PluginMocHeaders} )
ELSE(DESIRED_QT_VERSION MATCHES 4)
QT_WRAP_CPP ( QVTKWidgetPlugin PluginMocSrcs ${PluginMocHeaders} )
ENDIF(DESIRED_QT_VERSION MATCHES 4)
)
ENDIF(QT_QTGUI_LIBRARY)
INCLUDE_DIRECTORIES(${QT_QTDESIGNER_INCLUDE_DIR})
QT4_WRAP_CPP ( PluginMocSrcs ${PluginMocHeaders} )
# add QVTK plugin from sources
# stand-alone as it doesn't depend on QVTK library
......@@ -301,15 +241,11 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.ctest.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.ctest" @ONLY IMMEDIATE)
# recurse into Chart directory if we have Qt4
IF(DESIRED_QT_VERSION MATCHES 4)
SUBDIRS(Chart)
ENDIF(DESIRED_QT_VERSION MATCHES 4)
# recurse into Chart directory
SUBDIRS(Chart)
# recurse into testing directory if testing is on
IF(DESIRED_QT_VERSION MATCHES 4)
IF(BUILD_TESTING)
SUBDIRS(Testing/Cxx)
ENDIF(BUILD_TESTING)
ENDIF(DESIRED_QT_VERSION MATCHES 4)
ENDIF(DESIRED_QT_VERSION MATCHES 0)
IF(BUILD_TESTING)
SUBDIRS(Testing/Cxx)
ENDIF(BUILD_TESTING)
/*
* Copyright 2004 Sandia Corporation.
* Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
* license for use of this work by or on behalf of the
* U.S. Government. Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that this Notice and any
* statement of authorship are reproduced on all copies.
*/
/*========================================================================
For general information about using VTK and Qt, see:
http://www.trolltech.com/products/3rdparty/vtksupport.html
=========================================================================*/
/*========================================================================
!!! WARNING for those who want to contribute code to this file.
!!! If you use a commercial edition of Qt, you can modify this code.
!!! If you use an open source version of Qt, you are free to modify
!!! and use this code within the guidelines of the GPL license.
!!! Unfortunately, you cannot contribute the changes back into this
!!! file. Doing so creates a conflict between the GPL and BSD-like VTK
!!! license.
=========================================================================*/
#include "qwidgetplugin.h"
#include "QVTKWidget.xpm"
#include "Q3VTKWidgetPlugin.h"
// derive from QWidgetPlugin and implement the plugin interface
class QVTKWidgetPlugin : public QWidgetPlugin
{
public:
QVTKWidgetPlugin();
~QVTKWidgetPlugin();
QStringList keys() const;
QWidget* create( const QString& key, QWidget* parent = 0, const char* name = 0);
QString group( const QString& ) const;
QIconSet iconSet( const QString& ) const;
QString includeFile( const QString& ) const;
QString toolTip( const QString& ) const;
QString whatsThis( const QString& ) const;
bool isContainer( const QString& ) const;
};
// macro for debug printing
#define qDebug(a)
//#define qDebug(a) printf(a)
QVTKWidgetPlugin::QVTKWidgetPlugin()
{
qDebug("QVTKWidgetPlugin instantiated\n");
}
QVTKWidgetPlugin::~QVTKWidgetPlugin()
{
qDebug("QVTKWidgetPlugin destructed\n");
}
//! return a list of keys for what widgets this plugin makes
QStringList QVTKWidgetPlugin::keys() const
{
qDebug("QVTKWidgetPlugin::keys\n");
QStringList list;
list << "QVTKWidget";
return list;
}
//! create a widget by key
QWidget* QVTKWidgetPlugin::create( const QString& key, QWidget* parent, const char* name)
{
qDebug("QVTKWidgetPlugin::create\n");
if(key == "QVTKWidget")
{
QVTKWidget* widget = new QVTKWidget(parent);
widget->setPaletteBackgroundColor(QColor("black"));
// return the widget
return widget;
}
return 0;
}
//! what group this plugin shows up in the designer
QString QVTKWidgetPlugin::group( const QString& feature) const
{
qDebug("QVTKWidgetPlugin::group\n");
if(feature == "QVTKWidget")
return "QVTK";
return QString::null;
}
//! the icons for the widgets
QIconSet QVTKWidgetPlugin::iconSet( const QString& ) const
{
qDebug("QVTKWidgetPlugin::iconSet\n");
return QIconSet( QPixmap( QVTKWidget_image ) );
}
//! the name of the include file for building an app with a widget
QString QVTKWidgetPlugin::includeFile( const QString& feature) const
{
qDebug("QVTKWidgetPlugin::includeFile\n");
if ( feature == "QVTKWidget" )
return "QVTKWidget.h";
return QString::null;
}
//! tool tip text
QString QVTKWidgetPlugin::toolTip( const QString& feature) const
{
qDebug("QVTKWidgetPlugin::toolTip\n");
if(feature == "QVTKWidget")
return "Qt VTK Widget";
return QString::null;
}
//! what's this text
QString QVTKWidgetPlugin::whatsThis( const QString& feature) const
{
qDebug("QVTKWidgetPlugin::whatsThis\n");
if ( feature == "QVTKWidget" )
return "A Qt/VTK Graphics Window";
return QString::null;
}
//! returns whether widget is a container
bool QVTKWidgetPlugin::isContainer( const QString& ) const
{
qDebug("QVTKWidgetPlugin::isContainer\n");
return false;
}
Q_EXPORT_PLUGIN(QVTKWidgetPlugin)
/*
* Copyright 2004 Sandia Corporation.
* Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
* license for use of this work by or on behalf of the
* U.S. Government. Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that this Notice and any
* statement of authorship are reproduced on all copies.
*/
/*========================================================================
For general information about using VTK and Qt, see:
http://www.trolltech.com/products/3rdparty/vtksupport.html
=========================================================================*/
/*========================================================================
!!! WARNING for those who want to contribute code to this file.
!!! If you use a commercial edition of Qt, you can modify this code.
!!! If you use an open source version of Qt, you are free to modify
!!! and use this code within the guidelines of the GPL license.
!!! Unfortunately, you cannot contribute the changes back into this
!!! file. Doing so creates a conflict between the GPL and BSD-like VTK
!!! license.
=========================================================================*/
#include "qwidget.h"
class QVTKWidget : public QWidget
{
Q_OBJECT
public:
QVTKWidget(QWidget* p) : QWidget(p) {}
};
......@@ -38,16 +38,14 @@
#include "vtkTDxWinDevice.h"
#endif
#if QT_VERSION >= 0x040000
# include "QVTKPaintEngine.h"
#endif
#include "qevent.h"
#include "qapplication.h"
#include "qpainter.h"
#include "qsignalmapper.h"
#include "qtimer.h"
#if QT_VERSION >= 0x040000 && defined(Q_WS_X11)
#if defined(Q_WS_X11)
#include "qx11info_x11.h"
#endif
......@@ -74,46 +72,6 @@ static const char* qt_key_to_key_sym(Qt::Key);
// function to dirty cache when a render occurs.
static void dirty_cache(vtkObject *, unsigned long, void *, void *);
#if QT_VERSION < 0x040000
/*! constructor */
QVTKWidget::QVTKWidget(QWidget* parent, const char* name, Qt::WFlags f)
#if QT_VERSION < 0x030000
: QWidget(parent, name, f | 0x10000000) // WWinOwnDC
#else
: QWidget(parent, name, f | Qt::WWinOwnDC )
#endif
, mRenWin(NULL), mPaintEngine(NULL)
cachedImageCleanFlag(false),
automaticImageCache(false), maxImageCacheRenderRate(1.0)
{
this->UseTDx=false;
// no background
this->setBackgroundMode( Qt::NoBackground );
// default to strong focus
this->setFocusPolicy(QWidget::StrongFocus);
// default to enable mouse events when a mouse button isn't down
// so we can send enter/leave events to VTK
this->setMouseTracking(true);
// set expanding to take up space for better default layouts
this->setSizePolicy(
QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding )
);
this->mCachedImage = vtkImageData::New();
this->mCachedImage->SetScalarTypeToUnsignedChar();
this->mCachedImage->SetOrigin(0,0,0);
this->mCachedImage->SetSpacing(1.0,1.0,1.0);
}
#endif
#if QT_VERSION >= 0x040000
/*! constructor */
QVTKWidget::QVTKWidget(QWidget* p, Qt::WFlags f)
: QWidget(p, f | Qt::MSWindowsOwnDC), mRenWin(NULL),
......@@ -152,8 +110,6 @@ QVTKWidget::QVTKWidget(QWidget* p, Qt::WFlags f)
#endif
}
#endif
/*! destructor */
......@@ -164,12 +120,10 @@ QVTKWidget::~QVTKWidget()
this->mCachedImage->Delete();
#if QT_VERSION >= 0x040000
if(mPaintEngine)
{
delete mPaintEngine;
}
#endif
}
// ----------------------------------------------------------------------------
......@@ -243,11 +197,7 @@ void QVTKWidget::SetRenderWindow(vtkRenderWindow* w)
#ifdef Q_WS_X11
// give the qt display id to the vtk window