本文整理汇总了Python中PM.PM_LineEdit.PM_LineEdit.hide方法的典型用法代码示例。如果您正苦于以下问题:Python PM_LineEdit.hide方法的具体用法?Python PM_LineEdit.hide怎么用?Python PM_LineEdit.hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PM.PM_LineEdit.PM_LineEdit
的用法示例。
在下文中一共展示了PM_LineEdit.hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_ProteinSequenceEditor
# 需要导入模块: from PM.PM_LineEdit import PM_LineEdit [as 别名]
# 或者: from PM.PM_LineEdit.PM_LineEdit 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)
#.........这里部分代码省略.........
示例2: InsertNanotube_PropertyManager
# 需要导入模块: from PM.PM_LineEdit import PM_LineEdit [as 别名]
# 或者: from PM.PM_LineEdit.PM_LineEdit import hide [as 别名]
#.........这里部分代码省略.........
subControlAreaActionList =[]
self.exitEditCommandAction.setChecked(True)
subControlAreaActionList.append(self.exitEditCommandAction)
separator = QAction(self.w)
separator.setSeparator(True)
subControlAreaActionList.append(separator)
allActionsList.extend(subControlAreaActionList)
#Empty actionlist for the 'Command Area'
commandActionLists = []
#Append empty 'lists' in 'commandActionLists equal to the
#number of actions in subControlArea
for i in range(len(subControlAreaActionList)):
lst = []
commandActionLists.append(lst)
params = (subControlAreaActionList, commandActionLists, allActionsList)
return params
def _addGroupBoxes( self ):
"""
Add the Insert Nanotube Property Manager group boxes.
"""
self._pmGroupBox1 = PM_GroupBox( self, title = "Endpoints" )
self._loadGroupBox1( self._pmGroupBox1 )
self._pmGroupBox1.hide()
self._pmGroupBox2 = PM_GroupBox( self, title = "Parameters" )
self._loadGroupBox2( self._pmGroupBox2 )
self._displayOptionsGroupBox = PM_GroupBox( self,
title = "Display Options" )
self._loadDisplayOptionsGroupBox( self._displayOptionsGroupBox )
self._pmGroupBox3 = PM_GroupBox( self, title = "Nanotube Distortion" )
self._loadGroupBox3( self._pmGroupBox3 )
self._pmGroupBox3.hide() #@ Temporary.
self._pmGroupBox4 = PM_GroupBox( self, title = "Multi-Walled CNTs" )
self._loadGroupBox4( self._pmGroupBox4 )
self._pmGroupBox4.hide() #@ Temporary.
self._pmGroupBox5 = PM_GroupBox( self, title = "Advanced Options" )
self._loadGroupBox5( self._pmGroupBox5 )
self._pmGroupBox5.hide() #@ Temporary.
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 1.
"""
#Following toolbutton facilitates entering a temporary NanotubeLineMode
#to create a CNT using endpoints of the specified line.
self.specifyCntLineButton = PM_ToolButton(
pmGroupBox,
text = "Specify Endpoints",
iconPath = "ui/actions/Properties Manager/Pencil.png",
spanWidth = True
)