本文整理汇总了Python中silx.gui.plot.PlotWidget.getInteractiveMode方法的典型用法代码示例。如果您正苦于以下问题:Python PlotWidget.getInteractiveMode方法的具体用法?Python PlotWidget.getInteractiveMode怎么用?Python PlotWidget.getInteractiveMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类silx.gui.plot.PlotWidget
的用法示例。
在下文中一共展示了PlotWidget.getInteractiveMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RGBCorrelatorGraph
# 需要导入模块: from silx.gui.plot import PlotWidget [as 别名]
# 或者: from silx.gui.plot.PlotWidget import getInteractiveMode [as 别名]
#.........这里部分代码省略.........
if button != self.lineProfileButton:
button.setChecked(False)
if self.lineProfileButton.isChecked():
self._setPickerSelectionMode("LINE")
else:
self._setPickerSelectionMode(None)
def setPickerSelectionWith(self, intValue):
self._pickerSelectionWidthValue.setValue(intValue)
#get the current mode
mode = "NONE"
for button in self._pickerSelectionButtons:
if button.isChecked():
if button == self.hLineProfileButton:
mode = "HORIZONTAL"
elif button == self.vLineProfileButton:
mode = "VERTICAL"
elif button == self.lineProfileButton:
mode = "LINE"
ddict = {}
ddict['event'] = "profileWidthChanged"
ddict['pixelwidth'] = self._pickerSelectionWidthValue.value()
ddict['mode'] = mode
self.sigProfileSignal.emit(ddict)
def hideProfileSelectionIcons(self):
if not len(self._pickerSelectionButtons):
return
for button in self._pickerSelectionButtons:
button.setChecked(False)
button.hide()
self._pickerSelectionWidthLabel.hide()
self._pickerSelectionWidthValue.hide()
if self.graph.getInteractiveMode()['mode'] == 'draw':
self.graph.setInteractiveMode('select')
def showProfileSelectionIcons(self):
if not len(self._pickerSelectionButtons):
return
for button in self._pickerSelectionButtons:
button.show()
self._pickerSelectionWidthLabel.show()
self._pickerSelectionWidthValue.show()
def getPickerSelectionMode(self):
if not len(self._pickerSelectionButtons):
return None
if self.hLineProfileButton.isChecked():
return "HORIZONTAL"
if self.vLineProfileButton.isChecked():
return "VERTICAL"
if self.lineProfileButton.isChecked():
return "LINE"
return None
def _setPickerSelectionMode(self, mode=None):
if mode is None:
self.graph.setInteractiveMode('zoom')
else:
if mode == "HORIZONTAL":
shape = "hline"
elif mode == "VERTICAL":
shape = "vline"
else:
shape = "line"
self.graph.setInteractiveMode('draw',