本文整理匯總了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()