本文整理匯總了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)
#.........這裏部分代碼省略.........