![]() |
OpenWalnut
1.5.0dev
|
Dock widget containing only a GLWidget. More...
#include <WQtGLDockWidget.h>
Inheritance diagram for WQtGLDockWidget:
Collaboration diagram for WQtGLDockWidget:Public Slots | |
| void | openScreenCaptureConfig () |
| Open screen capture config options. More... | |
Public Slots inherited from WQtDockWidget | |
| void | showHelp () |
| Show help. More... | |
Public Member Functions | |
| 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... | |
Protected Member Functions | |
| 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 | |
| QVBoxLayout * | m_layout |
| Layout of this widget. More... | |
| QWidget * | m_panel |
| The panel widget using m_layout. More... | |
Private Slots | |
| void | handleVisibilityChange (bool visible) |
| If the dock widget changes its visibility. More... | |
Private Attributes | |
| WQtGLWidget * | m_glWidget |
| My GL widget. More... | |
| QString | m_dockTitle |
| The view name and dock title. More... | |
| WQtGLScreenCapture * | m_screenCapture |
| Manager for screen capturing of this view. More... | |
| bool | m_saveViewerSettings |
| If true, the saveSettings method also saves the WGEViewer properties. More... | |
| QToolButton * | m_presetBtn |
| Camera presets. More... | |
Dock widget containing only a GLWidget.
Definition at line 46 of file WQtGLDockWidget.h.
| WQtGLDockWidget::WQtGLDockWidget | ( | QString | viewTitle, |
| QString | dockTitle, | ||
| QWidget * | parent, | ||
| WGECamera::ProjectionMode | projectionMode = WGECamera::ORTHOGRAPHIC, |
||
| 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 |
| projectionMode | The projection mode used in the GL widget. |
| shareWidget | this widget will share OpenGL display lists and texture objects with shareWidget |
Definition at line 52 of file WQtGLDockWidget.cpp.
References WQtDockWidget::addTitleButton(), WQtDockWidget::addTitleProperty(), WQtGLWidget::getCameraPresetsMenu(), WQtGLWidget::getCameraResetAction(), WQtGLScreenCapture::getScreenshotTrigger(), WQtGLWidget::getViewer(), handleVisibilityChange(), m_glWidget, m_layout, m_panel, m_presetBtn, and m_screenCapture.
Here is the call graph for this function:
|
virtual |
|
protectedvirtual |
Called whenever a close event is received.
| event | the event. |
Reimplemented from WQtDockWidget.
Definition at line 184 of file WQtGLDockWidget.cpp.
References WQtDockWidget::closeEvent(), m_glWidget, and WQtGLWidget::setPaused().
Here is the call graph for this function:| void WQtGLDockWidget::forceGLWidgetSize | ( | size_t | w, |
| size_t | h | ||
| ) |
Forces the GL widget to have the desired size.
This is mainly useful for screenshots and similar.
| w | width |
| h | height |
Definition at line 202 of file WQtGLDockWidget.cpp.
References wlog::debug(), and m_glWidget.
Referenced by WQtGLScreenCapture::resolutionChange().
Here is the call graph for this function:
Here is the caller graph for this function:| QMenu * WQtGLDockWidget::getCameraPresetMenu | ( | ) | const |
Get the menu used for camera presets.
Definition at line 244 of file WQtGLDockWidget.cpp.
References WQtGLWidget::getCameraPresetsMenu(), and m_glWidget.
Referenced by WUIQtViewWidget::addCameraPresetGT(), WUIQtViewWidget::clearCameraPresetsGT(), and updateCameraPresetButton().
Here is the call graph for this function:
Here is the caller graph for this function:| const QString & WQtGLDockWidget::getDockTitle | ( | ) | const |
Return the title of the view/dock.
Definition at line 218 of file WQtGLDockWidget.cpp.
References m_dockTitle.
Referenced by WQtGLScreenCapture::WQtGLScreenCapture().
Here is the caller graph for this function:| WQtGLWidget * WQtGLDockWidget::getGLWidget | ( | ) | const |
Gets the contained GL widget instance.
Definition at line 174 of file WQtGLDockWidget.cpp.
References m_glWidget.
Referenced by WUIQtViewWidget::addEventHandler(), WUIQtViewWidget::getViewer(), WUIQtViewWidget::height(), WUIQtViewWidget::realizeImpl(), WQtNavGLWidget::setSliderProperty(), WMainWindow::setupGUI(), WUIQtViewWidget::width(), and WQtNavGLWidget::WQtNavGLWidget().
Here is the caller graph for this function:| bool WQtGLDockWidget::getSaveViewerSettings | ( | ) | const |
Check whether the automatic saving of WGEViewer properties is enabled.
Definition at line 169 of file WQtGLDockWidget.cpp.
References m_saveViewerSettings.
| WQtGLScreenCapture * WQtGLDockWidget::getScreenCapture | ( | ) |
Adds a screen capture dock using this view's screen capture callback.
Definition at line 197 of file WQtGLDockWidget.cpp.
References m_screenCapture.
|
privateslot |
If the dock widget changes its visibility.
| visible | if true, the dock is visible |
Definition at line 179 of file WQtGLDockWidget.cpp.
References WQtGLWidget::getViewer(), and m_glWidget.
Referenced by WQtGLDockWidget().
Here is the call graph for this function:
Here is the caller graph for this function:
|
slot |
Open screen capture config options.
Definition at line 223 of file WQtGLDockWidget.cpp.
References m_screenCapture.
| void WQtGLDockWidget::restoreGLWidgetSize | ( | ) |
Restores the GL widget size if it was fixed with forceMainGLWidgetSize() previously.
Definition at line 208 of file WQtGLDockWidget.cpp.
References m_glWidget, and m_panel.
Referenced by WQtGLScreenCapture::resolutionChange().
Here is the caller graph for this function:
|
virtual |
Restore settings.
Reimplemented from WQtDockWidget.
Definition at line 129 of file WQtGLDockWidget.cpp.
References WMainWindow::getSettings(), WQtGLWidget::getViewer(), m_dockTitle, m_glWidget, m_saveViewerSettings, m_screenCapture, WQtDockWidget::restoreSettings(), and WQtGLScreenCapture::restoreSettings().
Referenced by WMainWindow::setupGUI().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Save settings.
Reimplemented from WQtDockWidget.
Definition at line 112 of file WQtGLDockWidget.cpp.
References WQtGLWidget::getViewer(), m_dockTitle, m_glWidget, m_saveViewerSettings, m_screenCapture, WQtDockWidget::saveSettings(), WQtGLScreenCapture::saveSettings(), and WMainWindow::setSetting().
Here is the call graph for this function:| void WQtGLDockWidget::setSaveViewerSettings | ( | bool | enable = true | ) |
Allow turning the automatic save and restore of viewer-settings.
| enable | true to enable |
Definition at line 164 of file WQtGLDockWidget.cpp.
References m_saveViewerSettings.
Referenced by WUIQtViewWidget::realizeImpl().
Here is the caller graph for this function:
|
protectedvirtual |
Called whenever the widget gets opened.
| event | the event |
Definition at line 191 of file WQtGLDockWidget.cpp.
References m_glWidget, and WQtGLWidget::setPaused().
Here is the call graph for this function:| void WQtGLDockWidget::updateCameraPresetButton | ( | ) |
Update camera button.
Call this when you modify the camera preset menu.
Definition at line 232 of file WQtGLDockWidget.cpp.
References getCameraPresetMenu(), and m_presetBtn.
Referenced by WUIQtViewWidget::addCameraPresetGT(), and WUIQtViewWidget::clearCameraPresetsGT().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
The view name and dock title.
Definition at line 184 of file WQtGLDockWidget.h.
Referenced by getDockTitle(), restoreSettings(), and saveSettings().
|
private |
My GL widget.
Definition at line 179 of file WQtGLDockWidget.h.
Referenced by closeEvent(), forceGLWidgetSize(), getCameraPresetMenu(), getGLWidget(), handleVisibilityChange(), restoreGLWidgetSize(), restoreSettings(), saveSettings(), showEvent(), and WQtGLDockWidget().
|
protected |
Layout of this widget.
Use this to extend the dock width other widgets (i.e. PropWidgets).
Definition at line 146 of file WQtGLDockWidget.h.
Referenced by WQtNavGLWidget::removeSliderProperty(), WQtNavGLWidget::setSliderProperty(), and WQtGLDockWidget().
|
protected |
The panel widget using m_layout.
Definition at line 151 of file WQtGLDockWidget.h.
Referenced by restoreGLWidgetSize(), and WQtGLDockWidget().
|
private |
Camera presets.
Definition at line 199 of file WQtGLDockWidget.h.
Referenced by updateCameraPresetButton(), and WQtGLDockWidget().
|
private |
If true, the saveSettings method also saves the WGEViewer properties.
Definition at line 194 of file WQtGLDockWidget.h.
Referenced by getSaveViewerSettings(), restoreSettings(), saveSettings(), and setSaveViewerSettings().
|
private |
Manager for screen capturing of this view.
Definition at line 189 of file WQtGLDockWidget.h.
Referenced by getScreenCapture(), openScreenCaptureConfig(), restoreSettings(), saveSettings(), WQtGLDockWidget(), and ~WQtGLDockWidget().