Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
df85f044
Commit
df85f044
authored
Jul 12, 2022
by
Robin Eschbach
Browse files
[FIX
#735
] more merge problems
parent
ed70c9ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
src/qtgui/CMakeLists.txt
src/qtgui/CMakeLists.txt
+2
-2
src/qtgui/WQtGLWidget.cpp
src/qtgui/WQtGLWidget.cpp
+7
-5
src/qtgui/WQtGLWidget.h
src/qtgui/WQtGLWidget.h
+5
-7
No files found.
src/qtgui/CMakeLists.txt
View file @
df85f044
...
...
@@ -68,7 +68,7 @@ ELSEIF( OW_GUI_FORCE_QT6 )
ADD_DEFINITIONS
(
"-DOW_QT6_REGEXP"
)
# QGLWidget was removed, now use QOpenGLWidget
ADD_DEFINITIONS
(
"-DOW_QT
6
_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_QT
5
_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}
)
...
...
src/qtgui/WQtGLWidget.cpp
View file @
df85f044
...
...
@@ -52,7 +52,7 @@
#include "events/WRenderedFrameEvent.h"
WQtGLWidget
::
WQtGLWidget
(
std
::
string
nameOfViewer
,
QWidget
*
parent
,
WGECamera
::
ProjectionMode
projectionMode
,
const
QWidget
*
shareWidget
)
:
#ifdef OW_QT
6
_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_QT
6
_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_QT
6
_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_QT
6
_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
;
}
...
...
src/qtgui/WQtGLWidget.h
View file @
df85f044
...
...
@@ -32,14 +32,15 @@
#include <QWidget>
#include <QtCore/QTimer>
#ifdef OW_QT
6
_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_QT
6
_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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment