OpenWalnut  1.5.0dev
WQtGLWidget.cpp
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #include <iostream>
26 #include <memory>
27 #include <string>
28 
29 #include <QApplication>
30 #include <QColorDialog>
31 #include <QFileDialog>
32 #include <QKeyEvent>
33 #include <QPixmap>
34 
35 #include "WMainWindow.h"
36 #include "WQtGLScreenCapture.h"
37 #include "WQtGLWidget.h"
38 #include "WQtGui.h"
39 #include "WSettingAction.h"
40 #include "core/common/WColor.h"
41 #include "core/common/WConditionOneShot.h"
42 #include "core/common/WFlag.h"
43 #include "core/common/WLogger.h"
44 #include "core/graphicsEngine/WGE2DManipulator.h"
45 #include "core/graphicsEngine/WGEAdvancedManipulator.h"
46 #include "core/graphicsEngine/WGENoOpManipulator.h"
47 #include "core/graphicsEngine/WGEViewer.h"
48 #include "core/graphicsEngine/WGEZoomTrackballManipulator.h"
49 #include "core/graphicsEngine/WGraphicsEngine.h"
50 #include "core/kernel/WKernel.h"
51 #include "events/WEventTypes.h"
52 #include "events/WRenderedFrameEvent.h"
53 
54 WQtGLWidget::WQtGLWidget( std::string nameOfViewer, QWidget* parent, WGECamera::ProjectionMode projectionMode, const QWidget* shareWidget ):
55  QGLWidget( getDefaultFormat(), parent, dynamic_cast< const QGLWidget* >( shareWidget ) ),
56  m_nameOfViewer( nameOfViewer ),
57  m_firstPaint( true )
58 {
59  m_initialProjectionMode = projectionMode;
60 
61  setSizePolicy( QSizePolicy( QSizePolicy::QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) );
62 
63  // required
64  setAttribute( Qt::WA_PaintOnScreen );
65  setAttribute( Qt::WA_NoSystemBackground );
66  setFocusPolicy( Qt::ClickFocus );
67  setMouseTracking( true );
68 
69  // initialize OpenGL context and OpenSceneGraph
70  osg::ref_ptr<osg::Referenced> wdata; // NULL pointer since not used on Mac
71 
72  // create viewer
74  m_nameOfViewer, wdata, x(), y(), width(), height(), m_initialProjectionMode );
75 
76  connect( &m_Timer, SIGNAL( timeout() ), this, SLOT( updateGL() ) );
77  m_Timer.start( 33 );
78 
79  m_Viewer->isFrameRendered()->getCondition()->subscribeSignal( boost::bind( &WQtGLWidget::notifyFirstRenderedFrame, this ) );
80 
81  m_cameraResetAction = new QAction( WQtGui::getIconManager()->getIcon( "view" ), "Reset", this );
82  connect( m_cameraResetAction, SIGNAL( triggered( bool ) ), this, SLOT( reset() ) );
83  m_cameraResetAction->setToolTip( "Reset view" );
84 
85  // a separate menu for some presets
86  m_cameraPresetMenu = new QMenu( "Camera Presets" );
87  m_cameraPresetResetMenu = new QMenu( "Camera Presets" );
89 
90  // NOTE: the shortcuts for these view presets should be chosen carefully. Most keysequences have another meaning in the most applications
91  // so the user may get confused. It is also not a good idea to take letters as they might be used by OpenSceneGraph widget ( like "S" for
92  // statistics ).
93  // By additionally adding the action to the main window, we ensure the action can be triggered even if the menu bar is hidden.
94  QAction* tmpAction = m_cameraPresetMenu->addAction( WQtGui::getIconManager()->getIcon( "sagittal icon" ), "Left", this,
95  SLOT( setPresetViewLeft() ),
96  QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_L ) );
97  tmpAction->setIconVisibleInMenu( true );
98  m_cameraPresetResetMenu->addAction( tmpAction );
99  tmpAction = m_cameraPresetMenu->addAction( WQtGui::getIconManager()->getIcon( "sagittal icon" ), "Right", this,
100  SLOT( setPresetViewRight() ),
101  QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_R ) );
102  tmpAction->setIconVisibleInMenu( true );
103  m_cameraPresetResetMenu->addAction( tmpAction );
104  tmpAction = m_cameraPresetMenu->addAction( WQtGui::getIconManager()->getIcon( "axial icon" ), "Superior", this,
105  SLOT( setPresetViewSuperior() ),
106  QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_S ) );
107  tmpAction->setIconVisibleInMenu( true );
108  m_cameraPresetResetMenu->addAction( tmpAction );
109  tmpAction = m_cameraPresetMenu->addAction( WQtGui::getIconManager()->getIcon( "axial icon" ), "Inferior", this,
110  SLOT( setPresetViewInferior() ),
111  QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_I ) );
112  tmpAction->setIconVisibleInMenu( true );
113  m_cameraPresetResetMenu->addAction( tmpAction );
114  tmpAction = m_cameraPresetMenu->addAction( WQtGui::getIconManager()->getIcon( "coronal icon" ), "Anterior", this,
115  SLOT( setPresetViewAnterior() ),
116  QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_A ) );
117  tmpAction->setIconVisibleInMenu( true );
118  m_cameraPresetResetMenu->addAction( tmpAction );
119  tmpAction = m_cameraPresetMenu->addAction( WQtGui::getIconManager()->getIcon( "coronal icon" ), "Posterior", this,
120  SLOT( setPresetViewPosterior() ),
121  QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_P ) );
122  tmpAction->setIconVisibleInMenu( true );
123  m_cameraPresetResetMenu->addAction( tmpAction );
124 
125  tmpAction = m_cameraPresetMenu->addAction( WQtGui::getIconManager()->getIcon( "center icon" ), "Fit screen", this,
126  SLOT( setFitScreenPosition() ),
127  QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_F ) );
128  tmpAction->setIconVisibleInMenu( true );
129  m_cameraPresetResetMenu->addAction( tmpAction );
130 }
131 
133 {
134  wlog::debug( "WQtGLWidget" ) << "OpenGL widget for viewer \"" << m_nameOfViewer << "\" removed.";
135  // nothing
136  cleanUp();
137 }
138 
140 {
141  if( m_Viewer )
142  {
143  m_Viewer->setClosed( true );
145  m_Viewer = std::shared_ptr<WGEViewer>();
146  }
147 }
148 
149 void WQtGLWidget::closeEvent( QCloseEvent* event )
150 {
151  event->accept();
152  WQtGLWidgetParent::closeEvent( event );
153 }
154 
156 {
157  if( !m_Viewer )
158  {
159  return;
160  }
161 
162  m_CurrentManipulator = manipulator;
163  switch( manipulator )
164  {
165  case TWO_D:
166  WLogger::getLogger()->addLogMessage( "Switched to camera manipulator \"WGE2D\".",
167  "WQtGLWidget(" + m_Viewer->getName() + ")",
168  LL_DEBUG );
169 
170  m_Viewer->setCameraManipulator( new( WGE2DManipulator ) );
171  break;
172  case NO_OP:
173  WLogger::getLogger()->addLogMessage( "Switched to camera manipulator \"WGENoOp\".",
174  "WQtGLWidget(" + m_Viewer->getName() + ")",
175  LL_DEBUG );
176 
177  m_Viewer->setCameraManipulator( new( WGENoOpManipulator ) );
178  break;
179  case ADVANCED:
180  WLogger::getLogger()->addLogMessage( "Switched to camera manipulator \"ADVANCED\".",
181  "WQtGLWidget(" + m_Viewer->getName() + ")",
182  LL_DEBUG );
183 
184  m_Viewer->setCameraManipulator( new( WGEAdvancedManipulator ) );
185  break;
186  case TRACKBALL:
187  default:
188  WLogger::getLogger()->addLogMessage( "Switched to OSG manipulator \"WGEZoomTrackball\".",
189  "WQtGLWidget(" + m_Viewer->getName() + ")",
190  LL_DEBUG );
191 
192  m_Viewer->setCameraManipulator( new( WGEZoomTrackballManipulator ) );
193  break;
194  }
195 }
196 
198 {
199  return m_CurrentManipulator;
200 }
201 
202 std::shared_ptr< WGEViewer > WQtGLWidget::getViewer() const
203 {
204  return m_Viewer;
205 }
206 
207 void WQtGLWidget::paintEvent( QPaintEvent* event )
208 {
209  if( m_firstPaint )
210  {
211  // it is important to let the GE know that there now is an completely initialized widget -> allowing GE startup to complete
212  // This is needed as on some machines, the OSG crashes if the GL widget is not fully initialized.
213  m_firstPaint = false;
214  WKernel::getRunningKernel()->getGraphicsEngine()->finalizeStartup();
215  }
216  WQtGLWidgetParent::paintEvent( event );
217 }
218 
220 {
221  if( m_Viewer )
222  {
223  if( !m_Viewer->getPaused() )
224  {
225  m_Viewer->paint();
226  }
227  }
228 }
229 
230 void WQtGLWidget::resizeGL( int width, int height )
231 {
232  if( m_Viewer )
233  {
234  m_Viewer->resize( width, height );
235  }
236  WQtGLWidgetParent::resizeGL( width, height );
237 }
238 
239 int WQtGLWidget::translateButton( QMouseEvent* event )
240 {
241  switch( event->button() )
242  {
243  case( Qt::LeftButton ):
244  return 1;
245  case( Qt::MiddleButton ):
246  return 2;
247  case( Qt::RightButton ):
248  return 3;
249  default:
250  return 0;
251  }
252 }
253 
254 void WQtGLWidget::keyPressEvent( QKeyEvent* event )
255 {
256  if( !m_Viewer )
257  {
258  return;
259  }
260 
261  // we ignore auto-repeated keys independent of the window manager settings
262  if( event->isAutoRepeat() )
263  {
264  return;
265  }
266  if( event->text() != "" )
267  {
268  m_Viewer->keyEvent( WGEViewer::KEYPRESS, event->key() );
269  }
270  else
271  {
272  switch( event->modifiers() )
273  {
274  case Qt::ShiftModifier :
275  m_Viewer->keyEvent( WGEViewer::KEYPRESS, osgGA::GUIEventAdapter::KEY_Shift_L );
276  break;
277  case Qt::ControlModifier :
278  m_Viewer->keyEvent( WGEViewer::KEYPRESS, osgGA::GUIEventAdapter::KEY_Control_L );
279  break;
280  default :
281  break;
282  }
283  }
284 }
285 
286 void WQtGLWidget::keyReleaseEvent( QKeyEvent* event )
287 {
288  if( !m_Viewer )
289  {
290  return;
291  }
292 
293  // we ignore auto-repeated keys independent of the window manager settings
294  if( event->isAutoRepeat() )
295  {
296  return;
297  }
298  switch( event->key() )
299  {
300  case Qt::Key_Period:
301  WGraphicsEngine::getGraphicsEngine()->requestShaderReload();
302  break;
303  case Qt::Key_1:
304  setCameraManipulator( TRACKBALL );
305  break;
306  case Qt::Key_2:
307  setCameraManipulator( TWO_D );
308  break;
309  case Qt::Key_3:
310  setCameraManipulator( ADVANCED );
311  break;
312  }
313 
314  switch( event->modifiers() )
315  {
316  case Qt::ShiftModifier :
317  m_Viewer->keyEvent( WGEViewer::KEYRELEASE, osgGA::GUIEventAdapter::KEY_Shift_L );
318  break;
319  case Qt::ControlModifier :
320  m_Viewer->keyEvent( WGEViewer::KEYRELEASE, osgGA::GUIEventAdapter::KEY_Control_L );
321  break;
322  }
323 
324  m_Viewer->keyEvent( WGEViewer::KEYRELEASE, event->key() );
325 }
326 
327 
328 void WQtGLWidget::mousePressEvent( QMouseEvent* event )
329 {
330  if( m_Viewer )
331  {
332  m_Viewer->mouseEvent( WGEViewer::MOUSEPRESS, event->x(), event->y(), translateButton( event ) );
333  }
334 }
335 
336 void WQtGLWidget::mouseDoubleClickEvent( QMouseEvent* event )
337 {
338  if( m_Viewer )
339  {
340  m_Viewer->mouseEvent( WGEViewer::MOUSEDOUBLECLICK, event->x(), event->y(), translateButton( event ) );
341  }
342 }
343 
344 void WQtGLWidget::mouseReleaseEvent( QMouseEvent* event )
345 {
346  if( m_Viewer )
347  {
348  m_Viewer->mouseEvent( WGEViewer::MOUSERELEASE, event->x(), event->y(), translateButton( event ) );
349  }
350 }
351 
352 void WQtGLWidget::mouseMoveEvent( QMouseEvent* event )
353 {
354  if( m_Viewer )
355  {
356  m_Viewer->mouseEvent( WGEViewer::MOUSEMOVE, event->x(), event->y(), 0 );
357  }
358 }
359 
360 void WQtGLWidget::wheelEvent( QWheelEvent* event )
361 {
362  if( m_Viewer )
363  {
364  int x, y;
365  x = event->angleDelta().x();
366  y = event->angleDelta().y();
367 
368  m_Viewer->mouseEvent( WGEViewer::MOUSESCROLL, x, y, 0 );
369  }
370 }
371 
373 {
374  if( event->type() == WQT_RENDERED_FRAME_EVENT )
375  {
376  emit renderedFirstFrame();
377  return true;
378  }
379 
380  return WQtGLWidgetParent::event( event );
381 }
382 
384 {
385  if( m_Viewer )
386  {
387  m_Viewer->reset();
388  }
389 }
390 
392 {
393  QGLFormat format;
394  format.setSwapInterval( 1 ); // according to Qt Doc, this should enable VSync. But it doesn't.
395  return format;
396 }
397 
399 {
400  QCoreApplication::postEvent( this, new WRenderedFrameEvent() );
401 }
402 
404 {
405  if( m_Viewer )
406  {
407  osg::ref_ptr<osgGA::TrackballManipulator> cm = osg::dynamic_pointer_cast<osgGA::TrackballManipulator>( m_Viewer->getCameraManipulator() );
408  osg::Quat q( 0.5, -0.5, -0.5, 0.5 );
409  // is it a trackball manipulator?
410  if( cm )
411  {
412  cm->setRotation( q );
413  }
414  else
415  {
416  wlog::warn( "WQtGLWidget(" + m_Viewer->getName() + ")" ) << "GL Widget does not use a TrackballManipulator. Preset cannot be used.";
417  }
418  }
419 }
420 
422 {
423  if( m_Viewer )
424  {
425  osg::ref_ptr<osgGA::TrackballManipulator> cm = osg::dynamic_pointer_cast<osgGA::TrackballManipulator>( m_Viewer->getCameraManipulator() );
426  osg::Quat q( -0.5, -0.5, -0.5, -0.5 );
427  // is it a trackball manipulator?
428  if( cm )
429  {
430  cm->setRotation( q );
431  }
432  else
433  {
434  wlog::warn( "WQtGLWidget(" + m_Viewer->getName() + ")" ) << "GL Widget does not use a TrackballManipulator. Preset cannot be used.";
435  }
436  }
437 }
438 
440 {
441  if( m_Viewer )
442  {
443  osg::ref_ptr<osgGA::TrackballManipulator> cm = osg::dynamic_pointer_cast<osgGA::TrackballManipulator>( m_Viewer->getCameraManipulator() );
444  osg::Quat q( 0., 0., 0., 1 );
445  // is it a trackball manipulator?
446  if( cm )
447  {
448  cm->setRotation( q );
449  }
450  else
451  {
452  wlog::warn( "WQtGLWidget(" + m_Viewer->getName() + ")" ) << "GL Widget does not use a TrackballManipulator. Preset cannot be used.";
453  }
454  }
455 }
456 
458 {
459  if( m_Viewer )
460  {
461  osg::ref_ptr<osgGA::TrackballManipulator> cm = osg::dynamic_pointer_cast<osgGA::TrackballManipulator>( m_Viewer->getCameraManipulator() );
462  osg::Quat q( 0., -1., 0., 0. );
463  // is it a trackball manipulator?
464  if( cm )
465  {
466  cm->setRotation( q );
467  }
468  else
469  {
470  wlog::warn( "WQtGLWidget(" + m_Viewer->getName() + ")" ) << "GL Widget does not use a TrackballManipulator. Preset cannot be used.";
471  }
472  }
473 }
474 
476 {
477  if( m_Viewer )
478  {
479  osg::ref_ptr<osgGA::TrackballManipulator> cm = osg::dynamic_pointer_cast<osgGA::TrackballManipulator>( m_Viewer->getCameraManipulator() );
480  osg::Quat q( 0., -0.707107, -0.707107, 0. );
481  // is it a trackball manipulator?
482  if( cm )
483  {
484  cm->setRotation( q );
485  }
486  else
487  {
488  wlog::warn( "WQtGLWidget(" + m_Viewer->getName() + ")" ) << "GL Widget does not use a TrackballManipulator. Preset cannot be used.";
489  }
490  }
491 }
492 
494 {
495  if( m_Viewer )
496  {
497  osg::ref_ptr<osgGA::TrackballManipulator> cm = osg::dynamic_pointer_cast<osgGA::TrackballManipulator>( m_Viewer->getCameraManipulator() );
498  osg::Quat q( 0.707107, 0., 0., 0.707107 );
499  // is it a trackball manipulator?
500  if( cm )
501  {
502  cm->setRotation( q );
503  }
504  else
505  {
506  wlog::warn( "WQtGLWidget(" + m_Viewer->getName() + ")" ) << "GL Widget does not use a TrackballManipulator. Preset cannot be used.";
507  }
508  }
509 }
510 
512 {
513  if( m_Viewer )
514  {
515  osg::ref_ptr<WGEZoomTrackballManipulator> cm = osg::dynamic_pointer_cast<WGEZoomTrackballManipulator>( m_Viewer->getCameraManipulator() );
516  if( cm )
517  {
518  osg::Vec3d eye, center, up;
519  cm->getHomePosition( eye, center, up );
520 
521  cm->setCenter( center );
522  cm->fitToScreen( WKernel::getRunningKernel()->getGraphicsEngine()->getViewer()->getCamera() );
523  }
524  else
525  {
526  wlog::warn( "WQtGLWidget(" + m_Viewer->getName() + ")" ) << "GL Widget does not use a TrackballManipulator. Preset cannot be used.";
527  }
528  }
529 }
530 
532 {
533  return m_cameraPresetMenu;
534 }
535 
537 {
539 }
540 
542 {
543  return m_cameraResetAction;
544 }
545 
546 void WQtGLWidget::setPaused( bool pause )
547 {
548  getViewer()->setPaused( pause );
549 }
550 
552 {
553  return getViewer()->getPaused();
554 }
A manipulator which changes the view of a 2D scene.
TrackballManipulator with added mouse wheel zoom.
ProjectionMode
List of possible camera modes.
Definition: WGECamera.h:44
This is an OSG Manipulator implementation which does nothing.
New OSG manipulator: TrackballManipulator with added mouse wheel zoom.
static std::shared_ptr< WGraphicsEngine > getGraphicsEngine()
Returns instance of the graphics engine.
static WKernel * getRunningKernel()
Returns pointer to the currently running kernel.
Definition: WKernel.cpp:117
std::shared_ptr< WGraphicsEngine > getGraphicsEngine() const
Returns pointer to currently running instance of graphics engine.
Definition: WKernel.cpp:122
void addLogMessage(std::string message, std::string source="", LogLevel level=LL_DEBUG)
Appends a log message to the logging queue.
Definition: WLogger.cpp:84
static WLogger * getLogger()
Returns pointer to the currently running logger instance.
Definition: WLogger.cpp:64
QAction * m_cameraResetAction
Camera reset.
Definition: WQtGLWidget.h:345
virtual bool event(QEvent *event)
Custom event dispatcher.
QMenu * getCameraPresetsAndResetMenu()
The presets menu including the reset action.
void setPresetViewPosterior()
Sets the posterior preset view of the main viewer.
void setPresetViewInferior()
Sets the inferior preset view of the main viewer.
void setPresetViewAnterior()
Sets the anterior preset view of the main viewer.
virtual void paintGL()
QT Callback for handling repaints.
CameraManipulators m_CurrentManipulator
Stores the current manipulator.
Definition: WQtGLWidget.h:290
std::shared_ptr< WGEViewer > getViewer() const
Get the included viewer.
QAction * getCameraResetAction()
The action to trigger a camera reset.
WQtGLWidget(std::string nameOfViewer, QWidget *parent=0, WGECamera::ProjectionMode projectionMode=WGECamera::ORTHOGRAPHIC, const QWidget *shareWidget=0)
Default constructor.
Definition: WQtGLWidget.cpp:54
virtual void paintEvent(QPaintEvent *event)
QT Callback for handling repaints.
CameraManipulators getCameraManipulators()
Returns the actually set camera manipulator.
virtual void closeEvent(QCloseEvent *event)
Called on close.
void setPresetViewRight()
Sets the right preset view of the main viewer.
QMenu * m_cameraPresetResetMenu
Camera menu with reset action.
Definition: WQtGLWidget.h:340
WGECamera::ProjectionMode m_initialProjectionMode
Camera projection mode used to initialize widget.
Definition: WQtGLWidget.h:295
virtual void keyReleaseEvent(QKeyEvent *event)
Event handler for key release.
virtual void mouseReleaseEvent(QMouseEvent *event)
Event handler for mouse button release.
void reset()
Resets the contained view using the installed manipulator.
CameraManipulators
List of currently possible camera manipulators.
Definition: WQtGLWidget.h:78
virtual void mouseDoubleClickEvent(QMouseEvent *event)
Event handler for double clicks.
virtual void wheelEvent(QWheelEvent *event)
Event handler for the mouse wheel.
bool m_firstPaint
This flag is set to true if the first paint call occured.
Definition: WQtGLWidget.h:325
virtual void cleanUp()
Called on close.
virtual void mouseMoveEvent(QMouseEvent *event)
Event handler for mouse moves.
static const QGLFormat getDefaultFormat()
Creates and returns a default OpenGL format description with vertical sync enabled.
virtual void mousePressEvent(QMouseEvent *event)
Event handler for mouse button press.
int translateButton(QMouseEvent *event)
Simply translate the mouse button from an event to an int.
bool getPaused() const
Query whether the view is paused or not.
void setFitScreenPosition()
Zooms and centers the view to fit the viewer.
void notifyFirstRenderedFrame()
Called by the WGEViewer to notify about the first frame rendered.
void setPresetViewSuperior()
Sets the superior preset view of the main viewer.
virtual void keyPressEvent(QKeyEvent *event)
Event handler for key press.
virtual void resizeGL(int width, int height)
Event handler for resize events.
std::string m_nameOfViewer
The name of the viewer.
Definition: WQtGLWidget.h:207
void renderedFirstFrame()
Signals that the first frame was rendered.
QMenu * getCameraPresetsMenu()
The presets menu.
void setPresetViewLeft()
Sets the left preset view of the main viewer.
QTimer m_Timer
Timer for periodic repaints.
Definition: WQtGLWidget.h:320
QMenu * m_cameraPresetMenu
Camera menu.
Definition: WQtGLWidget.h:335
void setPaused(bool pause=true)
Pause rendering.
std::shared_ptr< WGEViewer > m_Viewer
The viewer to the scene.
Definition: WQtGLWidget.h:202
virtual ~WQtGLWidget()
Destructor.
void setCameraManipulator(CameraManipulators manipulator)
Sets the camera manipulator to use.
static WIconManager * getIconManager()
Get the icon manager of this gui instance.
Definition: WQtGui.cpp:93
Event signalling a frame was rendered.
WStreamedLogger debug(const std::string &source)
Logging a debug message.
Definition: WLogger.h:331
WStreamedLogger warn(const std::string &source)
Logging a warning message.
Definition: WLogger.h:309