本文整理汇总了Python中MOSES.getHostID方法的典型用法代码示例。如果您正苦于以下问题:Python MOSES.getHostID方法的具体用法?Python MOSES.getHostID怎么用?Python MOSES.getHostID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MOSES
的用法示例。
在下文中一共展示了MOSES.getHostID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createUI
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getHostID [as 别名]
def createUI(self):
""""""
path_to_images = MOSES.getPathToImages()
self.raw_data_uploader_button = ImageButton(
os.path.join(path_to_images,"upload_raw_data.png"),
48,
48, os.path.join(path_to_images,"upload_raw_data_mouseover.png"))
self.tna_viewer_button = ImageButton(
os.path.join(path_to_images,"tna.png"),
48,
48,
os.path.join(path_to_images,"tna_mouseover.png")
)
self.piggybank_button = ImageButton(
os.path.join(path_to_images,"piggybank.png"),
48,
48,
os.path.join(path_to_images,"piggybank_mouseover.png")
)
self.seeker_button = ImageButton(
os.path.join(path_to_images,"find.png"),
48,
48,
os.path.join(path_to_images,"find_mouseover.png")
)
self.taunter = Taunter()
self.bacon_icon = ImageButton(
os.path.join(path_to_images,"quality.png"),
150,
150,
os.path.join(path_to_images,"quality_mouseover.png")
)
self.bacon_icon.setToolTip("Get to work, Poozers.")
row_1 = QtGui.QHBoxLayout()
row_1.addWidget(self.raw_data_uploader_button)
row_1.addWidget(self.tna_viewer_button)
row_1.addWidget(self.piggybank_button)
row_1.addWidget(self.seeker_button)
layout = QtGui.QVBoxLayout()
layout.addWidget(self.bacon_icon,0,QtCore.Qt.AlignHCenter)
layout.addLayout(row_1,1)
layout.addWidget(self.taunter,0)
self.main_widget = QtGui.QWidget()
self.main_widget.setLayout(layout)
self.setCentralWidget(self.main_widget)
self.setWindowTitle("BACON - Version %s. Server: %s. User: %s (%s)."%(version(), MOSES.getHostID(), self.user_id,MOSES.getEmpName(self.user_id) if self.user_id != "bigbrother" else "Administrator"))
icon_file_name_path = os.path.join(path_to_images,'PORK_Icon.png')
self.setWindowIcon(QtGui.QIcon(icon_file_name_path))
self.show()