Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
33e8719a
Commit
33e8719a
authored
Nov 08, 2012
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CHANGE
#219
] improved gl widget context menu
parent
fe69e859
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
1 deletion
+27
-1
src/qt4gui/qt4/WMainWindow.cpp
src/qt4gui/qt4/WMainWindow.cpp
+2
-1
src/qt4gui/qt4/WQtGLDockWidget.cpp
src/qt4gui/qt4/WQtGLDockWidget.cpp
+5
-0
src/qt4gui/qt4/WQtGLWidget.cpp
src/qt4gui/qt4/WQtGLWidget.cpp
+9
-0
src/qt4gui/qt4/WQtGLWidget.h
src/qt4gui/qt4/WQtGLWidget.h
+11
-0
No files found.
src/qt4gui/qt4/WMainWindow.cpp
View file @
33e8719a
...
...
@@ -356,8 +356,9 @@ void WMainWindow::setupGUI()
controlPanelTrigger
->
setShortcuts
(
controlPanelShortcut
);
this
->
addAction
(
controlPanelTrigger
);
// this enables the action even if the menu bar is invisible
resetButton
->
setMenu
(
m_mainGLWidget
->
getCamera
Pr
eset
sMenu
()
);
m_cameraMenu
->
addAction
(
m_mainGLWidget
->
getCamera
R
eset
Action
()
);
m_cameraMenu
->
addMenu
(
m_mainGLWidget
->
getCameraPresetsMenu
()
);
resetButton
->
setMenu
(
m_mainGLWidget
->
getCameraPresetsMenu
()
);
m_helpAction
=
new
QAction
(
"Help"
,
this
);
m_helpMenu
=
m_menuBar
->
addMenu
(
"Help"
);
...
...
src/qt4gui/qt4/WQtGLDockWidget.cpp
View file @
33e8719a
...
...
@@ -28,6 +28,8 @@
#include "WQt4Gui.h"
#include "WSettingAction.h"
#include "WQtGLDockWidget.h"
#include "WQtGLDockWidget.moc"
...
...
@@ -76,6 +78,9 @@ WQtGLDockWidget::WQtGLDockWidget( QString viewTitle, QString dockTitle, QWidget*
camPresets
->
setMenu
(
getGLWidget
()
->
getCameraPresetsMenu
()
);
addAction
(
camPresets
);
// throwing
addAction
(
getGLWidget
()
->
getThrowingSetting
()
);
// change background color
addAction
(
getGLWidget
()
->
getBackgroundColorAction
()
);
}
...
...
src/qt4gui/qt4/WQtGLWidget.cpp
View file @
33e8719a
...
...
@@ -143,6 +143,10 @@ WQtGLWidget::WQtGLWidget( std::string nameOfViewer, QWidget* parent, WGECamera::
tmpAction
=
m_cameraPresetMenu
->
addAction
(
WQt4Gui
::
getIconManager
()
->
getIcon
(
"coronal icon"
),
"Posterior"
,
this
,
SLOT
(
setPresetViewPosterior
()
),
QKeySequence
(
Qt
::
CTRL
+
Qt
::
SHIFT
+
Qt
::
Key_P
)
);
tmpAction
->
setIconVisibleInMenu
(
true
);
m_cameraResetAction
=
new
QAction
(
WQt4Gui
::
getIconManager
()
->
getIcon
(
"view"
),
"Reset"
,
this
);
connect
(
m_cameraResetAction
,
SIGNAL
(
triggered
(
bool
)
),
this
,
SLOT
(
reset
()
)
);
m_cameraResetAction
->
setToolTip
(
"Reset view"
);
}
WQtGLWidget
::~
WQtGLWidget
()
...
...
@@ -520,3 +524,8 @@ QMenu* WQtGLWidget::getCameraPresetsMenu()
{
return
m_cameraPresetMenu
;
}
QAction
*
WQtGLWidget
::
getCameraResetAction
()
{
return
m_cameraResetAction
;
}
src/qt4gui/qt4/WQtGLWidget.h
View file @
33e8719a
...
...
@@ -153,6 +153,12 @@ public:
*/
QMenu
*
getCameraPresetsMenu
();
/**
* The action to trigger a camera reset.
*
* \return the action
*/
QAction
*
getCameraResetAction
();
signals:
/**
...
...
@@ -351,6 +357,11 @@ private:
*/
QMenu
*
m_cameraPresetMenu
;
/**
* Camera reset.
*/
QAction
*
m_cameraResetAction
;
private
slots
:
/**
* Function to handle updates in the setting \ref m_allowThrowSetting.
...
...
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