本文整理汇总了Python中PM.PM_ToolButton.PM_ToolButton.hide方法的典型用法代码示例。如果您正苦于以下问题:Python PM_ToolButton.hide方法的具体用法?Python PM_ToolButton.hide怎么用?Python PM_ToolButton.hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PM.PM_ToolButton.PM_ToolButton
的用法示例。
在下文中一共展示了PM_ToolButton.hide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_ProteinSequenceEditor
# 需要导入模块: from PM.PM_ToolButton import PM_ToolButton [as 别名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import hide [as 别名]
class Ui_ProteinSequenceEditor(PM_DockWidget):
"""
The Ui_DnaSequenceEditor class defines UI elements for the Sequence Editor
object. The sequence editor is usually visible while in DNA edit mode.
It is a DockWidget that is doced at the bottom of the MainWindow
"""
_title = "Sequence Editor"
_groupBoxCount = 0
_lastGroupBox = None
def __init__(self, win):
"""
Constructor for the Ui_DnaSequenceEditor
@param win: The parentWidget (MainWindow) for the sequence editor
"""
self.win = win
parentWidget = win
_superclass.__init__(self, parentWidget, title = self._title)
self._reportsDockWidget_closed_in_show_method = False
self.setFixedHeight(90)
return
def show(self):
"""
Shows the sequence editor. While doing this, it also closes the reports
dock widget (if visible) the state of the reports dockwidget will be
restored when the sequence editor is closed.
@see:self.closeEvent()
"""
self._reportsDockWidget_closed_in_show_method = False
if self.win.viewFullScreenAction.isChecked() or \
self.win.viewSemiFullScreenAction.isChecked():
pass
else:
if self.win.reportsDockWidget.isVisible():
self.win.reportsDockWidget.close()
self._reportsDockWidget_closed_in_show_method = True
_superclass.show(self)
return
def closeEvent(self, event):
"""
Overrides close event. Makes sure that the visible state of the reports
widgetis restored when the sequence editor is closed.
@see: self.show()
"""
_superclass.closeEvent(self, event)
if self.win.viewFullScreenAction.isChecked() or \
self.win.viewSemiFullScreenAction.isChecked():
pass
else:
if self._reportsDockWidget_closed_in_show_method:
self.win.viewReportsAction.setChecked(True)
self._reportsDockWidget_closed_in_show_method = False
return
def _loadWidgets(self):
"""
Overrides PM.PM_DockWidget._loadWidgets. Loads the widget in this
dockwidget.
"""
self._loadMenuWidgets()
self._loadTextEditWidget()
return
def _loadMenuWidgets(self):
"""
Load the various menu widgets (e.g. Open, save sequence options,
Find and replace widgets etc.
"""
self.loadSequenceButton = PM_ToolButton(
self,
iconPath = "ui/actions/Properties Manager/Open.png")
self.saveSequenceButton = PM_ToolButton(
self,
iconPath = "ui/actions/Properties Manager/Save_Strand_Sequence.png")
self.loadSequenceButton.setAutoRaise(True)
self.saveSequenceButton.setAutoRaise(True)
# Hide load and save buttons until they are implemented. -Mark 2008-12-20.
self.loadSequenceButton.hide()
self.saveSequenceButton.hide()
#Find and replace widgets --
self.findLineEdit = \
PM_LineEdit( self,
label = "",
spanWidth = False)
self.findLineEdit.setMaximumWidth(60)
self.replaceLineEdit = \
PM_LineEdit( self,
label = " Replace:",
spanWidth = False)
self.replaceLineEdit.setMaximumWidth(60)
#.........这里部分代码省略.........