本文整理汇总了Python中PyQt4.Qt.QToolButton.setArrowType方法的典型用法代码示例。如果您正苦于以下问题:Python QToolButton.setArrowType方法的具体用法?Python QToolButton.setArrowType怎么用?Python QToolButton.setArrowType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QToolButton
的用法示例。
在下文中一共展示了QToolButton.setArrowType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt4.Qt import QToolButton [as 别名]
# 或者: from PyQt4.Qt.QToolButton import setArrowType [as 别名]
#.........这里部分代码省略.........
lo2.addWidget(self._whistunzoom, 0)
self._zooming_histogram = False
sliced_axes = rc.slicedAxes()
dprint(1, "sliced axes are", sliced_axes)
self._stokes_axis = None
# subset indication
lo0.addWidget(Separator(self, "Data subset"))
# sliced axis selectors
self._wslicers = []
if sliced_axes:
lo1 = QHBoxLayout()
lo1.setContentsMargins(0, 0, 0, 0)
lo1.setSpacing(2)
lo0.addLayout(lo1)
lo1.addWidget(QLabel("Current slice: ", self))
for i, (iextra, name, labels) in enumerate(sliced_axes):
lo1.addWidget(QLabel("%s:" % name, self))
if name == "STOKES":
self._stokes_axis = iextra
# add controls
wslicer = QComboBox(self)
self._wslicers.append(wslicer)
wslicer.addItems(labels)
wslicer.setToolTip("""<P>Selects current slice along the %s axis.</P>""" % name)
wslicer.setCurrentIndex(self._rc.currentSlice()[iextra])
QObject.connect(wslicer, SIGNAL("activated(int)"), self._currier.curry(self._rc.changeSlice, iextra))
lo2 = QVBoxLayout()
lo1.addLayout(lo2)
lo2.setContentsMargins(0, 0, 0, 0)
lo2.setSpacing(0)
wminus = QToolButton(self)
wminus.setArrowType(Qt.UpArrow)
QObject.connect(wminus, SIGNAL("clicked()"), self._currier.curry(self._rc.incrementSlice, iextra, 1))
if i == 0:
wminus.setShortcut(Qt.SHIFT + Qt.Key_F7)
elif i == 1:
wminus.setShortcut(Qt.SHIFT + Qt.Key_F8)
wplus = QToolButton(self)
wplus.setArrowType(Qt.DownArrow)
QObject.connect(wplus, SIGNAL("clicked()"), self._currier.curry(self._rc.incrementSlice, iextra, -1))
if i == 0:
wplus.setShortcut(Qt.Key_F7)
elif i == 1:
wplus.setShortcut(Qt.Key_F8)
wminus.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
wplus.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
sz = QSize(12, 8)
wminus.setMinimumSize(sz)
wplus.setMinimumSize(sz)
wminus.resize(sz)
wplus.resize(sz)
lo2.addWidget(wminus)
lo2.addWidget(wplus)
lo1.addWidget(wslicer)
lo1.addSpacing(5)
lo1.addStretch(1)
# subset indicator
lo1 = QHBoxLayout()
lo1.setContentsMargins(0, 0, 0, 0)
lo1.setSpacing(2)
lo0.addLayout(lo1)
self._wlab_subset = QLabel("Subset: xxx", self)
self._wlab_subset.setToolTip("""<P>This indicates the current data subset to which the histogram
and the stats given here apply. Use the "Reset to" control on the right to change the