本文整理汇总了Python中MOSES.getCurrentEmployeesList方法的典型用法代码示例。如果您正苦于以下问题:Python MOSES.getCurrentEmployeesList方法的具体用法?Python MOSES.getCurrentEmployeesList怎么用?Python MOSES.getCurrentEmployeesList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MOSES
的用法示例。
在下文中一共展示了MOSES.getCurrentEmployeesList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createUI
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getCurrentEmployeesList [as 别名]
def createUI(self):
self.event_list = QtGui.QListWidget()
self.edit_event_button = QtGui.QPushButton("Edit Selected Event")
self.copy_event_button = QtGui.QPushButton("Copy Selected Event")
self.event_viewer = QtGui.QWidget()
self.event_viewer_layout = QtGui.QVBoxLayout()
self.event_viewer_layout.addWidget(self.event_list,3)
self.event_viewer_layout.addWidget(self.edit_event_button,0)
self.event_viewer_layout.addWidget(self.copy_event_button,0)
self.event_viewer.setLayout(self.event_viewer_layout)
self.event_form = QtGui.QWidget()
self.layout = QtGui.QHBoxLayout()
self.layout.addWidget(self.event_viewer,0)
self.layout.addWidget(self.event_form,2)
self.event_form_layout = QtGui.QGridLayout()
#Creating widgets for row 1
self.event_type_label = QtGui.QLabel("Event Type:")
self.event_type_combobox = QtGui.QComboBox()
event_types = ["One on One", "Skip Level Meeting", "Fun Activity", "HR Meeting", "Training", "Personal Project", "Group Discussion", "Editor Feedback", "New Employee Join In", "Employee Send Off"]
self.event_type_combobox.addItems(event_types)
self.event_details_label = QtGui.QLabel("Event Details:")
self.event_details_lineedit = QtGui.QLineEdit()
#Adding row 1 to the grid
self.event_form_layout.addWidget(self.event_type_label,0,0)
self.event_form_layout.addWidget(self.event_type_combobox,0,1)
self.event_form_layout.addWidget(self.event_details_label,0,2)
self.event_form_layout.addWidget(self.event_details_lineedit,0,3)
#Creating widgets for row 2
self.event_start_label = QtGui.QLabel("Event Start Time:")
self.event_start_time = QtGui.QDateTimeEdit()
self.event_start_time.setDateTime(datetime.datetime.now())
self.event_start_time.setDisplayFormat("dd-MMM-yyyy hh:mm AP")
self.event_end_label = QtGui.QLabel("Event End Time:")
self.event_end_time = QtGui.QDateTimeEdit()
self.event_end_time.setDateTime(datetime.datetime.now())
self.event_end_time.setDisplayFormat("hh:mm AP")
#Adding row 2 to the grid
self.event_form_layout.addWidget(self.event_start_label,1,0)
self.event_form_layout.addWidget(self.event_start_time,1,1)
self.event_form_layout.addWidget(self.event_end_label,1,2)
self.event_form_layout.addWidget(self.event_end_time,1,3)
#Creating widgets for row 3
self.participants_label = QtGui.QLabel("Event Participants:")
self.ex_participants_label = QtGui.QLabel("Excepted Participants:")
#Adding row 3
self.event_form_layout.addWidget(self.participants_label,2,0,1,2)
self.event_form_layout.addWidget(self.ex_participants_label,2,2,1,2)
#Creating widgets for row 4
self.participants_list = QtGui.QListWidget()
self.participants_list.setToolTip("Select the participants by holding\nthe SHIFT key or the CTRL key.")
self.employees_data = MOSES.getCurrentEmployeesList(self.user_id, self.password, datetime.date.today())
employees = []
for employee in self.employees_data:
employees.append(employee["Name"])
employees.sort()
self.participants_list.addItems(employees)
self.participants_list.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.participants_list.setMinimumHeight(100)
self.participants_list.setMaximumHeight(100)
self.ex_participants_list = QtGui.QListWidget()
self.ex_participants_list.setToolTip("Select the participants who do not require\na relaxed efficiency by holding the \nnSHIFT key or the CTRL key.")
self.ex_participants_list.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.ex_participants_list.setMaximumHeight(100)
self.ex_participants_list.setMinimumHeight(100)
#Adding row 4
self.event_form_layout.addWidget(self.participants_list,3,0,2,2)
self.event_form_layout.addWidget(self.ex_participants_list,3,2,2,2)
#Creating widgets for row 5
self.appl_relax_checkbox = QtGui.QCheckBox("Applicable for Relaxation")
#Hidden widgets
self.relax_type_label = QtGui.QLabel("Relaxation Type:")
self.relax_type_combobox = QtGui.QComboBox()
relax_types = ["Additive","Divisor"]
self.relax_type_combobox.addItems(relax_types)
#Adding row 5
self.event_form_layout.addWidget(self.appl_relax_checkbox,5,0)
self.event_form_layout.addWidget(self.relax_type_label,5,2)
self.event_form_layout.addWidget(self.relax_type_combobox,5,3)
#Creating Widgets for row 6
self.comments_label = QtGui.QLabel("Comments:")
self.comments_lineedit = QtGui.QLineEdit()
self.approval_label = QtGui.QLabel("Approval Status")
self.approval_combobox = QtGui.QComboBox()
approval_types = ["Approved", "Pending","Rejected"]
#.........这里部分代码省略.........