本文整理汇总了Python中PM.PM_ToolButton.PM_ToolButton.setToolButtonStyle方法的典型用法代码示例。如果您正苦于以下问题:Python PM_ToolButton.setToolButtonStyle方法的具体用法?Python PM_ToolButton.setToolButtonStyle怎么用?Python PM_ToolButton.setToolButtonStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PM.PM_ToolButton.PM_ToolButton
的用法示例。
在下文中一共展示了PM_ToolButton.setToolButtonStyle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _loadMovieFilesGroupBox
# 需要导入模块: from PM.PM_ToolButton import PM_ToolButton [as 别名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 别名]
def _loadMovieFilesGroupBox(self, inPmGroupBox):
"""
Load widgets in the Open/Save Movie Files group box.
@param inPmGroupBox: The Open/Save Movie Files groupbox in the PM
@type inPmGroupBox: L{PM_GroupBox}
"""
for action in self.fileOpenMovieAction, self.fileSaveMovieAction:
btn = PM_ToolButton(inPmGroupBox,
text = str(action.text()),
spanWidth = True)
btn.setDefaultAction(action)
btn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
示例2: Ui_MovePropertyManager
# 需要导入模块: from PM.PM_ToolButton import PM_ToolButton [as 别名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 别名]
#.........这里部分代码省略.........
"ui/actions/Properties Manager/TranslateY.png", "", "Y", 2),
( "QToolButton", 4, "TRANSZ",
"ui/actions/Properties Manager/TranslateZ.png", "", "Z", 3),
( "QToolButton", 5, "ROT_TRANS_ALONG_AXIS",
"ui/actions/Properties Manager/translate+rotate-A.png", "", \
"A", 4)
]
self.freeDragTranslateButtonGroup = \
PM_ToolButtonRow( inPmGroupBox,
title = "",
buttonList = BUTTON_LIST,
checkedId = 1,
setAsDefault = True,
)
self.transFreeButton =self.freeDragTranslateButtonGroup.getButtonById(1)
self.transXButton = self.freeDragTranslateButtonGroup.getButtonById(2)
self.transYButton = self.freeDragTranslateButtonGroup.getButtonById(3)
self.transZButton = self.freeDragTranslateButtonGroup.getButtonById(4)
self.transAlongAxisButton = \
self.freeDragTranslateButtonGroup.getButtonById(5)
self.moveFromToButton = PM_ToolButton(
inPmGroupBox,
text = "Translate from/to",
iconPath = "ui/actions/Properties Manager"\
"/Translate_Components.png",
spanWidth = True
)
self.moveFromToButton.setCheckable(True)
self.moveFromToButton.setAutoRaise(True)
self.moveFromToButton.setToolButtonStyle(
Qt.ToolButtonTextBesideIcon)
self.startCoordLineEdit = PM_LineEdit(
inPmGroupBox,
label = "ui/actions/Properties Manager"\
"/Move_Start_Point.png",
text = "Define 'from' and 'to' points",
setAsDefault = False,
)
self.startCoordLineEdit.setReadOnly(True)
self.startCoordLineEdit.setEnabled(False)
def _loadByDeltaGroupBox(self, inPmGroupBox):
"""
Load widgets in the translate By Delta group box, which is present
within the Translate groupbox.
@param inPmGroupBox: The Translate By Delta group box in the translate
group box.
@type inPmGroupBox: L{PM_GroupBox}
"""
self.moveDeltaXSpinBox = \
PM_DoubleSpinBox(
inPmGroupBox,
label = "ui/actions/Properties Manager/Delta_X.png",
value = 0.0,
setAsDefault = True,
minimum = -100.0,
maximum = 100.0,
singleStep = 1.0,
decimals = 3,
示例3: QuteMolPropertyManager
# 需要导入模块: from PM.PM_ToolButton import PM_ToolButton [as 别名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 别名]
class QuteMolPropertyManager(Command_PropertyManager):
"""
The QuteMolPropertyManager class provides a Property Manager for
QuteMolX, allowing its launch for external rendering of the model.
"""
# The title that appears in the Property Manager header.
title = "QuteMolX"
# The name of this Property Manager. This will be set to
# the name of the PM_Dialog object via setObjectName().
pmName = title
# The relative path to the PNG file that appears in the header
iconPath = "ui/actions/Properties Manager/QuteMol.png"
# DNA Display choices.
_axes_display_choices = [ "Render axes",
"Hide axes" ]
_bases_display_choices = [ "Render bases",
"Hide bases" ]
#"Color bases black",
#"Color bases by type" ]
# PDB exclude flags = _axesFlags | _basesFlags
_axesFlags = EXCLUDE_HIDDEN_ATOMS
_basesFlags = EXCLUDE_HIDDEN_ATOMS
def __init__( self, command ):
"""
Constructor for the property manager.
"""
_superclass.__init__(self, command)
self.showTopRowButtons( PM_DONE_BUTTON | \
PM_WHATS_THIS_BUTTON)
msg = "Select a QuteMolX rendering style and click the "\
"<b>Launch QuteMolX</b> button when ready."
# This causes the "Message" box to be displayed as well.
self.updateMessage(msg)
def _addGroupBoxes(self):
"""
Add the 1st group box to the Property Manager.
"""
self.pmGroupBox1 = PM_GroupBox(self, title = "DNA Display Options")
self._loadGroupBox1(self.pmGroupBox1)
self.pmGroupBox2 = PM_GroupBox(self, title = "Launch")
self._loadGroupBox2(self.pmGroupBox2)
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in 1st group box.
@param pmGroupBox: The 1st group box in the PM.
@type pmGroupBox: L{PM_GroupBox}
"""
self.axesCombobox = PM_ComboBox(
pmGroupBox,
label = 'Axes: ',
choices = self._axes_display_choices,
index = 0,
setAsDefault = True,
spanWidth = False )
self.basesCombobox = PM_ComboBox(
pmGroupBox,
label = 'Bases: ',
choices = self._bases_display_choices,
index = 0,
setAsDefault = True,
spanWidth = False )
def _loadGroupBox2(self, pmGroupBox):
"""
Load widgets in 2nd group box.
@param pmGroupBox: The 1st group box in the PM.
@type pmGroupBox: L{PM_GroupBox}
"""
self.launchQuteMolButton = PM_ToolButton(
pmGroupBox,
text = "Launch QuteMolX",
iconPath = "ui/actions/Properties Manager/QuteMol.png",
spanWidth = True )
self.launchQuteMolButton.setToolButtonStyle(
Qt.ToolButtonTextBesideIcon)
def _addWhatsThisText(self):
"""
"What's This" text for widgets in this Property Manager.
"""
from ne1_ui.WhatsThisText_for_PropertyManagers import whatsThis_QuteMolPropertyManager
whatsThis_QuteMolPropertyManager(self)
#.........这里部分代码省略.........
示例4: QuteMolPropertyManager
# 需要导入模块: from PM.PM_ToolButton import PM_ToolButton [as 别名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 别名]
class QuteMolPropertyManager(PM_Dialog):
"""
The QuteMolPropertyManager class provides a Property Manager for
QuteMolX, allowing its launch for external rendering of the model.
"""
# The title that appears in the Property Manager header.
title = "QuteMolX"
# The name of this Property Manager. This will be set to
# the name of the PM_Dialog object via setObjectName().
pmName = title
# The relative path to the PNG file that appears in the header
iconPath = "ui/actions/Properties Manager/QuteMol.png"
# DNA Display choices.
_axes_display_choices = [ "Render axes",
"Hide axes" ]
_bases_display_choices = [ "Render bases",
"Hide bases" ]
#"Color bases black",
#"Color bases by type" ]
# PDB exclude flags = _axesFlags | _basesFlags
_axesFlags = EXCLUDE_HIDDEN_ATOMS
_basesFlags = EXCLUDE_HIDDEN_ATOMS
def __init__(self, win):
"""
Construct the QuteMolX Property Manager.
@param win: The main window.
@type win: QMainWindow
"""
self.win = win
self.pw = None
PM_Dialog.__init__( self, self.pmName, self.iconPath, self.title )
msg = "Select a QuteMolX rendering style and click the \
<b>Launch QuteMolX</b> button when ready."
# This causes the "Message" box to be displayed as well.
self.updateMessage(msg)
# Hide Preview and Restore defaults button for Alpha9.
self.hideTopRowButtons(PM_RESTORE_DEFAULTS_BUTTON | PM_PREVIEW_BUTTON)
def _addGroupBoxes(self):
"""
Add the 1st group box to the Property Manager.
"""
self.pmGroupBox1 = PM_GroupBox(self, title = "DNA Display Options")
self._loadGroupBox1(self.pmGroupBox1)
self.pmGroupBox2 = PM_GroupBox(self, title = "Launch")
self._loadGroupBox2(self.pmGroupBox2)
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in 1st group box.
@param pmGroupBox: The 1st group box in the PM.
@type pmGroupBox: L{PM_GroupBox}
"""
self.axesCombobox = PM_ComboBox(
pmGroupBox,
label = 'Axes: ',
choices = self._axes_display_choices,
index = 0,
setAsDefault = True,
spanWidth = False )
self.basesCombobox = PM_ComboBox(
pmGroupBox,
label = 'Bases: ',
choices = self._bases_display_choices,
index = 0,
setAsDefault = True,
spanWidth = False )
def _loadGroupBox2(self, pmGroupBox):
"""
Load widgets in 2nd group box.
@param pmGroupBox: The 1st group box in the PM.
@type pmGroupBox: L{PM_GroupBox}
"""
self.launchQuteMolButton = PM_ToolButton(
pmGroupBox,
text = "Launch QuteMolX",
iconPath = "ui/actions/Properties Manager/QuteMol.png",
spanWidth = True )
self.launchQuteMolButton.setToolButtonStyle(
Qt.ToolButtonTextBesideIcon)
def _addWhatsThisText(self):
#.........这里部分代码省略.........
示例5: InsertNanotube_PropertyManager
# 需要导入模块: from PM.PM_ToolButton import PM_ToolButton [as 别名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 别名]
#.........这里部分代码省略.........
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
)
self.specifyCntLineButton.setCheckable(True)
self.specifyCntLineButton.setAutoRaise(True)
self.specifyCntLineButton.setToolButtonStyle(
Qt.ToolButtonTextBesideIcon)
#EndPoint1 and endPoint2 coordinates. These widgets are hidden
# as of 2007- 12 - 05
self._endPoint1SpinBoxes = PM_CoordinateSpinBoxes(pmGroupBox,
label = "End Point 1")
self.x1SpinBox = self._endPoint1SpinBoxes.xSpinBox
self.y1SpinBox = self._endPoint1SpinBoxes.ySpinBox
self.z1SpinBox = self._endPoint1SpinBoxes.zSpinBox
self._endPoint2SpinBoxes = PM_CoordinateSpinBoxes(pmGroupBox,
label = "End Point 2")
self.x2SpinBox = self._endPoint2SpinBoxes.xSpinBox
self.y2SpinBox = self._endPoint2SpinBoxes.ySpinBox
self.z2SpinBox = self._endPoint2SpinBoxes.zSpinBox
self._endPoint1SpinBoxes.hide()
self._endPoint2SpinBoxes.hide()
def _loadGroupBox2(self, pmGroupBox):
"""
Load widgets in group box 2.
"""
_ntTypeChoices = ['Carbon',
'Boron Nitride']
self.ntTypeComboBox = \
PM_ComboBox( pmGroupBox,
label = "Type:",
choices = _ntTypeChoices,
setAsDefault = True)
示例6: DnaDuplexPropertyManager
# 需要导入模块: from PM.PM_ToolButton import PM_ToolButton [as 别名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 别名]
#.........这里部分代码省略.........
Add the DNA Property Manager group boxes.
"""
self._pmReferencePlaneGroupBox = PM_GroupBox( self,
title = "Placement Options" )
self._loadReferencePlaneGroupBox( self._pmReferencePlaneGroupBox )
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 )
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 3.
"""
#Folllowing toolbutton facilitates entering a temporary DnaLineMode
#to create a DNA using endpoints of the specified line.
self.specifyDnaLineButton = PM_ToolButton(
pmGroupBox,
text = "Specify Endpoints",
iconPath = "ui/actions/Properties Manager/Pencil.png",
spanWidth = True
)
self.specifyDnaLineButton.setCheckable(True)
self.specifyDnaLineButton.setAutoRaise(True)
self.specifyDnaLineButton.setToolButtonStyle(
Qt.ToolButtonTextBesideIcon)
#EndPoint1 and endPoint2 coordinates. These widgets are hidden
# as of 2007- 12 - 05
self._endPoint1SpinBoxes = PM_CoordinateSpinBoxes(pmGroupBox,
label = "End Point 1")
self.x1SpinBox = self._endPoint1SpinBoxes.xSpinBox
self.y1SpinBox = self._endPoint1SpinBoxes.ySpinBox
self.z1SpinBox = self._endPoint1SpinBoxes.zSpinBox
self._endPoint2SpinBoxes = PM_CoordinateSpinBoxes(pmGroupBox,
label = "End Point 2")
self.x2SpinBox = self._endPoint2SpinBoxes.xSpinBox
self.y2SpinBox = self._endPoint2SpinBoxes.ySpinBox
self.z2SpinBox = self._endPoint2SpinBoxes.zSpinBox
self._endPoint1SpinBoxes.hide()
self._endPoint2SpinBoxes.hide()
def _loadGroupBox2(self, pmGroupBox):
"""
Load widgets in group box 4.
"""
self.conformationComboBox = \
PM_ComboBox( pmGroupBox,
label = "Conformation:",
choices = ["B-DNA"],
setAsDefault = True)
dnaModelChoices = ['PAM3', 'PAM5']
self.dnaModelComboBox = \