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
bec084d9
Commit
bec084d9
authored
Aug 10, 2010
by
Alexander Wiebel
Browse files
[STYLE
#349
] fixed capitalization. Still many more to go.
parent
bfc5ff9b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
31 deletions
+31
-31
src/kernel/modules/data/WMData.cpp
src/kernel/modules/data/WMData.cpp
+5
-5
src/kernel/modules/navSlices/WMNavSlices.cpp
src/kernel/modules/navSlices/WMNavSlices.cpp
+1
-1
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
+6
-6
src/modules/template/WMTemplate.cpp
src/modules/template/WMTemplate.cpp
+19
-19
No files found.
src/kernel/modules/data/WMData.cpp
View file @
bec084d9
...
...
@@ -156,11 +156,11 @@ void WMData::properties()
WPropertyHelper
::
PC_SELECTONLYONE
::
addTo
(
m_colorMapSelection
);
m_matrixSelectionsList
=
boost
::
shared_ptr
<
WItemSelection
>
(
new
WItemSelection
()
);
m_matrixSelectionsList
->
addItem
(
"
n
o matrix"
,
""
);
m_matrixSelectionsList
->
addItem
(
"
N
o matrix"
,
""
);
m_matrixSelectionsList
->
addItem
(
"qform"
,
""
);
m_matrixSelectionsList
->
addItem
(
"sform"
,
""
);
m_matrixSelection
=
m_groupTexManip
->
addProperty
(
"Transformation
M
atrix"
,
"matrix"
,
m_matrixSelection
=
m_groupTexManip
->
addProperty
(
"Transformation
m
atrix"
,
"matrix"
,
m_matrixSelectionsList
->
getSelectorFirst
(),
propertyCallback
);
WPropertyHelper
::
PC_SELECTONLYONE
::
addTo
(
m_matrixSelection
);
...
...
@@ -174,13 +174,13 @@ void WMData::properties()
m_translationZ
->
setMax
(
300
);
m_translationZ
->
setMin
(
-
300
);
m_stretchX
=
m_groupTexManip
->
addProperty
(
"
v
oxel size X"
,
""
,
1.0
,
propertyCallback
);
m_stretchX
=
m_groupTexManip
->
addProperty
(
"
V
oxel size X"
,
""
,
1.0
,
propertyCallback
);
m_stretchX
->
setMax
(
10.
);
m_stretchX
->
setMin
(
-
10.
);
m_stretchY
=
m_groupTexManip
->
addProperty
(
"
v
oxel size Y"
,
""
,
1.0
,
propertyCallback
);
m_stretchY
=
m_groupTexManip
->
addProperty
(
"
V
oxel size Y"
,
""
,
1.0
,
propertyCallback
);
m_stretchY
->
setMax
(
10.
);
m_stretchY
->
setMin
(
-
10.
);
m_stretchZ
=
m_groupTexManip
->
addProperty
(
"
v
oxel size Z"
,
""
,
1.0
,
propertyCallback
);
m_stretchZ
=
m_groupTexManip
->
addProperty
(
"
V
oxel size Z"
,
""
,
1.0
,
propertyCallback
);
m_stretchZ
->
setMax
(
10.
);
m_stretchZ
->
setMin
(
-
10.
);
...
...
src/kernel/modules/navSlices/WMNavSlices.cpp
View file @
bec084d9
...
...
@@ -130,7 +130,7 @@ void WMNavSlices::properties()
m_sagittalPos
=
m_properties
->
addProperty
(
"Sagittal Slice"
,
"Position of sagittal slice."
,
80
);
m_sagittalPos
->
setMin
(
0
);
m_sagittalPos
->
setMax
(
160
);
m_showComplete
=
m_properties
->
addProperty
(
"
s
how complete"
,
"Slice should be drawn complete even if the texture value is zero."
,
false
);
m_showComplete
=
m_properties
->
addProperty
(
"
S
how complete"
,
"Slice should be drawn complete even if the texture value is zero."
,
false
);
m_axialPos
->
setHidden
();
m_coronalPos
->
setHidden
();
...
...
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
View file @
bec084d9
...
...
@@ -93,15 +93,15 @@ void WMArbitraryPlane::properties()
// Initialize the properties
m_propCondition
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
m_showComplete
=
m_properties
->
addProperty
(
"
s
how complete"
,
"Slice should be drawn complete even if the texture value is zero."
,
m_showComplete
=
m_properties
->
addProperty
(
"
S
how complete"
,
"Slice should be drawn complete even if the texture value is zero."
,
false
,
m_propCondition
);
m_showManipulators
=
m_properties
->
addProperty
(
"
s
how manipulators"
,
"Hide/Show manipulators."
,
true
,
m_propCondition
);
m_showManipulators
=
m_properties
->
addProperty
(
"
S
how manipulators"
,
"Hide/Show manipulators."
,
true
,
m_propCondition
);
m_attach2Crosshair
=
m_properties
->
addProperty
(
"
a
ttach to crosshair"
,
"Attach to Crosshair"
,
false
,
m_propCondition
);
m_attach2Crosshair
=
m_properties
->
addProperty
(
"
A
ttach to crosshair"
,
"Attach to Crosshair"
,
false
,
m_propCondition
);
m_buttonReset2Axial
=
m_properties
->
addProperty
(
"Axial"
,
"
r
esets and aligns the plane"
,
WPVBaseTypes
::
PV_TRIGGER_READY
,
m_propCondition
);
m_buttonReset2Coronal
=
m_properties
->
addProperty
(
"Coronal"
,
"
r
esets and aligns the plane"
,
WPVBaseTypes
::
PV_TRIGGER_READY
,
m_propCondition
);
m_buttonReset2Sagittal
=
m_properties
->
addProperty
(
"Sagittal"
,
"
r
esets and aligns the plane"
,
WPVBaseTypes
::
PV_TRIGGER_READY
,
m_propCondition
);
m_buttonReset2Axial
=
m_properties
->
addProperty
(
"Axial"
,
"
R
esets and aligns the plane"
,
WPVBaseTypes
::
PV_TRIGGER_READY
,
m_propCondition
);
m_buttonReset2Coronal
=
m_properties
->
addProperty
(
"Coronal"
,
"
R
esets and aligns the plane"
,
WPVBaseTypes
::
PV_TRIGGER_READY
,
m_propCondition
);
m_buttonReset2Sagittal
=
m_properties
->
addProperty
(
"Sagittal"
,
"
R
esets and aligns the plane"
,
WPVBaseTypes
::
PV_TRIGGER_READY
,
m_propCondition
);
}
void
WMArbitraryPlane
::
moduleMain
()
...
...
src/modules/template/WMTemplate.cpp
View file @
bec084d9
...
...
@@ -197,17 +197,17 @@ void WMTemplate::properties()
// world. As with connectors, a property which not has been added to m_properties is not visible for others. Now, how to add a new property?
m_propCondition
=
boost
::
shared_ptr
<
WCondition
>
(
new
WCondition
()
);
m_aTrigger
=
m_properties
->
addProperty
(
"Do
I
t
N
ow!"
,
"Trigger Button Text."
,
WPVBaseTypes
::
PV_TRIGGER_READY
,
m_aTrigger
=
m_properties
->
addProperty
(
"Do
i
t
n
ow!"
,
"Trigger Button Text."
,
WPVBaseTypes
::
PV_TRIGGER_READY
,
m_propCondition
);
m_enableFeature
=
m_properties
->
addProperty
(
"Enable
F
eature"
,
"Description."
,
true
);
m_anInteger
=
m_properties
->
addProperty
(
"Number of
S
hape
R
ows"
,
"Number of shape rows."
,
10
,
m_propCondition
);
m_anIntegerClone
=
m_properties
->
addProperty
(
"CLONE!Number of
S
hape
R
ows"
,
m_enableFeature
=
m_properties
->
addProperty
(
"Enable
f
eature"
,
"Description."
,
true
);
m_anInteger
=
m_properties
->
addProperty
(
"Number of
s
hape
r
ows"
,
"Number of shape rows."
,
10
,
m_propCondition
);
m_anIntegerClone
=
m_properties
->
addProperty
(
"CLONE!Number of
s
hape
r
ows"
,
"A property which gets modified if
\"
Number of shape rows
\"
gets modified."
,
10
);
m_aDouble
=
m_properties
->
addProperty
(
"Shape
R
adii"
,
"Shape radii."
,
20.0
,
m_propCondition
);
m_aString
=
m_properties
->
addProperty
(
"A
S
tring"
,
"Something."
,
std
::
string
(
"hello"
),
m_propCondition
);
m_aFile
=
m_properties
->
addProperty
(
"A
F
ilenname"
,
"Description."
,
WPathHelper
::
getAppPath
(),
m_propCondition
);
m_aColor
=
m_properties
->
addProperty
(
"A
C
olor"
,
"Description."
,
WColor
(
1.0
,
0.0
,
0.0
,
1.0
)
);
m_aDouble
=
m_properties
->
addProperty
(
"Shape
r
adii"
,
"Shape radii."
,
20.0
,
m_propCondition
);
m_aString
=
m_properties
->
addProperty
(
"A
s
tring"
,
"Something."
,
std
::
string
(
"hello"
),
m_propCondition
);
m_aFile
=
m_properties
->
addProperty
(
"A
f
ilenname"
,
"Description."
,
WPathHelper
::
getAppPath
(),
m_propCondition
);
m_aColor
=
m_properties
->
addProperty
(
"A
c
olor"
,
"Description."
,
WColor
(
1.0
,
0.0
,
0.0
,
1.0
)
);
m_aPosition
=
m_properties
->
addProperty
(
"Somewhere"
,
"Description."
,
wmath
::
WPosition
(
0.0
,
0.0
,
0.0
)
);
// These lines create some new properties and add them to the property list of this module. The specific type to create is determined by the
...
...
@@ -230,8 +230,8 @@ void WMTemplate::properties()
// is simply ugly. Therefore, properties of type WPropSelection are available. First you need to define a list of alternatives:
m_possibleSelections
=
boost
::
shared_ptr
<
WItemSelection
>
(
new
WItemSelection
()
);
m_possibleSelections
->
addItem
(
"Beer"
,
"Cold and fresh."
,
template_bier_xpm
);
// NOTE: you can add XPM images here.
m_possibleSelections
->
addItem
(
"Steaks"
,
"Medium please"
,
template_steak_xpm
);
m_possibleSelections
->
addItem
(
"Sausages"
,
"With Sauerkraut"
,
template_wurst_xpm
);
m_possibleSelections
->
addItem
(
"Steaks"
,
"Medium please
.
"
,
template_steak_xpm
);
m_possibleSelections
->
addItem
(
"Sausages"
,
"With Sauerkraut
.
"
,
template_wurst_xpm
);
// This list of alternatives is NOT the actual property value. It is the list on which so called "WItemSelector" instances work. These
// selectors are the actual property. After you created the first selector instance from the list, it can't be modified anymore. This ensures
...
...
@@ -245,9 +245,9 @@ void WMTemplate::properties()
// Adding a lot of properties might confuse the user. Using WPropGroup, you have the possibility to group your properties together. A
// WPropGroup needs a name and can provide a description. As with properties, the name should not contain any "/" and must be unique.
m_group1
=
m_properties
->
addPropertyGroup
(
"Group
1
"
,
"A nice group for grouping stuff."
);
m_group1
=
m_properties
->
addPropertyGroup
(
"
First
Group"
,
"A nice group for grouping stuff."
);
m_group1a
=
m_group1
->
addPropertyGroup
(
"Group 1a"
,
"A group nested into
\"
Group 1
\"
."
);
m_group2
=
m_properties
->
addPropertyGroup
(
"Group
2
"
,
"Another nice group for grouping stuff."
);
m_group2
=
m_properties
->
addPropertyGroup
(
"
Second
Group"
,
"Another nice group for grouping stuff."
);
// To understand how the groups can be used, you should consider that m_properties itself is a WPropGroup! This means, you can use your newly
// created groups exactly in the same way as you would use m_properties.
...
...
@@ -302,7 +302,7 @@ void WMTemplate::properties()
// special properties serve another purpose. They are used for information output. Your module already provides another property list only
// for these kind of properties. m_infoProperties can be used in the same way as m_properties. The only difference is that each property and
// property group added here can't be modified from the outside world. Here is an example:
m_aIntegerOutput
=
m_infoProperties
->
addProperty
(
"Run
C
ount"
,
"Number of run cycles the module made so far."
,
0
);
m_aIntegerOutput
=
m_infoProperties
->
addProperty
(
"Run
c
ount"
,
"Number of run cycles the module made so far."
,
0
);
// Later on, we will use this property to provide the number of run cycles to the user.
// In more detail, the purpose type of the property gets set to PV_PURPOSE_INFORMATION automatically by m_infoProperties. You can, of course,
// add information properties to your custom groups or m_properties too. There, you need to set the purpose flag of the property manually:
...
...
@@ -310,7 +310,7 @@ void WMTemplate::properties()
std
::
string
(
"<font color=
\"
#00f
\"
size=15>html</font> formatted strings, colors and "
)
+
std
::
string
(
"so on using <font color=
\"
#ff0000
\"
>properties</font>! Isn't it <b>amazing</b>?"
);
m_aStringOutput
=
m_group1a
->
addProperty
(
"A
M
essage"
,
"A message to the user."
,
message
);
m_aStringOutput
=
m_group1a
->
addProperty
(
"A
m
essage"
,
"A message to the user."
,
message
);
m_aStringOutput
->
setPurpose
(
PV_PURPOSE_INFORMATION
);
// This adds the property m_aStringOutput to your group and sets its purpose. The default purpose for all properties is always
// "PV_PURPOSE_PARAMETER". It simply denotes the meaning of the property - its meant to be used as modifier for the module's behaviour; a
...
...
@@ -318,11 +318,11 @@ void WMTemplate::properties()
//
// Some more examples. Please note: Although every property type can be used as information property, not everything is really useful.
m_infoProperties
->
addProperty
(
m_aStringOutput
);
// we can also re-add properties
m_aTriggerOutput
=
m_infoProperties
->
addProperty
(
"A
T
rigger"
,
"Trigger As String"
,
WPVBaseTypes
::
PV_TRIGGER_READY
);
m_aDoubleOutput
=
m_infoProperties
->
addProperty
(
"Some
D
ouble"
,
"a Double. Nice isn't it?"
,
3.1415
);
m_aColorOutput
=
m_infoProperties
->
addProperty
(
"A
C
olor"
,
"Some Color. Nice isn't it?"
,
WColor
(
0.5
,
0.5
,
1.0
,
1.0
)
);
m_aFilenameOutput
=
m_infoProperties
->
addProperty
(
"Nice
F
ile"
,
"a Double. Nice isn't it?"
,
WPathHelper
::
getAppPath
()
);
m_aSelectionOutput
=
m_infoProperties
->
addProperty
(
"A
S
election"
,
"Selection As String"
,
m_possibleSelections
->
getSelectorFirst
()
);
m_aTriggerOutput
=
m_infoProperties
->
addProperty
(
"A
t
rigger"
,
"Trigger As String"
,
WPVBaseTypes
::
PV_TRIGGER_READY
);
m_aDoubleOutput
=
m_infoProperties
->
addProperty
(
"Some
d
ouble"
,
"a Double. Nice isn't it?"
,
3.1415
);
m_aColorOutput
=
m_infoProperties
->
addProperty
(
"A
c
olor"
,
"Some Color. Nice isn't it?"
,
WColor
(
0.5
,
0.5
,
1.0
,
1.0
)
);
m_aFilenameOutput
=
m_infoProperties
->
addProperty
(
"Nice
f
ile"
,
"a Double. Nice isn't it?"
,
WPathHelper
::
getAppPath
()
);
m_aSelectionOutput
=
m_infoProperties
->
addProperty
(
"A
s
election"
,
"Selection As String"
,
m_possibleSelections
->
getSelectorFirst
()
);
}
void
WMTemplate
::
moduleMain
()
...
...
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