OpenWalnut
1.5.0dev
|
container widget to hold as GL widget and a slider More...
#include <WQtNavGLWidget.h>
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... | |
WQtGLWidget * | getGLWidget () const |
Gets the contained GL widget instance. More... | |
WQtGLScreenCapture * | getScreenCapture () |
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... | |
QMenu * | getCameraPresetMenu () 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< WGEGroupNode > | m_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... | |
container widget to hold as GL widget and a slider
Definition at line 43 of file WQtNavGLWidget.h.
WQtNavGLWidget::WQtNavGLWidget | ( | QString | viewTitle, |
QString | dockTitle, | ||
QWidget * | parent, | ||
std::string | sliderTitle = "pos" , |
||
const QWidget * | shareWidget = 0 |
||
) |
default constructor
viewTitle | Title will be used as view title |
dockTitle | The title of the dock widget. |
parent | The widget that manages this widget |
sliderTitle | Name of the slider corresponding to the property it manipulates |
shareWidget | this 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.
|
virtual |
|
private |
Update slider if property changed.
void WQtNavGLWidget::removeSliderProperty | ( | std::shared_ptr< WPropertyBase > | prop | ) |
Remove the property to control by the slider.
prop | the property |
Definition at line 85 of file WQtNavGLWidget.cpp.
References WQtGLDockWidget::m_layout, and propertyWidgetMap.
void WQtNavGLWidget::setSliderProperty | ( | std::shared_ptr< WPropertyBase > | prop | ) |
Sets the property to control by the slider.
prop | the property |
Definition at line 75 of file WQtNavGLWidget.cpp.
References WQtGLDockWidget::getGLWidget(), WQtGLDockWidget::m_layout, and propertyWidgetMap.
void WQtNavGLWidget::setSliderTitle | ( | std::string | title | ) |
Set the title of the slider used in this nav widget.
title | the title |
Definition at line 70 of file WQtNavGLWidget.cpp.
References m_sliderTitle.
|
private |
the scene which is displayed by the GL widget
Definition at line 95 of file WQtNavGLWidget.h.
Referenced by WQtNavGLWidget().
|
private |
The slider's title.
Definition at line 90 of file WQtNavGLWidget.h.
Referenced by setSliderTitle(), and WQtNavGLWidget().
|
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().