Skip to content
Snippets Groups Projects
Commit b4114911 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

TimeSeriesList/HistogramList/ControlPanels have tooltips

parent 3d7d9131
No related branches found
No related tags found
No related merge requests found
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
import wx import wx
import props import props
import pwidgets.widgetlist as widgetlist import pwidgets.widgetlist as widgetlist
import fsl.fsleyes.panel as fslpanel import fsl.fsleyes.panel as fslpanel
import fsl.data.strings as strings import fsl.fsleyes.tooltips as fsltooltips
import fsl.data.strings as strings
class HistogramControlPanel(fslpanel.FSLEyesPanel): class HistogramControlPanel(fslpanel.FSLEyesPanel):
...@@ -45,6 +46,7 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel): ...@@ -45,6 +46,7 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel):
self.__widgets.AddWidget( self.__widgets.AddWidget(
props.makeWidget(self.__widgets, hsPanel, prop), props.makeWidget(self.__widgets, hsPanel, prop),
displayName=strings.properties[hsPanel, prop], displayName=strings.properties[hsPanel, prop],
tooltip=fsltooltips.properties[hsPanel, prop],
groupName='histSettings') groupName='histSettings')
self.__widgets.AddGroup( self.__widgets.AddGroup(
...@@ -54,6 +56,7 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel): ...@@ -54,6 +56,7 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel):
for prop in plotProps: for prop in plotProps:
self.__widgets.AddWidget( self.__widgets.AddWidget(
props.makeWidget(self.__widgets, hsPanel, prop), props.makeWidget(self.__widgets, hsPanel, prop),
tooltip=fsltooltips.properties[hsPanel, prop],
displayName=strings.properties[hsPanel, prop], displayName=strings.properties[hsPanel, prop],
groupName='plotSettings') groupName='plotSettings')
...@@ -80,15 +83,18 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel): ...@@ -80,15 +83,18 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel):
self.__widgets.AddWidget( self.__widgets.AddWidget(
labels, labels,
strings.labels[hsPanel, 'labels'], displayName=strings.labels[hsPanel, 'labels'],
tooltip=fsltooltips.misc[ hsPanel, 'labels'],
groupName='plotSettings') groupName='plotSettings')
self.__widgets.AddWidget( self.__widgets.AddWidget(
xlims, xlims,
strings.labels[hsPanel, 'xlim'], displayName=strings.labels[hsPanel, 'xlim'],
tooltip=fsltooltips.misc[ hsPanel, 'xlim'],
groupName='plotSettings') groupName='plotSettings')
self.__widgets.AddWidget( self.__widgets.AddWidget(
ylims, ylims,
strings.labels[hsPanel, 'ylim'], displayName=strings.labels[hsPanel, 'ylim'],
tooltip=fsltooltips.misc[ hsPanel, 'ylim'],
groupName='plotSettings') groupName='plotSettings')
# We store a ref to the currently selected # We store a ref to the currently selected
...@@ -180,22 +186,28 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel): ...@@ -180,22 +186,28 @@ class HistogramControlPanel(fslpanel.FSLEyesPanel):
wlist.AddWidget(ignoreZeros, wlist.AddWidget(ignoreZeros,
groupName='currentSettings', groupName='currentSettings',
displayName=strings.properties[hs, 'ignoreZeros']) displayName=strings.properties[hs, 'ignoreZeros'],
tooltip=fsltooltips.properties[hs, 'ignoreZeros'])
wlist.AddWidget(showOverlay, wlist.AddWidget(showOverlay,
groupName='currentSettings', groupName='currentSettings',
displayName=strings.properties[hs, 'showOverlay']) displayName=strings.properties[hs, 'showOverlay'],
tooltip=fsltooltips.properties[hs, 'showOverlay'])
wlist.AddWidget(includeOutliers, wlist.AddWidget(includeOutliers,
groupName='currentSettings', groupName='currentSettings',
displayName=strings.properties[hs, 'includeOutliers']) displayName=strings.properties[hs, 'includeOutliers'],
tooltip=fsltooltips.properties[hs, 'includeOutliers'])
wlist.AddWidget(self.__nbins, wlist.AddWidget(self.__nbins,
groupName='currentSettings', groupName='currentSettings',
displayName=strings.properties[hs, 'nbins']) displayName=strings.properties[hs, 'nbins'],
tooltip=fsltooltips.properties[hs, 'nbins'])
wlist.AddWidget(volume, wlist.AddWidget(volume,
groupName='currentSettings', groupName='currentSettings',
displayName=strings.properties[hs, 'volume']) displayName=strings.properties[hs, 'volume'],
tooltip=fsltooltips.properties[hs, 'volume'])
wlist.AddWidget(dataRange, wlist.AddWidget(dataRange,
groupName='currentSettings', groupName='currentSettings',
displayName=strings.properties[hs, 'dataRange']) displayName=strings.properties[hs, 'dataRange'],
tooltip=fsltooltips.properties[hs, 'dataRange'])
if expanded: if expanded:
wlist.Expand('currentSettings') wlist.Expand('currentSettings')
......
...@@ -13,7 +13,7 @@ import numpy as np ...@@ -13,7 +13,7 @@ import numpy as np
import props import props
import pwidgets.elistbox as elistbox import pwidgets.elistbox as elistbox
import fsl.fsleyes.panel as fslpanel import fsl.fsleyes.panel as fslpanel
import fsl.utils.transform as transform import fsl.fsleyes.tooltips as fsltooltips
import fsl.data.strings as strings import fsl.data.strings as strings
import fsl.fsleyes.colourmaps as fslcm import fsl.fsleyes.colourmaps as fslcm
...@@ -38,7 +38,16 @@ class TimeSeriesWidget(wx.Panel): ...@@ -38,7 +38,16 @@ class TimeSeriesWidget(wx.Panel):
'lineWidth') 'lineWidth')
self.lineStyle = props.makeWidget(self, self.lineStyle = props.makeWidget(self,
timeSeries, timeSeries,
'lineStyle') 'lineStyle')
self.colour.SetToolTipString(
fsltooltips.properties[timeSeries, 'colour'])
self.alpha.SetToolTipString(
fsltooltips.properties[timeSeries, 'alpha'])
self.lineWidth.SetToolTipString(
fsltooltips.properties[timeSeries, 'lineWidth'])
self.lineStyle.SetToolTipString(
fsltooltips.properties[timeSeries, 'lineStyle'])
self.sizer = wx.BoxSizer(wx.HORIZONTAL) self.sizer = wx.BoxSizer(wx.HORIZONTAL)
self.SetSizer(self.sizer) self.SetSizer(self.sizer)
...@@ -151,7 +160,11 @@ class TimeSeriesListPanel(fslpanel.FSLEyesPanel): ...@@ -151,7 +160,11 @@ class TimeSeriesListPanel(fslpanel.FSLEyesPanel):
for ts in self.__tsPanel.dataSeries: for ts in self.__tsPanel.dataSeries:
widg = TimeSeriesWidget(self, ts) widg = TimeSeriesWidget(self, ts)
self.__tsList.Append(ts.label, clientData=ts, extraWidget=widg) self.__tsList.Append(
ts.label,
clientData=ts,
tooltip=fsltooltips.properties[ts, 'label'],
extraWidget=widg)
def __locationChanged(self, *a): def __locationChanged(self, *a):
......
...@@ -372,6 +372,7 @@ actions = TypeDict({ ...@@ -372,6 +372,7 @@ actions = TypeDict({
misc = TypeDict({ misc = TypeDict({
'HistogramPanel.labels' : 'X/Y axis labels.',
'HistogramPanel.xlim' : 'X axis data limits.',
'HistogramPanel.ylim' : 'Y axis data limits.'
}) })
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment