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
0c3af408
Commit
0c3af408
authored
Aug 16, 2011
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CHANGE] - the slice-sliders in the navwidgets are back
parent
2ff8517f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
72 deletions
+12
-72
src/qt4gui/qt4/WMainWindow.cpp
src/qt4gui/qt4/WMainWindow.cpp
+6
-65
src/qt4gui/qt4/WQt4Gui.cpp
src/qt4gui/qt4/WQt4Gui.cpp
+0
-1
src/qt4gui/qt4/WQtNavGLWidget.cpp
src/qt4gui/qt4/WQtNavGLWidget.cpp
+4
-4
src/qt4gui/qt4/WQtNavGLWidget.h
src/qt4gui/qt4/WQtNavGLWidget.h
+2
-2
No files found.
src/qt4gui/qt4/WMainWindow.cpp
View file @
0c3af408
...
...
@@ -371,17 +371,23 @@ void WMainWindow::setupGUI()
m_navAxial
=
boost
::
shared_ptr
<
WQtNavGLWidget
>
(
new
WQtNavGLWidget
(
"Axial View"
,
"Axial View"
,
this
,
"Axial Slice"
,
m_mainGLWidget
.
get
()
)
);
m_navAxial
->
setFeatures
(
QDockWidget
::
AllDockWidgetFeatures
);
m_navAxial
->
setSliderProperty
(
WKernel
::
getRunningKernel
()
->
getSelectionManager
()
->
getPropAxialPos
()
);
m_glDock
->
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
m_navAxial
.
get
()
);
m_navCoronal
=
boost
::
shared_ptr
<
WQtNavGLWidget
>
(
new
WQtNavGLWidget
(
"Coronal View"
,
"Coronal View"
,
this
,
"Coronal Slice"
,
m_mainGLWidget
.
get
()
)
);
m_navCoronal
->
setFeatures
(
QDockWidget
::
AllDockWidgetFeatures
);
m_navCoronal
->
setSliderProperty
(
WKernel
::
getRunningKernel
()
->
getSelectionManager
()
->
getPropCoronalPos
()
);
m_glDock
->
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
m_navCoronal
.
get
()
);
m_navSagittal
=
boost
::
shared_ptr
<
WQtNavGLWidget
>
(
new
WQtNavGLWidget
(
"Sagittal View"
,
"Sagittal View"
,
this
,
"Sagittal Slice"
,
m_mainGLWidget
.
get
()
)
);
m_navSagittal
->
setFeatures
(
QDockWidget
::
AllDockWidgetFeatures
);
m_navSagittal
->
setSliderProperty
(
WKernel
::
getRunningKernel
()
->
getSelectionManager
()
->
getPropSagittalPos
()
);
m_glDock
->
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
m_navSagittal
.
get
()
);
bgColorMenu
->
addAction
(
m_navAxial
->
getGLWidget
()
->
getBackgroundColorAction
()
);
...
...
@@ -438,25 +444,6 @@ void WMainWindow::moduleSpecificCleanup( boost::shared_ptr< WModule > module )
prop
=
module
->
getProperties
()
->
findProperty
(
"showSagittal"
);
m_permanentToolBar
->
removeAction
(
propertyActionMap
[
prop
]
);
propertyActionMap
.
erase
(
prop
);
prop
=
module
->
getProperties
()
->
findProperty
(
"Axial Slice"
);
if
(
m_navAxial
)
{
m_navAxial
->
removeSliderProperty
(
prop
);
}
prop
=
module
->
getProperties
()
->
findProperty
(
"Coronal Slice"
);
if
(
m_navCoronal
)
{
m_navCoronal
->
removeSliderProperty
(
prop
);
}
prop
=
module
->
getProperties
()
->
findProperty
(
"Sagittal Slice"
);
if
(
m_navSagittal
)
{
m_navSagittal
->
removeSliderProperty
(
prop
);
}
}
}
...
...
@@ -552,52 +539,6 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
m_permanentToolBar
->
addAction
(
a
);
propertyActionMap
[
prop
]
=
a
;
}
// now setup the nav widget sliders
prop
=
module
->
getProperties
()
->
findProperty
(
"Slices/Axial Position"
);
if
(
!
prop
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Navigation Slices module does not provide the property
\"
Axial Position
\"
, which is required by the GUI."
,
"GUI"
,
LL_ERROR
);
}
else
{
if
(
m_navAxial
)
{
//m_navAxial->setSliderProperty( prop );
}
}
prop
=
module
->
getProperties
()
->
findProperty
(
"Slices/Coronal Position"
);
if
(
!
prop
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Navigation Slices module does not provide the property
\"
Coronal Position
\"
, which is required by the GUI."
,
"GUI"
,
LL_ERROR
);
}
else
{
if
(
m_navCoronal
)
{
//m_navCoronal->setSliderProperty( prop );
}
}
prop
=
module
->
getProperties
()
->
findProperty
(
"Slices/Sagittal Position"
);
if
(
!
prop
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Navigation Slices module does not provide the property
\"
Sagittal Position
\"
, which is required by the GUI."
,
"GUI"
,
LL_ERROR
);
}
else
{
if
(
m_navSagittal
)
{
//m_navSagittal->setSliderProperty( prop );
}
}
}
}
...
...
src/qt4gui/qt4/WQt4Gui.cpp
View file @
0c3af408
...
...
@@ -162,7 +162,6 @@ int WQt4Gui::run()
new
boost
::
function
<
void
(
osg
::
ref_ptr
<
WROI
>
)
>
(
boost
::
bind
(
&
WQt4Gui
::
slotAddRoiToTree
,
this
,
_1
)
)
);
m_kernel
->
getRoiManager
()
->
addAddNotifier
(
assocRoiSignal
);
boost
::
shared_ptr
<
boost
::
function
<
void
(
osg
::
ref_ptr
<
WROI
>
)
>
>
removeRoiSignal
;
removeRoiSignal
=
boost
::
shared_ptr
<
boost
::
function
<
void
(
osg
::
ref_ptr
<
WROI
>
)
>
>
(
...
...
src/qt4gui/qt4/WQtNavGLWidget.cpp
View file @
0c3af408
...
...
@@ -56,7 +56,7 @@ WQtNavGLWidget::WQtNavGLWidget( QString viewTitle, QString dockTitle, QWidget* p
WQtNavGLWidget
::~
WQtNavGLWidget
()
{
for
(
std
::
map
<
boost
::
shared_ptr
<
WPropertyBase
>
,
WProperty
Int
Widget
*
>::
iterator
it
=
propertyWidgetMap
.
begin
();
for
(
std
::
map
<
boost
::
shared_ptr
<
WPropertyBase
>
,
WProperty
Double
Widget
*
>::
iterator
it
=
propertyWidgetMap
.
begin
();
it
!=
propertyWidgetMap
.
end
();
++
it
)
{
...
...
@@ -74,8 +74,8 @@ void WQtNavGLWidget::setSliderTitle( std::string title )
void
WQtNavGLWidget
::
setSliderProperty
(
boost
::
shared_ptr
<
WPropertyBase
>
prop
)
{
WProperty
Int
Widget
*
propWidget
;
propWidget
=
new
WProperty
Int
Widget
(
prop
->
toProp
Int
(),
NULL
,
parentWidget
()
);
WProperty
Double
Widget
*
propWidget
;
propWidget
=
new
WProperty
Double
Widget
(
prop
->
toProp
Double
(),
NULL
,
parentWidget
()
);
propertyWidgetMap
[
prop
]
=
propWidget
;
m_layout
->
addWidget
(
propWidget
);
m_layout
->
setStretchFactor
(
getGLWidget
().
get
(),
1
);
...
...
@@ -84,7 +84,7 @@ void WQtNavGLWidget::setSliderProperty( boost::shared_ptr< WPropertyBase > prop
void
WQtNavGLWidget
::
removeSliderProperty
(
boost
::
shared_ptr
<
WPropertyBase
>
prop
)
{
WProperty
Int
Widget
*
propWidget
=
propertyWidgetMap
[
prop
];
WProperty
Double
Widget
*
propWidget
=
propertyWidgetMap
[
prop
];
m_layout
->
removeWidget
(
propWidget
);
delete
propWidget
;
propertyWidgetMap
.
erase
(
prop
);
...
...
src/qt4gui/qt4/WQtNavGLWidget.h
View file @
0c3af408
...
...
@@ -33,7 +33,7 @@
#include "core/common/WPropertyVariable.h"
#include "core/graphicsEngine/WGEGroupNode.h"
#include "controlPanel/WProperty
Int
Widget.h"
#include "controlPanel/WProperty
Double
Widget.h"
#include "WQtGLDockWidget.h"
...
...
@@ -105,7 +105,7 @@ private:
* Map holding the widgets for module properties added automatically. So they can be removed again automatically
* if the module is removed.
*/
std
::
map
<
boost
::
shared_ptr
<
WPropertyBase
>
,
WProperty
Int
Widget
*
>
propertyWidgetMap
;
std
::
map
<
boost
::
shared_ptr
<
WPropertyBase
>
,
WProperty
Double
Widget
*
>
propertyWidgetMap
;
};
#endif // WQTNAVGLWIDGET_H
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