Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
0c41fe46
Commit
0c41fe46
authored
Jul 22, 2013
by
Jeff Baumes
Committed by
Code Review
Jul 22, 2013
Browse files
Merge topic 'coordinates_in_tooltip' into master
a9abb469
add row/column info to tooltip
parents
c5f21d95
a9abb469
Changes
1
Hide whitespace changes
Inline
Side-by-side
Views/Infovis/vtkTreeHeatmapItem.cxx
View file @
0c41fe46
...
...
@@ -1140,6 +1140,7 @@ bool vtkTreeHeatmapItem::MouseMoveEvent(const vtkContextMouseEvent &event)
//-----------------------------------------------------------------------------
std
::
string
vtkTreeHeatmapItem
::
GetTooltipText
(
float
x
,
float
y
)
{
vtkIdType
column
=
floor
((
x
-
this
->
HeatmapMinX
)
/
this
->
CellWidth
);
int
sceneRow
=
floor
(
y
/
this
->
CellHeight
+
0.5
);
...
...
@@ -1148,7 +1149,20 @@ std::string vtkTreeHeatmapItem::GetTooltipText(float x, float y)
int
dataRow
=
this
->
RowMap
[
sceneRow
];
if
(
dataRow
!=
-
1
)
{
return
this
->
Table
->
GetValue
(
dataRow
,
column
+
1
).
ToString
();
vtkStringArray
*
rowNames
=
vtkStringArray
::
SafeDownCast
(
this
->
Table
->
GetColumn
(
0
));
std
::
string
rowName
=
rowNames
->
GetValue
(
dataRow
);
std
::
string
columnName
=
this
->
Table
->
GetColumn
(
column
+
1
)
->
GetName
();
std
::
string
tooltipText
=
"("
;
tooltipText
+=
rowName
;
tooltipText
+=
", "
;
tooltipText
+=
columnName
;
tooltipText
+=
")
\n
"
;
tooltipText
+=
this
->
Table
->
GetValue
(
dataRow
,
column
+
1
).
ToString
();
return
tooltipText
;
}
return
""
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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