本文整理汇总了Python中PyQt4.Qt.QFrame.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QFrame.__init__方法的具体用法?Python QFrame.__init__怎么用?Python QFrame.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QFrame
的用法示例。
在下文中一共展示了QFrame.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, horizontal=False, size=48, parent=None):
QFrame.__init__(self, parent)
if horizontal:
size = 24
self.pi = ProgressIndicator(self, size)
self._jobs = QLabel('<b>'+_('Jobs:')+' 0')
self._jobs.mouseReleaseEvent = self.mouseReleaseEvent
self.shortcut = _('Shift+Alt+J')
if horizontal:
self.setLayout(QHBoxLayout())
self.layout().setDirection(self.layout().RightToLeft)
else:
self.setLayout(QVBoxLayout())
self._jobs.setAlignment(Qt.AlignHCenter|Qt.AlignBottom)
self.layout().addWidget(self.pi)
self.layout().addWidget(self._jobs)
if not horizontal:
self.layout().setAlignment(self._jobs, Qt.AlignHCenter)
self._jobs.setMargin(0)
self.layout().setMargin(0)
self._jobs.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
self.setCursor(Qt.PointingHandCursor)
b = _('Click to see list of jobs')
self.setToolTip(b + u' (%s)'%self.shortcut)
self.action_toggle = QAction(b, parent)
parent.addAction(self.action_toggle)
self.action_toggle.setShortcut(self.shortcut)
self.action_toggle.triggered.connect(self.toggle)
示例2: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, parent, closeButton=True):
QFrame.__init__(self, parent)
self.setMaximumSize(QSize(9999999,22))
self.setObjectName("windowTitle")
self.hboxlayout = QHBoxLayout(self)
self.hboxlayout.setSpacing(0)
self.hboxlayout.setContentsMargins(0,0,4,0)
self.label = QLabel(self)
self.label.setObjectName("label")
self.label.setStyleSheet("padding-left:4px; font:bold 11px; color: #FFFFFF;")
self.hboxlayout.addWidget(self.label)
spacerItem = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
self.hboxlayout.addItem(spacerItem)
if closeButton:
self.pushButton = QPushButton(self)
self.pushButton.setFocusPolicy(Qt.NoFocus)
self.pushButton.setObjectName("pushButton")
self.pushButton.setStyleSheet("font:bold;")
self.pushButton.setText("X")
self.hboxlayout.addWidget(self.pushButton)
self.dragPosition = None
self.mainwidget = self.parent()
self.setStyleSheet("""
QFrame#windowTitle {background-color:#222222;color:#FFF;}
""")
# Initial position to top left
self.dragPosition = self.mainwidget.frameGeometry().topLeft()
示例3: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, *args):
QFrame.__init__(self, *args)
self.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
self.edit = self.PlainTextEdit()
self.number_bar = self.NumberBar(self.edit)
hbox = QHBoxLayout(self)
hbox.setSpacing(0)
hbox.setMargin(0)
hbox.addWidget(self.number_bar)
hbox.addWidget(self.edit)
self.edit.blockCountChanged.connect(self.number_bar.adjustWidth)
self.edit.updateRequest.connect(self.number_bar.updateContents)
示例4: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, parent=None):
QFrame.__init__(self, parent)
self.setFocusPolicy(Qt.StrongFocus)
self.setAutoFillBackground(True)
self.capture = 0
self.setFrameShape(self.StyledPanel)
self.setFrameShadow(self.Raised)
self._layout = l = QGridLayout(self)
self.setLayout(l)
self.header = QLabel('')
l.addWidget(self.header, 0, 0, 1, 2)
self.use_default = QRadioButton('')
self.use_custom = QRadioButton(_('Custom'))
l.addWidget(self.use_default, 1, 0, 1, 3)
l.addWidget(self.use_custom, 2, 0, 1, 3)
self.use_custom.toggled.connect(self.custom_toggled)
off = 2
for which in (1, 2):
text = _('&Shortcut:') if which == 1 else _('&Alternate shortcut:')
la = QLabel(text)
la.setStyleSheet('QLabel { margin-left: 1.5em }')
l.addWidget(la, off+which, 0, 1, 3)
setattr(self, 'label%d'%which, la)
button = QPushButton(_('None'), self)
button.clicked.connect(partial(self.capture_clicked, which=which))
button.keyPressEvent = partial(self.key_press_event, which=which)
setattr(self, 'button%d'%which, button)
clear = QToolButton(self)
clear.setIcon(QIcon(I('clear_left.png')))
clear.clicked.connect(partial(self.clear_clicked, which=which))
setattr(self, 'clear%d'%which, clear)
l.addWidget(button, off+which, 1, 1, 1)
l.addWidget(clear, off+which, 2, 1, 1)
la.setBuddy(button)
self.done_button = doneb = QPushButton(_('Done'), self)
l.addWidget(doneb, 0, 2, 1, 1)
doneb.clicked.connect(lambda : self.editing_done.emit(self))
l.setColumnStretch(0, 100)
self.custom_toggled(False)
示例5: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, *args):
QFrame.__init__(self, *args)
self.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
self.edit = QTextEdit()
self.edit.setFrameStyle(QFrame.NoFrame)
self.edit.setAcceptRichText(False)
self.number_bar = NumberBar()
self.number_bar.setTextEdit(self.edit)
hbox = QHBoxLayout(self)
hbox.setSpacing(0)
hbox.setMargin(0)
hbox.addWidget(self.number_bar)
hbox.addWidget(self.edit)
self.edit.installEventFilter(self)
self.edit.viewport().installEventFilter(self)
示例6: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, main, interpreterLocals, ventana_interprete, *args):
QFrame.__init__(self, *args)
self.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
self.editor = WidgetEditor(self, interpreterLocals, ventana_interprete)
self.editor.setFrameStyle(QFrame.NoFrame)
self.editor.setAcceptRichText(False)
self.number_bar = self.NumberBar()
self.number_bar.setTextEdit(self.editor)
hbox = QHBoxLayout(self)
hbox.setSpacing(0)
hbox.setMargin(0)
hbox.addWidget(self.number_bar)
hbox.addWidget(self.editor)
self.editor.installEventFilter(self)
self.editor.viewport().installEventFilter(self)
示例7: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, parent = None, desc = None, name = None, modal = 0, fl = 0, env = None, type = "QDialog"):
if env is None:
import foundation.env as env # this is a little weird... probably it'll be ok, and logically it seems correct.
self.desc = desc
self.typ = type
if type == "QDialog":
QDialog.__init__(self,parent,name,modal,fl)
elif type == "QTextEdit":
QTextEdit.__init__(self, parent, name)
elif type == "QFrame":
QFrame.__init__(self,parent,name)
else:
print "don't know about type == %r" % (type,)
self.image1 = QPixmap()
self.image1.loadFromData(image1_data,"PNG") # should be: title_icon ####
self.image3 = QPixmap()
self.image3.loadFromData(image3_data,"PNG")
self.image4 = QPixmap()
self.image4.loadFromData(image4_data,"PNG")
self.image5 = QPixmap()
self.image5.loadFromData(image5_data,"PNG")
self.image6 = QPixmap()
self.image6.loadFromData(image6_data,"PNG")
self.image7 = QPixmap()
self.image7.loadFromData(image7_data,"PNG")
self.image0 = QPixmap(image0_data) # should be: border_icon ####
self.image2 = QPixmap(image2_data) # should be: sponsor_pixmap ####
try:
####@@@@
title_icon_name = self.desc.options.get('title_icon')
border_icon_name = self.desc.options.get('border_icon')
if title_icon_name:
self.image1 = imagename_to_pixmap(title_icon_name) ###@@@ pass icon_path
###@@@ import imagename_to_pixmap or use env function
# or let that func itself be an arg, or have an env arg for it
###e rename it icon_name_to_pixmap, or find_icon? (the latter only if it's ok if it returns an iconset)
###e use iconset instead?
if border_icon_name:
self.image0 = imagename_to_pixmap(border_icon_name)
except:
print_compact_traceback("bug in icon-setting code, using fallback icons: ")
pass
if not name:
self.setName("parameter_dialog_or_frame") ###
###k guess this will need: if type == 'QDialog'
self.setIcon(self.image0) # should be: border_icon ####
nanotube_dialogLayout = QVBoxLayout(self,0,0,"nanotube_dialogLayout")
self.heading_frame = QFrame(self,"heading_frame")
self.heading_frame.setPaletteBackgroundColor(QColor(122,122,122))
self.heading_frame.setFrameShape(QFrame.NoFrame)
self.heading_frame.setFrameShadow(QFrame.Plain)
heading_frameLayout = QHBoxLayout(self.heading_frame,0,3,"heading_frameLayout")
self.heading_pixmap = QLabel(self.heading_frame,"heading_pixmap")
self.heading_pixmap.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.heading_pixmap.sizePolicy().hasHeightForWidth()))
self.heading_pixmap.setPixmap(self.image1) # should be: title_icon ####
self.heading_pixmap.setScaledContents(1)
heading_frameLayout.addWidget(self.heading_pixmap)
self.heading_label = QLabel(self.heading_frame,"heading_label")
self.heading_label.setPaletteForegroundColor(QColor(255,255,255))
heading_label_font = QFont(self.heading_label.font())
heading_label_font.setPointSize(12)
heading_label_font.setBold(1)
self.heading_label.setFont(heading_label_font)
heading_frameLayout.addWidget(self.heading_label)
nanotube_dialogLayout.addWidget(self.heading_frame)
self.body_frame = QFrame(self,"body_frame")
self.body_frame.setFrameShape(QFrame.StyledPanel)
self.body_frame.setFrameShadow(QFrame.Raised)
body_frameLayout = QVBoxLayout(self.body_frame,3,3,"body_frameLayout")
self.sponsor_frame = QFrame(self.body_frame,"sponsor_frame")
self.sponsor_frame.setPaletteBackgroundColor(QColor(255,255,255))
self.sponsor_frame.setFrameShape(QFrame.StyledPanel)
self.sponsor_frame.setFrameShadow(QFrame.Raised)
sponsor_frameLayout = QHBoxLayout(self.sponsor_frame,0,0,"sponsor_frameLayout")
self.sponsor_btn = QPushButton(self.sponsor_frame,"sponsor_btn")
self.sponsor_btn.setAutoDefault(0) #bruce 060703 bugfix
self.sponsor_btn.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Preferred,0,0,self.sponsor_btn.sizePolicy().hasHeightForWidth()))
self.sponsor_btn.setPaletteBackgroundColor(QColor(255,255,255))
self.sponsor_btn.setPixmap(self.image2) # should be: sponsor_pixmap #### [also we'll need to support >1 sponsor]
self.sponsor_btn.setFlat(1)
sponsor_frameLayout.addWidget(self.sponsor_btn)
body_frameLayout.addWidget(self.sponsor_frame)
layout59 = QHBoxLayout(None,0,6,"layout59")
left_spacer = QSpacerItem(20,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
layout59.addItem(left_spacer)
#.........这里部分代码省略.........
示例8: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, parent):
QFrame.__init__(self, parent)
self.setFrameShape(QFrame.StyledPanel)
self.setMinimumWidth(250)
self.stack = s = QStackedWidget(self)
self.l = l = QVBoxLayout()
self.setLayout(l)
l.addWidget(s)
self.root_pane = rp = QWidget(self)
self.item_pane = ip = QWidget(self)
self.current_item = None
s.addWidget(rp)
s.addWidget(ip)
self.l1 = la = QLabel('<p>'+_(
'You can edit existing entries in the Table of Contents by clicking them'
' in the panel to the left.')+'<p>'+_(
'Entries with a green tick next to them point to a location that has '
'been verified to exist. Entries with a red dot are broken and may need'
' to be fixed.'))
la.setStyleSheet('QLabel { margin-bottom: 20px }')
la.setWordWrap(True)
l = rp.l = QVBoxLayout()
rp.setLayout(l)
l.addWidget(la)
self.add_new_to_root_button = b = QPushButton(_('Create a &new entry'))
b.clicked.connect(self.add_new_to_root)
l.addWidget(b)
l.addStretch()
self.cfmhb = b = QPushButton(_('Generate ToC from &major headings'))
b.clicked.connect(self.create_from_major_headings)
b.setToolTip(textwrap.fill(_(
'Generate a Table of Contents from the major headings in the book.'
' This will work if the book identifies its headings using HTML'
' heading tags. Uses the <h1>, <h2> and <h3> tags.')))
l.addWidget(b)
self.cfmab = b = QPushButton(_('Generate ToC from &all headings'))
b.clicked.connect(self.create_from_all_headings)
b.setToolTip(textwrap.fill(_(
'Generate a Table of Contents from all the headings in the book.'
' This will work if the book identifies its headings using HTML'
' heading tags. Uses the <h1-6> tags.')))
l.addWidget(b)
self.lb = b = QPushButton(_('Generate ToC from &links'))
b.clicked.connect(self.create_from_links)
b.setToolTip(textwrap.fill(_(
'Generate a Table of Contents from all the links in the book.'
' Links that point to destinations that do not exist in the book are'
' ignored. Also multiple links with the same destination or the same'
' text are ignored.'
)))
l.addWidget(b)
self.cfb = b = QPushButton(_('Generate ToC from &files'))
b.clicked.connect(self.create_from_files)
b.setToolTip(textwrap.fill(_(
'Generate a Table of Contents from individual files in the book.'
' Each entry in the ToC will point to the start of the file, the'
' text of the entry will be the "first line" of text from the file.'
)))
l.addWidget(b)
self.xpb = b = QPushButton(_('Generate ToC from &XPath'))
b.clicked.connect(self.create_from_user_xpath)
b.setToolTip(textwrap.fill(_(
'Generate a Table of Contents from arbitrary XPath expressions.'
)))
l.addWidget(b)
self.fal = b = QPushButton(_('&Flatten the ToC'))
b.clicked.connect(self.flatten_toc)
b.setToolTip(textwrap.fill(_(
'Flatten the Table of Contents, putting all entries at the top level'
)))
l.addWidget(b)
l.addStretch()
self.w1 = la = QLabel(_('<b>WARNING:</b> calibre only supports the '
'creation of linear ToCs in AZW3 files. In a '
'linear ToC every entry must point to a '
'location after the previous entry. If you '
'create a non-linear ToC it will be '
'automatically re-arranged inside the AZW3 file.'
))
la.setWordWrap(True)
l.addWidget(la)
l = ip.l = QGridLayout()
ip.setLayout(l)
la = ip.heading = QLabel('')
l.addWidget(la, 0, 0, 1, 2)
la.setWordWrap(True)
la = ip.la = QLabel(_(
'You can move this entry around the Table of Contents by drag '
'and drop or using the up and down buttons to the left'))
la.setWordWrap(True)
l.addWidget(la, 1, 0, 1, 2)
#.........这里部分代码省略.........
示例9: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, experiment):
"""
Constructor of the main class, which wraps around
the plaintextedit and the numberbar
"""
QFrame.__init__(self)
self.experiment = experiment
self.setFrameStyle(QFrame.NoFrame)
self.edit = self.PlainTextEdit(self)
self.number_bar = self.NumberBar(self.edit)
self.search = QtGui.QLineEdit()
self.search.setMaximumWidth(150)
self.search.returnPressed.connect(self.perform_search)
self.search.setToolTip("Enter a search term")
self.search_button = QtGui.QPushButton(self.experiment.icon("search"), "")
self.search_button.setIconSize(QtCore.QSize(16, 16))
self.search_button.setToolTip("Search")
self.search_button.clicked.connect(self.perform_search)
self.replace_button = QtGui.QPushButton(self.experiment.icon("replace"), "")
self.replace_button.setIconSize(QtCore.QSize(16, 16))
self.replace_button.setToolTip("Replace")
self.replace_button.clicked.connect(self.perform_replace)
self.indent_button = QtGui.QPushButton(self.experiment.icon("indent"), "")
self.indent_button.setIconSize(QtCore.QSize(16, 16))
self.indent_button.setToolTip("Indent one level (tab)")
self.indent_button.clicked.connect(self.edit.indent)
self.unindent_button = QtGui.QPushButton(self.experiment.icon("unindent"), "")
self.unindent_button.setIconSize(QtCore.QSize(16, 16))
self.unindent_button.setToolTip("Unindent one level (super + tab)")
self.unindent_button.clicked.connect(self.edit.unindent)
self.modified = self.experiment.label_image("unsaved_changes")
self.modified.setToolTip("Press Alt + A to apply unsaved changes")
self.modified.hide()
self.apply = QtGui.QPushButton(self.experiment.icon("apply"), "Apply")
self.apply.setToolTip("Press Alt + A to apply unsaved changes")
self.apply.setIconSize(QtCore.QSize(16, 16))
search_widget = QtGui.QWidget()
search_hbox = QtGui.QHBoxLayout(search_widget)
search_hbox.addWidget(self.search)
search_hbox.addWidget(self.search_button)
search_hbox.addWidget(self.replace_button)
search_hbox.addWidget(self.indent_button)
search_hbox.addWidget(self.unindent_button)
search_hbox.addStretch()
search_hbox.addWidget(self.modified)
search_hbox.addWidget(self.apply)
search_hbox.setContentsMargins(0, 0, 0, 0)
main_widget = QtGui.QFrame()
main_widget.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
main_hbox = QtGui.QHBoxLayout(main_widget)
main_hbox.setSpacing(0)
main_hbox.setMargin(0)
main_hbox.addWidget(self.number_bar)
main_hbox.addWidget(self.edit)
vbox = QtGui.QVBoxLayout(self)
vbox.addWidget(main_widget)
vbox.addWidget(search_widget)
vbox.setSpacing(4)
vbox.setMargin(0)
self.edit.blockCountChanged.connect(self.number_bar.adjustWidth)
self.edit.updateRequest.connect(self.number_bar.updateContents)
示例10: __init__
# 需要导入模块: from PyQt4.Qt import QFrame [as 别名]
# 或者: from PyQt4.Qt.QFrame import __init__ [as 别名]
def __init__(self, image, parent, imgman, name=None, save=False):
QFrame.__init__(self, parent)
self.setFrameStyle(QFrame.StyledPanel | QFrame.Raised)
# init state
self.image = image
self._imgman = imgman
self._currier = PersistentCurrier()
self._control_dialog = None
# create widgets
self._lo = lo = QHBoxLayout(self)
lo.setContentsMargins(0, 0, 0, 0)
lo.setSpacing(2)
# raise button
self._wraise = QToolButton(self)
lo.addWidget(self._wraise)
self._wraise.setIcon(pixmaps.raise_up.icon())
self._wraise.setAutoRaise(True)
self._can_raise = False
QObject.connect(self._wraise, SIGNAL("clicked()"), self._raiseButtonPressed)
self._wraise.setToolTip("""<P>Click here to raise this image above other images. Hold the button down briefly to
show a menu of image operations.</P>""")
# center label
self._wcenter = QLabel(self)
self._wcenter.setPixmap(pixmaps.center_image.pm())
self._wcenter.setToolTip(
"<P>The plot is currently centered on (the reference pixel %d,%d) of this image.</P>" % self.image.referencePixel())
lo.addWidget(self._wcenter)
# name/filename label
self.name = image.name
self._wlabel = QLabel(self.name, self)
self._number = 0
self.setName(self.name)
self._wlabel.setToolTip("%s %s" % (image.filename, "\u00D7".join(map(str, image.data().shape))))
lo.addWidget(self._wlabel, 1)
# if 'save' is specified, create a "save" button
if save:
self._wsave = QToolButton(self)
lo.addWidget(self._wsave)
self._wsave.setText("save")
self._wsave.setAutoRaise(True)
self._save_dir = save if isinstance(save, str) else "."
QObject.connect(self._wsave, SIGNAL("clicked()"), self._saveImage)
self._wsave.setToolTip("""<P>Click here to write this image to a FITS file.</P>""")
# render control
dprint(2, "creating RenderControl")
self._rc = RenderControl(image, self)
dprint(2, "done")
# selectors for extra axes
self._wslicers = []
curslice = self._rc.currentSlice(); # this may be loaded from config, so not necessarily 0
for iextra, axisname, labels in self._rc.slicedAxes():
if axisname.upper() not in ["STOKES", "COMPLEX"]:
lbl = QLabel("%s:" % axisname, self)
lo.addWidget(lbl)
else:
lbl = None
slicer = QComboBox(self)
self._wslicers.append(slicer)
lo.addWidget(slicer)
slicer.addItems(labels)
slicer.setToolTip("""<P>Selects current slice along the %s axis.</P>""" % axisname)
slicer.setCurrentIndex(curslice[iextra])
QObject.connect(slicer, SIGNAL("activated(int)"), self._currier.curry(self._rc.changeSlice, iextra))
# min/max display ranges
lo.addSpacing(5)
self._wrangelbl = QLabel(self)
lo.addWidget(self._wrangelbl)
self._minmaxvalidator = FloatValidator(self)
self._wmin = QLineEdit(self)
self._wmax = QLineEdit(self)
width = self._wmin.fontMetrics().width("1.234567e-05")
for w in self._wmin, self._wmax:
lo.addWidget(w, 0)
w.setValidator(self._minmaxvalidator)
w.setMaximumWidth(width)
w.setMinimumWidth(width)
QObject.connect(w, SIGNAL("editingFinished()"), self._changeDisplayRange)
# full-range button
self._wfullrange = QToolButton(self)
lo.addWidget(self._wfullrange, 0)
self._wfullrange.setIcon(pixmaps.zoom_range.icon())
self._wfullrange.setAutoRaise(True)
QObject.connect(self._wfullrange, SIGNAL("clicked()"), self.renderControl().resetSubsetDisplayRange)
rangemenu = QMenu(self)
rangemenu.addAction(pixmaps.full_range.icon(), "Full subset", self.renderControl().resetSubsetDisplayRange)
for percent in (99.99, 99.9, 99.5, 99, 98, 95):
rangemenu.addAction("%g%%" % percent, self._currier.curry(self._changeDisplayRangeToPercent, percent))
self._wfullrange.setPopupMode(QToolButton.DelayedPopup)
self._wfullrange.setMenu(rangemenu)
# update widgets from current display range
self._updateDisplayRange(*self._rc.displayRange())
# lock button
self._wlock = QToolButton(self)
self._wlock.setIcon(pixmaps.unlocked.icon())
self._wlock.setAutoRaise(True)
self._wlock.setToolTip("""<P>Click to lock or unlock the intensity range. When the intensity range is locked across multiple images, any changes in the intensity
range of one are propagated to the others. Hold the button down briefly for additional options.</P>""")
lo.addWidget(self._wlock)
QObject.connect(self._wlock, SIGNAL("clicked()"), self._toggleDisplayRangeLock)
QObject.connect(self.renderControl(), SIGNAL("displayRangeLocked"), self._setDisplayRangeLock)
#.........这里部分代码省略.........