Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
8532697d
Commit
8532697d
authored
Mar 10, 2010
by
Sebastian Eichelbaum
Browse files
[MERGE]
parents
5090b4d2
23d97431
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
26 deletions
+17
-26
src/gui/qt4/datasetbrowser/WQtDatasetBrowser.cpp
src/gui/qt4/datasetbrowser/WQtDatasetBrowser.cpp
+1
-3
src/modules/fiberDisplay/WRMROIRepresentation.cpp
src/modules/fiberDisplay/WRMROIRepresentation.cpp
+6
-15
src/modules/fiberDisplay/WRMROIRepresentation.h
src/modules/fiberDisplay/WRMROIRepresentation.h
+10
-8
No files found.
src/gui/qt4/datasetbrowser/WQtDatasetBrowser.cpp
View file @
8532697d
...
...
@@ -311,9 +311,7 @@ void WQtDatasetBrowser::selectTreeItem()
break
;
case
ROI
:
case
SUBROI
:
// TODO(schurade): update rois to use new properties
//props = ( static_cast< WQtRoiTreeItem* >( m_treeWidget->selectedItems().at( 0 ) ) )->getRoi()->getProperties()->getPropertyVector();
//props = module->getProperties2();
props
=
(
static_cast
<
WQtRoiTreeItem
*
>
(
m_treeWidget
->
selectedItems
().
at
(
0
)
)
)
->
getRoi
()
->
getProperties
();
break
;
default:
break
;
...
...
src/modules/fiberDisplay/WRMROIRepresentation.cpp
View file @
8532697d
...
...
@@ -41,8 +41,8 @@ WRMROIRepresentation::WRMROIRepresentation( boost::shared_ptr< WROI > roi, boost
{
roi
->
getSignalIsModified
()
->
connect
(
boost
::
bind
(
&
WRMROIRepresentation
::
setDirty
,
this
)
);
setDirty
();
m_properties
=
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
()
);
m_properties
->
add
Bool
(
"NOT"
,
false
)
->
connect
(
boost
::
bind
(
&
WRMROIRepresentation
::
slot
PropertyChanged
,
this
,
_1
)
);
m_properties
=
boost
::
shared_ptr
<
WProperties
2
>
(
new
WProperties
2
()
);
m_isNot
=
m_properties
->
add
Property
(
"NOT"
,
"description"
,
false
,
boost
::
bind
(
&
WRMROIRepresentation
::
slot
ToggleNot
,
this
)
);
}
WRMROIRepresentation
::~
WRMROIRepresentation
()
...
...
@@ -159,22 +159,13 @@ void WRMROIRepresentation::setDirty()
m_branch
->
setDirty
();
}
void
WRMROIRepresentation
::
slot
PropertyChanged
(
std
::
string
propertyName
)
void
WRMROIRepresentation
::
slot
ToggleNot
(
)
{
if
(
propertyName
==
"NOT"
)
{
m_roi
->
setNot
(
m_properties
->
getValue
<
bool
>
(
propertyName
)
);
setDirty
();
}
else
{
// instead of WLogger we must use std::cerr since WLogger needs to much time!
std
::
cerr
<<
propertyName
<<
std
::
endl
;
assert
(
0
&&
"This property name is not supported by this function yet."
);
}
m_roi
->
setNot
(
m_isNot
->
get
()
);
setDirty
();
}
boost
::
shared_ptr
<
WProperties
>
WRMROIRepresentation
::
getProperties
()
boost
::
shared_ptr
<
WProperties
2
>
WRMROIRepresentation
::
getProperties
()
{
return
m_properties
;
}
src/modules/fiberDisplay/WRMROIRepresentation.h
View file @
8532697d
...
...
@@ -34,7 +34,7 @@
#include <boost/thread/thread.hpp>
#include "WKdTree.h"
#include "./../../common/WProperties.h"
#include "./../../common/WProperties
2
.h"
#include "../../graphicsEngine/WROI.h"
class
WRMBranch
;
/**
...
...
@@ -95,19 +95,16 @@ public:
void
setDirty
();
/**
* getter
*
* \return the properties object
* returns the properties object
*/
boost
::
shared_ptr
<
WProperties
>
getProperties
();
boost
::
shared_ptr
<
WProperties
2
>
getProperties
();
protected:
/**
* slot gets called when a property has changed
*
* \param propertyName
*/
void
slot
PropertyChanged
(
std
::
string
propertyName
);
void
slot
ToggleNot
(
);
private:
/**
* tests the kd tree for intersections with the roi
...
...
@@ -164,7 +161,12 @@ private:
/**
* the property object for the module
*/
boost
::
shared_ptr
<
WProperties
>
m_properties
;
boost
::
shared_ptr
<
WProperties2
>
m_properties
;
/**
* indicates if the roi is negated
*/
WPropBool
m_isNot
;
};
#endif // WRMROIREPRESENTATION_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