204 lines
6.7 KiB
Python
204 lines
6.7 KiB
Python
|
# coding: gb2312
|
|||
|
from PyQt5.QtWidgets import *
|
|||
|
from PyQt5.QtCore import Qt
|
|||
|
from BaseFrontend.based_widget import BasedWidget
|
|||
|
|
|||
|
|
|||
|
class PersonPageWidgetDefine(BasedWidget):
|
|||
|
|
|||
|
def __init__(self):
|
|||
|
super().__init__()
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD>Ctrl+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD>༭<EFBFBD><E0BCAD>
|
|||
|
"""**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>"""
|
|||
|
# <20>༶<EFBFBD><E0BCB6><EFBFBD><EFBFBD>
|
|||
|
self.class_title = self._init_class_title_widget()
|
|||
|
# <20>༶<EFBFBD><E0BCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
self.class_combobox = self._init_class_combobox()
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
self.name_title = self._init_name_title_widget()
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
self.name_editbox = self._init_name_editbox()
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>Ϣ<EFBFBD><CFA2>ť
|
|||
|
self.add_person_button = self._init_add_person_button()
|
|||
|
# <20><>Ա<EFBFBD><D4B1>Ϣͬ<CFA2><CDAC><EFBFBD><EFBFBD>ť
|
|||
|
self.person_synchronization_button = self._init_person_synchronization_button()
|
|||
|
# ȫѡ<C8AB><D1A1>ť
|
|||
|
self.select_all_button = self._init_select_all_button()
|
|||
|
# ȡ<><C8A1>ȫѡ<C8AB><D1A1>ť
|
|||
|
self.deselect_all_button = self._init_deselect_all_button()
|
|||
|
# <20><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>Ϣ<EFBFBD><CFA2>ť
|
|||
|
self.delete_persons_button = self._init_delete_persons_button()
|
|||
|
# Excel<65><6C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>Ϣ<EFBFBD><CFA2>ť
|
|||
|
self.excel_import_button = self._init_excel_import_button()
|
|||
|
# Excel<65><6C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>Ϣ<EFBFBD><CFA2>ť
|
|||
|
self.excel_export_button = self._init_excel_export_button()
|
|||
|
# <20><><EFBFBD><EFBFBD>
|
|||
|
self.table_widget = self._init_table_widget()
|
|||
|
|
|||
|
# <20><>ʼ<EFBFBD><CABC><EFBFBD>հؼ<D7BF>
|
|||
|
@staticmethod
|
|||
|
def init_empty_widget():
|
|||
|
empty_widget = QFrame()
|
|||
|
# empty_widget.setStyleSheet("border: 1px solid red")
|
|||
|
return empty_widget
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_class_title_widget():
|
|||
|
class_title = QLabel("<EFBFBD>༶<EFBFBD><EFBFBD>")
|
|||
|
class_title.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)
|
|||
|
class_title.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
)
|
|||
|
return class_title
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_class_combobox():
|
|||
|
class_combobox = QComboBox()
|
|||
|
class_combobox.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
"border: 1px solid #222222;"
|
|||
|
"border-radius: 4px;"
|
|||
|
"padding-top: 15px;"
|
|||
|
"padding-bottom: 15px;"
|
|||
|
"padding-left: 15px;"
|
|||
|
)
|
|||
|
return class_combobox
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_name_title_widget():
|
|||
|
action_difficulty_title = QLabel("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|||
|
action_difficulty_title.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)
|
|||
|
action_difficulty_title.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
)
|
|||
|
return action_difficulty_title
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_name_editbox():
|
|||
|
name_editbox = QLineEdit()
|
|||
|
name_editbox.setPlaceholderText("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|||
|
name_editbox.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
"border: 1px solid #222222;"
|
|||
|
"border-radius: 4px;"
|
|||
|
"padding-top: 15px;"
|
|||
|
"padding-bottom: 15px;"
|
|||
|
"padding-left: 15px;"
|
|||
|
)
|
|||
|
return name_editbox
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_add_person_button():
|
|||
|
add_person_button = QPushButton("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>Ϣ")
|
|||
|
add_person_button.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
"border: 1px solid #222222;"
|
|||
|
"border-radius: 4px;"
|
|||
|
"padding-top: 15px;"
|
|||
|
"padding-bottom: 15px;"
|
|||
|
)
|
|||
|
return add_person_button
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_person_synchronization_button():
|
|||
|
person_synchronization_button = QPushButton("<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>Ϣͬ<EFBFBD><EFBFBD>")
|
|||
|
person_synchronization_button.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
"border: 1px solid #222222;"
|
|||
|
"border-radius: 4px;"
|
|||
|
"padding-top: 15px;"
|
|||
|
"padding-bottom: 15px;"
|
|||
|
)
|
|||
|
return person_synchronization_button
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_select_all_button():
|
|||
|
select_all_button = QPushButton("ȫѡ")
|
|||
|
select_all_button.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
"border: 1px solid #222222;"
|
|||
|
"border-radius: 4px;"
|
|||
|
"padding-top: 15px;"
|
|||
|
"padding-bottom: 15px;"
|
|||
|
)
|
|||
|
return select_all_button
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_deselect_all_button():
|
|||
|
deselect_all_button = QPushButton("ȡ<EFBFBD><EFBFBD>ȫѡ")
|
|||
|
deselect_all_button.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
"border: 1px solid #222222;"
|
|||
|
"border-radius: 4px;"
|
|||
|
"padding-top: 15px;"
|
|||
|
"padding-bottom: 15px;"
|
|||
|
)
|
|||
|
return deselect_all_button
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_delete_persons_button():
|
|||
|
delete_persons_button = QPushButton("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>Ϣ")
|
|||
|
delete_persons_button.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
"border: 1px solid #222222;"
|
|||
|
"border-radius: 4px;"
|
|||
|
"padding-top: 15px;"
|
|||
|
"padding-bottom: 15px;"
|
|||
|
)
|
|||
|
return delete_persons_button
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_excel_import_button():
|
|||
|
excel_import_button = QPushButton("Excel<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>Ϣ")
|
|||
|
excel_import_button.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
"border: 1px solid #222222;"
|
|||
|
"border-radius: 4px;"
|
|||
|
"padding-top: 15px;"
|
|||
|
"padding-bottom: 15px;"
|
|||
|
)
|
|||
|
return excel_import_button
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_excel_export_button():
|
|||
|
excel_export_button = QPushButton("Excel<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>Ϣ")
|
|||
|
excel_export_button.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"color: #222222;"
|
|||
|
"letter-spacing: 4px;"
|
|||
|
"border: 1px solid #222222;"
|
|||
|
"border-radius: 4px;"
|
|||
|
"padding-top: 15px;"
|
|||
|
"padding-bottom: 15px;"
|
|||
|
)
|
|||
|
return excel_export_button
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_table_widget():
|
|||
|
table_widget = QTableWidget()
|
|||
|
# table_widget = PersonTable()
|
|||
|
table_widget.setStyleSheet(
|
|||
|
"font: 18px \"Microsoft YaHei UI\";"
|
|||
|
)
|
|||
|
return table_widget
|