OpenWalnut  1.5.0dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WQtNavGLWidget Class Reference

container widget to hold as GL widget and a slider More...

#include <WQtNavGLWidget.h>

+ Inheritance diagram for WQtNavGLWidget:
+ Collaboration diagram for WQtNavGLWidget:

Public Member Functions

 WQtNavGLWidget (QString viewTitle, QString dockTitle, QWidget *parent, std::string sliderTitle="pos", const QWidget *shareWidget=0)
 default constructor More...
 
virtual ~WQtNavGLWidget ()
 destructor. More...
 
void setSliderTitle (std::string title)
 Set the title of the slider used in this nav widget. More...
 
void setSliderProperty (std::shared_ptr< WPropertyBase > prop)
 Sets the property to control by the slider. More...
 
void removeSliderProperty (std::shared_ptr< WPropertyBase > prop)
 Remove the property to control by the slider. More...
 
- Public Member Functions inherited from WQtGLDockWidget
 WQtGLDockWidget (QString viewTitle, QString dockTitle, QWidget *parent, WGECamera::ProjectionMode projectionMode=WGECamera::ORTHOGRAPHIC, const QWidget *shareWidget=0)
 default constructor More...
 
virtual ~WQtGLDockWidget ()
 destructor. More...
 
WQtGLWidgetgetGLWidget () const
 Gets the contained GL widget instance. More...
 
WQtGLScreenCapturegetScreenCapture ()
 Adds a screen capture dock using this view's screen capture callback. More...
 
void forceGLWidgetSize (size_t w, size_t h)
 Forces the GL widget to have the desired size. More...
 
void restoreGLWidgetSize ()
 Restores the GL widget size if it was fixed with forceMainGLWidgetSize() previously. More...
 
const QString & getDockTitle () const
 Return the title of the view/dock. More...
 
virtual void saveSettings ()
 Save settings. More...
 
virtual void restoreSettings ()
 Restore settings. More...
 
void setSaveViewerSettings (bool enable=true)
 Allow turning the automatic save and restore of viewer-settings. More...
 
bool getSaveViewerSettings () const
 Check whether the automatic saving of WGEViewer properties is enabled. More...
 
QMenugetCameraPresetMenu () const
 Get the menu used for camera presets. More...
 
void updateCameraPresetButton ()
 Update camera button. More...
 
- Public Member Functions inherited from WQtDockWidget
 WQtDockWidget (const QString &title, QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags())
 Construct dock widget with title. More...
 
 WQtDockWidget (QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags())
 Construct dock widget. More...
 
virtual ~WQtDockWidget ()
 Destructor. More...
 
virtual void addTitleProperty (WPropTrigger prop, WGEImage::SPtr icon=WGEImage::SPtr())
 Add a property to the title of this dock. More...
 
virtual void addTitleProperty (WPropBool prop, WGEImage::SPtr icon=WGEImage::SPtr())
 Add a property to the title of this dock. More...
 
virtual void addTitleProperty (WPropGroup prop, WGEImage::SPtr icon=WGEImage::SPtr())
 Add a property to the title of this dock. More...
 
virtual void addTitleAction (QAction *action, bool instantPopup=false)
 Add the given action to the titlebar. More...
 
virtual void addTitleButton (QToolButton *button)
 Add the given tool button to the titlebar. More...
 
virtual void removeTitleAction (QAction *action)
 Remove the given action from the list. More...
 
virtual void addTitleSeperator ()
 Add a separator. More...
 
virtual void addTitleWidget (QWidget *widget)
 Add an arbitrary widget. More...
 
virtual void removeTitleWidget (QWidget *widget)
 Remove the specified widget from the title bar. More...
 
virtual void setHelpContext (const QString &id)
 Set a string which identifies help material for this dock. More...
 
virtual const QString & getHelpContext ()
 Return the help context id. More...
 
void disableCloseButton (bool disable=true)
 Disable close button? Might come in handy when embedding these widgets into others. More...
 

Private Member Functions

void handleChangedPropertyValue ()
 Update slider if property changed. More...
 

Private Attributes

QString m_sliderTitle
 The slider's title. More...
 
osg::ref_ptr< WGEGroupNodem_scene
 the scene which is displayed by the GL widget More...
 
std::map< std::shared_ptr< WPropertyBase >, WPropertyDoubleWidget * > propertyWidgetMap
 Map holding the widgets for module properties added automatically. More...
 

Additional Inherited Members

- Public Slots inherited from WQtGLDockWidget
void openScreenCaptureConfig ()
 Open screen capture config options. More...
 
- Public Slots inherited from WQtDockWidget
void showHelp ()
 Show help. More...
 
- Protected Member Functions inherited from WQtGLDockWidget
virtual void closeEvent (QCloseEvent *event)
 Called whenever a close event is received. More...
 
virtual void showEvent (QShowEvent *event)
 Called whenever the widget gets opened. More...
 
- Protected Attributes inherited from WQtGLDockWidget
QVBoxLayout * m_layout
 Layout of this widget. More...
 
QWidget * m_panel
 The panel widget using m_layout. More...
 

Detailed Description

container widget to hold as GL widget and a slider

Definition at line 43 of file WQtNavGLWidget.h.

Constructor & Destructor Documentation

◆ WQtNavGLWidget()

WQtNavGLWidget::WQtNavGLWidget ( QString  viewTitle,
QString  dockTitle,
QWidget *  parent,
std::string  sliderTitle = "pos",
const QWidget *  shareWidget = 0 
)

default constructor

Parameters
viewTitleTitle will be used as view title
dockTitleThe title of the dock widget.
parentThe widget that manages this widget
sliderTitleName of the slider corresponding to the property it manipulates
shareWidgetthis widget will share OpenGL display lists and texture objects with shareWidget

Definition at line 42 of file WQtNavGLWidget.cpp.

References WQtGLDockWidget::getGLWidget(), WQtGLWidget::getViewer(), m_scene, m_sliderTitle, and propertyWidgetMap.

+ Here is the call graph for this function:

◆ ~WQtNavGLWidget()

WQtNavGLWidget::~WQtNavGLWidget ( )
virtual

destructor.

Definition at line 57 of file WQtNavGLWidget.cpp.

References propertyWidgetMap.

Member Function Documentation

◆ handleChangedPropertyValue()

void WQtNavGLWidget::handleChangedPropertyValue ( )
private

Update slider if property changed.

◆ removeSliderProperty()

void WQtNavGLWidget::removeSliderProperty ( std::shared_ptr< WPropertyBase prop)

Remove the property to control by the slider.

Parameters
propthe property

Definition at line 85 of file WQtNavGLWidget.cpp.

References WQtGLDockWidget::m_layout, and propertyWidgetMap.

◆ setSliderProperty()

void WQtNavGLWidget::setSliderProperty ( std::shared_ptr< WPropertyBase prop)

Sets the property to control by the slider.

Parameters
propthe property

Definition at line 75 of file WQtNavGLWidget.cpp.

References WQtGLDockWidget::getGLWidget(), WQtGLDockWidget::m_layout, and propertyWidgetMap.

+ Here is the call graph for this function:

◆ setSliderTitle()

void WQtNavGLWidget::setSliderTitle ( std::string  title)

Set the title of the slider used in this nav widget.

Parameters
titlethe title

Definition at line 70 of file WQtNavGLWidget.cpp.

References m_sliderTitle.

Member Data Documentation

◆ m_scene

osg::ref_ptr< WGEGroupNode > WQtNavGLWidget::m_scene
private

the scene which is displayed by the GL widget

Definition at line 95 of file WQtNavGLWidget.h.

Referenced by WQtNavGLWidget().

◆ m_sliderTitle

QString WQtNavGLWidget::m_sliderTitle
private

The slider's title.

Definition at line 90 of file WQtNavGLWidget.h.

Referenced by setSliderTitle(), and WQtNavGLWidget().

◆ propertyWidgetMap

std::map< std::shared_ptr< WPropertyBase >, WPropertyDoubleWidget* > WQtNavGLWidget::propertyWidgetMap
private

Map holding the widgets for module properties added automatically.

So they can be removed again automatically if the module is removed.

Definition at line 106 of file WQtNavGLWidget.h.

Referenced by removeSliderProperty(), setSliderProperty(), WQtNavGLWidget(), and ~WQtNavGLWidget().


The documentation for this class was generated from the following files: