Commit df85f044 authored by Robin Eschbach's avatar Robin Eschbach
Browse files

[FIX #735] more merge problems

parent ed70c9ad
......@@ -68,7 +68,7 @@ ELSEIF( OW_GUI_FORCE_QT6 )
ADD_DEFINITIONS( "-DOW_QT6_REGEXP" )
# QGLWidget was removed, now use QOpenGLWidget
ADD_DEFINITIONS( "-DOW_QT6_GLWIDGET" )
ADD_DEFINITIONS( "-DOW_QT_GLWIDGET" )
# There is no signal mapping for QWidget anymore
ADD_DEFINITIONS( "-DOW_QT6_SIGNALMAPPER" )
......@@ -80,7 +80,7 @@ ELSE()
ENDIF()
# Use QOpenGLWidget instead of deprecated QGLWidget
ADD_DEFINITIONS( "-DOW_QT5_GLWIDGET" )
ADD_DEFINITIONS( "-DOW_QT_GLWIDGET" )
# Special handling if the user specified a QT path manually. Useful when using multiple installations of Qt.
IF( DEFINED ENV{QTDIR} )
......
......@@ -52,7 +52,7 @@
#include "events/WRenderedFrameEvent.h"
WQtGLWidget::WQtGLWidget( std::string nameOfViewer, QWidget* parent, WGECamera::ProjectionMode projectionMode, const QWidget* shareWidget ):
#ifdef OW_QT6_GLWIDGET
#ifdef OW_QT_GLWIDGET
QOpenGLWidget( parent ),
#else
QGLWidget( getDefaultFormat(), parent, dynamic_cast< const QGLWidget* >( shareWidget ) ),
......@@ -61,7 +61,7 @@ WQtGLWidget::WQtGLWidget( std::string nameOfViewer, QWidget* parent, WGECamera::
m_firstPaint( true ),
m_firstFrame( true )
{
#ifdef OW_QT6_GLWIDGET
#ifdef OW_QT_GLWIDGET
setFormat( getDefaultFormat() );
#endif
m_initialProjectionMode = projectionMode;
......@@ -69,7 +69,7 @@ WQtGLWidget::WQtGLWidget( std::string nameOfViewer, QWidget* parent, WGECamera::
setSizePolicy( QSizePolicy( QSizePolicy::QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) );
// This causes QOpenGLWidget to freeze so only use with qt5 and below
#ifndef OW_QT6_GLWIDGET
#ifndef OW_QT_GLWIDGET
setAttribute( Qt::WA_PaintOnScreen );
setAttribute( Qt::WA_NoSystemBackground );
#endif
......@@ -84,7 +84,7 @@ WQtGLWidget::WQtGLWidget( std::string nameOfViewer, QWidget* parent, WGECamera::
m_Viewer = WKernel::getRunningKernel()->getGraphicsEngine()->createViewer(
m_nameOfViewer, wdata, x(), y(), width(), height(), m_initialProjectionMode );
#ifdef OW_QT6_GLWIDGET
#ifdef OW_QT_GLWIDGET
connect( &m_Timer, SIGNAL( timeout() ), this, SLOT( update() ) );
#else
connect( &m_Timer, SIGNAL( timeout() ), this, SLOT( updateGL() ) );
......@@ -281,7 +281,9 @@ void WQtGLWidget::paintGL()
{
if( m_firstFrame )
{
m_Viewer->getView()->getCamera()->getGraphicsContext()->setDefaultFboId( defaultFramebufferObject() );
#ifdef OW_QT_GLWIDGET
m_Viewer->getView()->getCamera()->getGraphicsContext()->setDefaultFboId( defaultFramebufferObject() );
#endif
m_firstFrame = false;
}
......
......@@ -32,14 +32,15 @@
#include <QWidget>
#include <QtCore/QTimer>
#ifdef OW_QT6_GLWIDGET
#ifdef OW_QT_GLWIDGET
#include <QSurfaceFormat> // NOLINT
#include <QOpenGLWidget> // NOLINT
#include <QOpenGLFunctions> // NOLINT
#else
#include <QtOpenGL/QGLFormat>
#include <QtOpenGL/QGLWidget>
#endif
#include <QOpenGLFunctions> // NOLINT
#include <boost/signals2/signal.hpp>
#include "WQtGLScreenCapture.h"
......@@ -49,7 +50,7 @@
class WSettingAction;
#ifdef OW_QT6_GLWIDGET
#ifdef OW_QT_GLWIDGET
typedef QOpenGLWidget WQtGLWidgetParent;
typedef QSurfaceFormat QGLFormat;
#else
......@@ -62,10 +63,7 @@ class WSettingAction;
* \ingroup ui
*/
// NOTE: to make this work with MOC, the defines must be set before MOC runs (ensured in Build system)
class WQtGLWidget: public WQtGLWidgetParent
#ifdef OW_QT6_GLWIDGET
, protected QOpenGLFunctions // NOLINT
#endif
class WQtGLWidget: public WQtGLWidgetParent, protected QOpenGLFunctions // NOLINT
{
Q_OBJECT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment