本文整理汇总了Python中PM.PM_PushButton.PM_PushButton.setIcon方法的典型用法代码示例。如果您正苦于以下问题:Python PM_PushButton.setIcon方法的具体用法?Python PM_PushButton.setIcon怎么用?Python PM_PushButton.setIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PM.PM_PushButton.PM_PushButton
的用法示例。
在下文中一共展示了PM_PushButton.setIcon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_BuildCrystal_PropertyManager
# 需要导入模块: from PM.PM_PushButton import PM_PushButton [as 别名]
# 或者: from PM.PM_PushButton.PM_PushButton import setIcon [as 别名]
#.........这里部分代码省略.........
( "QToolButton", 1, "Clockwise",
"ui/actions/Properties Manager/rotate_plus.png",
"", "-", 1 )
]
self.gridRotateButtonRow = \
PM_ToolButtonRow( inPmGroupBox,
title = "",
buttonList = GRID_ANGLE_BUTTONS,
label = 'Rotate grid:',
isAutoRaise = False,
isCheckable = False
)
self.rotGridAntiClockwiseButton = \
self.gridRotateButtonRow.getButtonById(0)
self.rotGridClockwiseButton = \
self.gridRotateButtonRow.getButtonById(1)
def _loadLayerPropertiesGroupBox(self, inPmGroupBox):
"""
Load widgets in the Layer Properties group box.
@param inPmGroupBox: The Layer Properties groupbox in the PM
@type inPmGroupBox: L{PM_GroupBox}
"""
self.currentLayerComboBox = \
PM_ComboBox( inPmGroupBox,
index = 0,
spanWidth = True
)
self.addLayerButton = PM_PushButton(inPmGroupBox)
self.addLayerButton.setIcon(
geticon('ui/actions/Properties Manager/addlayer.png'))
self.addLayerButton.setFixedSize(QSize(26, 26))
self.addLayerButton.setIconSize(QSize(22, 22))
# A widget list to create a widget row.
# Format:
# - Widget type,
# - widget object,
# - column
firstRowWidgetList = [('PM_ComboBox', self.currentLayerComboBox, 1),
('PM_PushButton', self.addLayerButton, 2)
]
widgetRow = PM_WidgetRow(inPmGroupBox,
title = '',
widgetList = firstRowWidgetList,
label = "Layer:",
labelColumn = 0,
)
self.layerCellsSpinBox = \
PM_SpinBox( inPmGroupBox,
label = "Lattice cells:",
labelColumn = 0,
value = 2,
minimum = 1,
maximum = 25
)
self.layerThicknessLineEdit = PM_LineEdit(inPmGroupBox,
label = "Thickness:",