various changes, new dialogs
This commit is contained in:
@@ -214,6 +214,7 @@ class Ui_MainWindow(object):
|
||||
font.setPointSize(12)
|
||||
font.setBold(True)
|
||||
self.app_group_box.setFont(font)
|
||||
self.app_group_box.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.app_group_box.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter)
|
||||
self.app_group_box.setCheckable(False)
|
||||
self.app_group_box.setObjectName("app_group_box")
|
||||
@@ -297,7 +298,7 @@ class Ui_MainWindow(object):
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.prof_title.setFont(font)
|
||||
self.prof_title.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.prof_title.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
|
||||
self.prof_title.setObjectName("prof_title")
|
||||
self.fach_mand = QtWidgets.QLabel(parent=self.app_group_box)
|
||||
self.fach_mand.setGeometry(QtCore.QRect(510, 50, 47, 21))
|
||||
@@ -339,6 +340,7 @@ class Ui_MainWindow(object):
|
||||
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.gridLayout_6.addItem(spacerItem6, 0, 3, 1, 1)
|
||||
self.valid_check_app_fach = QtWidgets.QToolButton(parent=self.gridLayoutWidget_5)
|
||||
self.valid_check_app_fach.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.valid_check_app_fach.setText("")
|
||||
self.valid_check_app_fach.setAutoRaise(True)
|
||||
self.valid_check_app_fach.setArrowType(QtCore.Qt.ArrowType.NoArrow)
|
||||
@@ -357,7 +359,7 @@ class Ui_MainWindow(object):
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.prof_tel_nr.setFont(font)
|
||||
self.prof_tel_nr.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhDigitsOnly)
|
||||
self.prof_tel_nr.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhNone)
|
||||
self.prof_tel_nr.setPlaceholderText("")
|
||||
self.prof_tel_nr.setObjectName("prof_tel_nr")
|
||||
self.check_eternal_app = QtWidgets.QCheckBox(parent=self.app_group_box)
|
||||
@@ -374,7 +376,7 @@ class Ui_MainWindow(object):
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.sem_sommer.setFont(font)
|
||||
self.sem_sommer.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.sem_sommer.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.sem_sommer.setObjectName("sem_sommer")
|
||||
self.drpdwn_prof_name = QtWidgets.QComboBox(parent=self.app_group_box)
|
||||
self.drpdwn_prof_name.setGeometry(QtCore.QRect(120, 110, 121, 22))
|
||||
@@ -434,7 +436,7 @@ class Ui_MainWindow(object):
|
||||
self.prof_mail.setPlaceholderText("")
|
||||
self.prof_mail.setObjectName("prof_mail")
|
||||
self.formLayoutWidget_2 = QtWidgets.QWidget(parent=self.app_group_box)
|
||||
self.formLayoutWidget_2.setGeometry(QtCore.QRect(560, 100, 202, 80))
|
||||
self.formLayoutWidget_2.setGeometry(QtCore.QRect(560, 100, 211, 99))
|
||||
self.formLayoutWidget_2.setObjectName("formLayoutWidget_2")
|
||||
self.formLayout_3 = QtWidgets.QFormLayout(self.formLayoutWidget_2)
|
||||
self.formLayout_3.setContentsMargins(0, 0, 0, 0)
|
||||
@@ -480,7 +482,7 @@ class Ui_MainWindow(object):
|
||||
self.sem_year.setMaxLength(5)
|
||||
self.sem_year.setObjectName("sem_year")
|
||||
self.check_send_mail = QtWidgets.QCheckBox(parent=self.app_group_box)
|
||||
self.check_send_mail.setGeometry(QtCore.QRect(460, 150, 91, 17))
|
||||
self.check_send_mail.setGeometry(QtCore.QRect(450, 150, 91, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
@@ -492,7 +494,7 @@ class Ui_MainWindow(object):
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.sem_winter.setFont(font)
|
||||
self.sem_winter.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.sem_winter.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.sem_winter.setObjectName("sem_winter")
|
||||
self.label_4 = QtWidgets.QLabel(parent=self.app_group_box)
|
||||
self.label_4.setGeometry(QtCore.QRect(20, 110, 71, 21))
|
||||
@@ -514,6 +516,7 @@ class Ui_MainWindow(object):
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.btn_apparat_save.setFont(font)
|
||||
self.btn_apparat_save.setStatusTip("")
|
||||
self.btn_apparat_save.setObjectName("btn_apparat_save")
|
||||
self.label_5 = QtWidgets.QLabel(parent=self.app_group_box)
|
||||
self.label_5.setGeometry(QtCore.QRect(250, 50, 91, 21))
|
||||
@@ -548,27 +551,32 @@ class Ui_MainWindow(object):
|
||||
self.label_6.setObjectName("label_6")
|
||||
self.valid_check_profname = QtWidgets.QToolButton(parent=self.app_group_box)
|
||||
self.valid_check_profname.setGeometry(QtCore.QRect(240, 110, 23, 22))
|
||||
self.valid_check_profname.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.valid_check_profname.setText("")
|
||||
self.valid_check_profname.setAutoRaise(True)
|
||||
self.valid_check_profname.setArrowType(QtCore.Qt.ArrowType.NoArrow)
|
||||
self.valid_check_profname.setObjectName("valid_check_profname")
|
||||
self.valid_check_appname = QtWidgets.QToolButton(parent=self.app_group_box)
|
||||
self.valid_check_appname.setGeometry(QtCore.QRect(450, 50, 22, 22))
|
||||
self.valid_check_appname.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.valid_check_appname.setText("")
|
||||
self.valid_check_appname.setAutoRaise(True)
|
||||
self.valid_check_appname.setObjectName("valid_check_appname")
|
||||
self.valid_check_semester = QtWidgets.QToolButton(parent=self.app_group_box)
|
||||
self.valid_check_semester.setGeometry(QtCore.QRect(520, 90, 22, 22))
|
||||
self.valid_check_semester.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.valid_check_semester.setText("")
|
||||
self.valid_check_semester.setAutoRaise(True)
|
||||
self.valid_check_semester.setObjectName("valid_check_semester")
|
||||
self.valid_check_mail = QtWidgets.QToolButton(parent=self.app_group_box)
|
||||
self.valid_check_mail.setGeometry(QtCore.QRect(240, 140, 22, 22))
|
||||
self.valid_check_mail.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.valid_check_mail.setText("")
|
||||
self.valid_check_mail.setAutoRaise(True)
|
||||
self.valid_check_mail.setObjectName("valid_check_mail")
|
||||
self.valid_check_telnr = QtWidgets.QToolButton(parent=self.app_group_box)
|
||||
self.valid_check_telnr.setGeometry(QtCore.QRect(240, 160, 22, 22))
|
||||
self.valid_check_telnr.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.valid_check_telnr.setText("")
|
||||
self.valid_check_telnr.setAutoRaise(True)
|
||||
self.valid_check_telnr.setObjectName("valid_check_telnr")
|
||||
@@ -702,7 +710,7 @@ class Ui_MainWindow(object):
|
||||
self.table_elsa_list.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
self.table_elsa_list.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
self.table_elsa_list.setObjectName("table_elsa_list")
|
||||
self.table_elsa_list.setColumnCount(4)
|
||||
self.table_elsa_list.setColumnCount(6)
|
||||
self.table_elsa_list.setRowCount(0)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.table_elsa_list.setHorizontalHeaderItem(0, item)
|
||||
@@ -712,6 +720,10 @@ class Ui_MainWindow(object):
|
||||
self.table_elsa_list.setHorizontalHeaderItem(2, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.table_elsa_list.setHorizontalHeaderItem(3, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.table_elsa_list.setHorizontalHeaderItem(4, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.table_elsa_list.setHorizontalHeaderItem(5, item)
|
||||
self.table_elsa_list.horizontalHeader().setStretchLastSection(True)
|
||||
self.elsa_statistic_frame = QtWidgets.QFrame(parent=self.elsa)
|
||||
self.elsa_statistic_frame.setGeometry(QtCore.QRect(800, 410, 451, 321))
|
||||
@@ -1199,7 +1211,7 @@ class Ui_MainWindow(object):
|
||||
self.verticalLayout_4.addWidget(self.groupBox)
|
||||
self.horizontalLayout_6.addWidget(self.frame_creation_progress)
|
||||
self.frame_2 = QtWidgets.QFrame(parent=self.centralwidget)
|
||||
self.frame_2.setGeometry(QtCore.QRect(1280, 0, 301, 341))
|
||||
self.frame_2.setGeometry(QtCore.QRect(1280, 20, 301, 341))
|
||||
self.frame_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||
self.frame_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||
self.frame_2.setObjectName("frame_2")
|
||||
@@ -1271,16 +1283,18 @@ class Ui_MainWindow(object):
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.tabWidget.setCurrentIndex(0)
|
||||
self.elsa_semester.textChanged['QString'].connect(self.active_semester.hide) # type: ignore
|
||||
self.elsa_semester.textChanged['QString'].connect(self.active_semester.show) # type: ignore
|
||||
self.elsa_semester.textChanged['QString'].connect(self.active_semester.hide) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
MainWindow.setTabOrder(self.drpdwn_app_nr, self.prof_title)
|
||||
MainWindow.setTabOrder(self.prof_title, self.drpdwn_prof_name)
|
||||
MainWindow.setTabOrder(self.drpdwn_prof_name, self.prof_mail)
|
||||
MainWindow.setTabOrder(self.prof_mail, self.prof_tel_nr)
|
||||
MainWindow.setTabOrder(self.prof_tel_nr, self.app_name)
|
||||
MainWindow.setTabOrder(self.drpdwn_prof_name, self.prof_tel_nr)
|
||||
MainWindow.setTabOrder(self.prof_tel_nr, self.prof_mail)
|
||||
MainWindow.setTabOrder(self.prof_mail, self.app_name)
|
||||
MainWindow.setTabOrder(self.app_name, self.app_fach)
|
||||
MainWindow.setTabOrder(self.app_fach, self.sem_year)
|
||||
MainWindow.setTabOrder(self.app_fach, self.sem_winter)
|
||||
MainWindow.setTabOrder(self.sem_winter, self.sem_sommer)
|
||||
MainWindow.setTabOrder(self.sem_sommer, self.sem_year)
|
||||
MainWindow.setTabOrder(self.sem_year, self.check_eternal_app)
|
||||
MainWindow.setTabOrder(self.check_eternal_app, self.btn_add_document)
|
||||
MainWindow.setTabOrder(self.btn_add_document, self.btn_open_document)
|
||||
@@ -1288,9 +1302,7 @@ class Ui_MainWindow(object):
|
||||
MainWindow.setTabOrder(self.check_file, self.check_send_mail)
|
||||
MainWindow.setTabOrder(self.check_send_mail, self.btn_apparat_save)
|
||||
MainWindow.setTabOrder(self.btn_apparat_save, self.btn_apparat_apply)
|
||||
MainWindow.setTabOrder(self.btn_apparat_apply, self.edit_faculty_member_new_title)
|
||||
MainWindow.setTabOrder(self.edit_faculty_member_new_title, self.edit_faculty_member_new_surname)
|
||||
MainWindow.setTabOrder(self.edit_faculty_member_new_surname, self.user_faculty_member_new_name)
|
||||
MainWindow.setTabOrder(self.btn_apparat_apply, self.user_faculty_member_new_name)
|
||||
MainWindow.setTabOrder(self.user_faculty_member_new_name, self.user_faculty_member_new_mail)
|
||||
MainWindow.setTabOrder(self.user_faculty_member_new_mail, self.user_faculty_member_new_telnr)
|
||||
MainWindow.setTabOrder(self.user_faculty_member_new_telnr, self.update_faculty_member)
|
||||
@@ -1329,6 +1341,14 @@ class Ui_MainWindow(object):
|
||||
MainWindow.setTabOrder(self.elsa_cancel_create, self.elsa_add_new)
|
||||
MainWindow.setTabOrder(self.elsa_add_new, self.elsa_table)
|
||||
MainWindow.setTabOrder(self.elsa_table, self.reset_selection)
|
||||
MainWindow.setTabOrder(self.reset_selection, self.valid_check_app_fach)
|
||||
MainWindow.setTabOrder(self.valid_check_app_fach, self.edit_faculty_member_new_surname)
|
||||
MainWindow.setTabOrder(self.edit_faculty_member_new_surname, self.valid_check_profname)
|
||||
MainWindow.setTabOrder(self.valid_check_profname, self.valid_check_appname)
|
||||
MainWindow.setTabOrder(self.valid_check_appname, self.valid_check_semester)
|
||||
MainWindow.setTabOrder(self.valid_check_semester, self.valid_check_mail)
|
||||
MainWindow.setTabOrder(self.valid_check_mail, self.valid_check_telnr)
|
||||
MainWindow.setTabOrder(self.valid_check_telnr, self.edit_faculty_member_new_title)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
@@ -1397,6 +1417,7 @@ class Ui_MainWindow(object):
|
||||
self.check_eternal_app.setText(_translate("MainWindow", "Dauerapparat"))
|
||||
self.sem_sommer.setText(_translate("MainWindow", "Sommer"))
|
||||
self.mail_mand.setText(_translate("MainWindow", "*"))
|
||||
self.label_3.setStatusTip(_translate("MainWindow", "sdvosdvsdv"))
|
||||
self.label_3.setText(_translate("MainWindow", "Prof. Titel"))
|
||||
self.label_2.setText(_translate("MainWindow", "Apparatsnummer"))
|
||||
self.label_8.setText(_translate("MainWindow", "Mail"))
|
||||
@@ -1408,10 +1429,11 @@ class Ui_MainWindow(object):
|
||||
self.sem_winter.setText(_translate("MainWindow", "Winter"))
|
||||
self.label_4.setText(_translate("MainWindow", "Prof. Name"))
|
||||
self.telnr_mand.setText(_translate("MainWindow", "*"))
|
||||
self.btn_apparat_save.setStatusTip(_translate("MainWindow", "searching"))
|
||||
self.btn_apparat_save.setText(_translate("MainWindow", "Speichern"))
|
||||
self.label_5.setText(_translate("MainWindow", "Apparatsname"))
|
||||
self.label_6.setText(_translate("MainWindow", "Semester"))
|
||||
self.valid_check_profname.setStatusTip(_translate("MainWindow", "Format: Nachname, Vorname"))
|
||||
self.valid_check_mail.setStatusTip(_translate("MainWindow", "mail@irgendwas.wasanderes"))
|
||||
self.add_medium.setText(_translate("MainWindow", "Medien hinzufügen"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.createApparat), _translate("MainWindow", "Anlegen"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.search_statistics), _translate("MainWindow", "Suchen / Statistik"))
|
||||
@@ -1436,11 +1458,15 @@ class Ui_MainWindow(object):
|
||||
item = self.table_elsa_list.horizontalHeaderItem(0)
|
||||
item.setText(_translate("MainWindow", "Kapiteltitel"))
|
||||
item = self.table_elsa_list.horizontalHeaderItem(1)
|
||||
item.setText(_translate("MainWindow", "Buchtitel"))
|
||||
item.setText(_translate("MainWindow", "Autor(en)"))
|
||||
item = self.table_elsa_list.horizontalHeaderItem(2)
|
||||
item.setText(_translate("MainWindow", "Signatur"))
|
||||
item.setText(_translate("MainWindow", "Buchtitel"))
|
||||
item = self.table_elsa_list.horizontalHeaderItem(3)
|
||||
item.setText(_translate("MainWindow", "Signatur"))
|
||||
item = self.table_elsa_list.horizontalHeaderItem(4)
|
||||
item.setText(_translate("MainWindow", "Seite"))
|
||||
item = self.table_elsa_list.horizontalHeaderItem(5)
|
||||
item.setText(_translate("MainWindow", "Herausgeber"))
|
||||
item = self.elsa_statistics_table.horizontalHeaderItem(0)
|
||||
item.setText(_translate("MainWindow", "Semester"))
|
||||
item = self.elsa_statistics_table.horizontalHeaderItem(1)
|
||||
|
||||
@@ -14,6 +14,7 @@ from .popup_confirm import ConfirmDialog as popus_confirm
|
||||
from .reminder import ReminderDialog as reminder_ui
|
||||
from .settings import Settings
|
||||
from .about import About
|
||||
from .elsa_gen_confirm import ElsaGenConfirm
|
||||
|
||||
__all__ = [
|
||||
"ext_app",
|
||||
|
||||
22
src/ui/dialogs/dialog_sources/Ui_app_status.py
Normal file
22
src/ui/dialogs/dialog_sources/Ui_app_status.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\app_status.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(300, 500)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
76
src/ui/dialogs/dialog_sources/Ui_elsa_generate_citation.py
Normal file
76
src/ui/dialogs/dialog_sources/Ui_elsa_generate_citation.py
Normal file
@@ -0,0 +1,76 @@
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\elsa_generate_citation.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(564, 517)
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(Dialog)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.select_type = QtWidgets.QFrame(parent=Dialog)
|
||||
self.select_type.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||
self.select_type.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||
self.select_type.setObjectName("select_type")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.select_type)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.radio_mono = QtWidgets.QRadioButton(parent=self.select_type)
|
||||
self.radio_mono.setObjectName("radio_mono")
|
||||
self.verticalLayout.addWidget(self.radio_mono)
|
||||
self.radio_zs = QtWidgets.QRadioButton(parent=self.select_type)
|
||||
self.radio_zs.setObjectName("radio_zs")
|
||||
self.verticalLayout.addWidget(self.radio_zs)
|
||||
self.radio_hg = QtWidgets.QRadioButton(parent=self.select_type)
|
||||
self.radio_hg.setObjectName("radio_hg")
|
||||
self.verticalLayout.addWidget(self.radio_hg)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.verticalLayout_2.addWidget(self.select_type)
|
||||
self.check = QtWidgets.QGroupBox(parent=Dialog)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(True)
|
||||
self.check.setFont(font)
|
||||
self.check.setObjectName("check")
|
||||
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.check)
|
||||
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
||||
self.citation_style_result = QtWidgets.QStackedWidget(parent=self.check)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.citation_style_result.setFont(font)
|
||||
self.citation_style_result.setObjectName("citation_style_result")
|
||||
self.monografie = QtWidgets.QWidget()
|
||||
self.monografie.setObjectName("monografie")
|
||||
self.citation_style_result.addWidget(self.monografie)
|
||||
self.zsaufsatz = QtWidgets.QWidget()
|
||||
self.zsaufsatz.setObjectName("zsaufsatz")
|
||||
self.citation_style_result.addWidget(self.zsaufsatz)
|
||||
self.herausgeberwerk = QtWidgets.QWidget()
|
||||
self.herausgeberwerk.setObjectName("herausgeberwerk")
|
||||
self.citation_style_result.addWidget(self.herausgeberwerk)
|
||||
self.verticalLayout_3.addWidget(self.citation_style_result)
|
||||
self.pushButton = QtWidgets.QPushButton(parent=self.check)
|
||||
self.pushButton.setObjectName("pushButton")
|
||||
self.verticalLayout_3.addWidget(self.pushButton, 0, QtCore.Qt.AlignmentFlag.AlignRight)
|
||||
self.verticalLayout_2.addWidget(self.check)
|
||||
self.verticalLayout_2.setStretch(0, 20)
|
||||
self.verticalLayout_2.setStretch(1, 80)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.citation_style_result.setCurrentIndex(2)
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
self.radio_mono.setText(_translate("Dialog", "Monografie"))
|
||||
self.radio_zs.setText(_translate("Dialog", "Zeitschriftenaufsatz"))
|
||||
self.radio_hg.setText(_translate("Dialog", "Herausgeberwerk"))
|
||||
self.check.setTitle(_translate("Dialog", "Daten"))
|
||||
self.pushButton.setText(_translate("Dialog", "Bestätigen"))
|
||||
120
src/ui/dialogs/dialog_sources/Ui_elsa_generator_confirm.py
Normal file
120
src/ui/dialogs/dialog_sources/Ui_elsa_generator_confirm.py
Normal file
@@ -0,0 +1,120 @@
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\elsa_generator_confirm.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.6.1
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(530, 210)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
|
||||
Dialog.setSizePolicy(sizePolicy)
|
||||
Dialog.setMaximumSize(QtCore.QSize(530, 210))
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(Dialog)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.groupBox = QtWidgets.QGroupBox(parent=Dialog)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(True)
|
||||
self.groupBox.setFont(font)
|
||||
self.groupBox.setObjectName("groupBox")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.label = QtWidgets.QLabel(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.label.setFont(font)
|
||||
self.label.setObjectName("label")
|
||||
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
|
||||
self.bookauthor = QtWidgets.QLineEdit(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.bookauthor.setFont(font)
|
||||
self.bookauthor.setObjectName("bookauthor")
|
||||
self.gridLayout.addWidget(self.bookauthor, 5, 1, 1, 1)
|
||||
self.book_title = QtWidgets.QLineEdit(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.book_title.setFont(font)
|
||||
self.book_title.setObjectName("book_title")
|
||||
self.gridLayout.addWidget(self.book_title, 3, 1, 1, 1)
|
||||
self.label_5 = QtWidgets.QLabel(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.label_5.setFont(font)
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.gridLayout.addWidget(self.label_5, 5, 0, 1, 1)
|
||||
self.pages = QtWidgets.QLineEdit(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.pages.setFont(font)
|
||||
self.pages.setObjectName("pages")
|
||||
self.gridLayout.addWidget(self.pages, 4, 1, 1, 1)
|
||||
self.label_2 = QtWidgets.QLabel(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
||||
self.label_3 = QtWidgets.QLabel(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.label_3.setFont(font)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
|
||||
self.label_4 = QtWidgets.QLabel(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.label_4.setFont(font)
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1)
|
||||
self.chapter_title = QtWidgets.QLineEdit(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.chapter_title.setFont(font)
|
||||
self.chapter_title.setObjectName("chapter_title")
|
||||
self.gridLayout.addWidget(self.chapter_title, 1, 1, 1, 1)
|
||||
self.chapter_authors = QtWidgets.QLineEdit(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.chapter_authors.setFont(font)
|
||||
self.chapter_authors.setObjectName("chapter_authors")
|
||||
self.gridLayout.addWidget(self.chapter_authors, 2, 1, 1, 1)
|
||||
self.label_6 = QtWidgets.QLabel(parent=self.groupBox)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(False)
|
||||
self.label_6.setFont(font)
|
||||
self.label_6.setObjectName("label_6")
|
||||
self.gridLayout.addWidget(self.label_6, 0, 1, 1, 1)
|
||||
self.horizontalLayout.addWidget(self.groupBox)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
|
||||
self.buttonBox.setLayoutDirection(QtCore.Qt.LayoutDirection.LeftToRight)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Vertical)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setCenterButtons(False)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.horizontalLayout.addWidget(self.buttonBox)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
self.groupBox.setTitle(_translate("Dialog", "Angaben korrekt?"))
|
||||
self.label.setText(_translate("Dialog", "Kapiteltitel"))
|
||||
self.label_5.setText(_translate("Dialog", "Herausgebername"))
|
||||
self.label_2.setText(_translate("Dialog", "Autor(en)"))
|
||||
self.label_3.setText(_translate("Dialog", "Buchtitel"))
|
||||
self.label_4.setText(_translate("Dialog", "Seite(n)"))
|
||||
self.label_6.setText(_translate("Dialog", "Hier können fehlerhafte / fehlende Daten geändert werden"))
|
||||
103
src/ui/dialogs/dialog_sources/elsa_generate_citation.ui
Normal file
103
src/ui/dialogs/dialog_sources/elsa_generate_citation.ui
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>564</width>
|
||||
<height>517</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="20,80">
|
||||
<item>
|
||||
<widget class="QFrame" name="select_type">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radio_mono">
|
||||
<property name="text">
|
||||
<string>Monografie</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radio_zs">
|
||||
<property name="text">
|
||||
<string>Zeitschriftenaufsatz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radio_hg">
|
||||
<property name="text">
|
||||
<string>Herausgeberwerk</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="check">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Daten</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="citation_style_result">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="monografie"/>
|
||||
<widget class="QWidget" name="zsaufsatz"/>
|
||||
<widget class="QWidget" name="herausgeberwerk"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignRight">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Bestätigen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
213
src/ui/dialogs/dialog_sources/elsa_generator_confirm.ui
Normal file
213
src/ui/dialogs/dialog_sources/elsa_generator_confirm.ui
Normal file
@@ -0,0 +1,213 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>530</width>
|
||||
<height>210</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>530</width>
|
||||
<height>210</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Angaben korrekt?</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Kapiteltitel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="bookauthor">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="book_title">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Herausgebername</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="pages">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Autor(en)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Buchtitel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Seite(n)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="chapter_title">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="chapter_authors">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hier können fehlerhafte / fehlende Daten geändert werden</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
<property name="centerButtons">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
9
src/ui/dialogs/elsa_citation.py
Normal file
9
src/ui/dialogs/elsa_citation.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from .dialog_sources.Ui_elsa_generate_citation import Ui_Dialog
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
|
||||
class ElsaCitation(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(self, parent=None, data=None):
|
||||
super(ElsaCitation, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.radio_hg.clicked.connect(self.set_page)
|
||||
41
src/ui/dialogs/elsa_gen_confirm.py
Normal file
41
src/ui/dialogs/elsa_gen_confirm.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from .dialog_sources.Ui_elsa_generator_confirm import Ui_Dialog
|
||||
from PyQt6 import QtCore, QtWidgets, QtGui
|
||||
|
||||
|
||||
class ElsaGenConfirm(QtWidgets.QDialog, Ui_Dialog):
|
||||
def __init__(self, parent=None, data=None):
|
||||
super(ElsaGenConfirm, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.setWindowTitle("Daten überprüfen")
|
||||
self.chapter_title.setText(data["chapter"])
|
||||
self.bookauthor.setText(data["book_author"])
|
||||
self.book_title.setText(data["title"])
|
||||
self.pages.setText(data["pages"])
|
||||
self.chapter_authors.setText(data["text_author"])
|
||||
self.buttonBox.button(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Ok
|
||||
).clicked.connect(self.send)
|
||||
self.buttonBox.button(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
).clicked.connect(self.close)
|
||||
self.confirmed_data = None
|
||||
|
||||
def send(self):
|
||||
data = {
|
||||
"chapter": self.chapter_title.text(),
|
||||
"book_author": self.bookauthor.text(),
|
||||
"title": self.book_title.text(),
|
||||
"pages": self.pages.text(),
|
||||
"text_author": self.chapter_authors.text(),
|
||||
}
|
||||
# return data and close dialog
|
||||
self.confirmed_data = data
|
||||
self.accept()
|
||||
|
||||
|
||||
def launch(data):
|
||||
app = QtWidgets.QApplication([])
|
||||
dialog = ElsaGenConfirm(data=data)
|
||||
dialog.show()
|
||||
app.exec()
|
||||
return dialog.confirmed_data
|
||||
@@ -34,7 +34,7 @@ class Mail_Dialog(QtWidgets.QDialog, MailPreviewDialog):
|
||||
# app_subject,
|
||||
# prof_name,
|
||||
)
|
||||
|
||||
logger.log_info("Setting up mail dialog")
|
||||
self.appid = app_id
|
||||
self.appname = app_name
|
||||
self.subject = app_subject
|
||||
@@ -90,7 +90,7 @@ Tel.: 0761/682-778"""
|
||||
|
||||
def load_mail_templates(self):
|
||||
print("loading mail templates")
|
||||
|
||||
logger.log_info("Loading mail templates")
|
||||
mail_templates = os.listdir("mail_vorlagen")
|
||||
logger.log_info(f"Mail templates: {mail_templates}")
|
||||
for template in mail_templates:
|
||||
@@ -109,8 +109,10 @@ Tel.: 0761/682-778"""
|
||||
return f"Guten Tag {prof},"
|
||||
|
||||
def set_mail(self):
|
||||
logger.log_info("Setting mail")
|
||||
email_template = self.comboBox.currentText()
|
||||
if email_template == "":
|
||||
logger.log_debug("No mail template selected")
|
||||
return
|
||||
with open(f"mail_vorlagen/{email_template}", "r", encoding="utf-8") as f:
|
||||
mail_template = f.read()
|
||||
@@ -175,23 +177,6 @@ Tel.: 0761/682-778"""
|
||||
# close the dialog
|
||||
|
||||
self.accept()
|
||||
# # create a temporary file
|
||||
# mail_header = self.mail_header.text()
|
||||
# mail_body = self.mail_body.toHtml()
|
||||
# mail = self.mail_data + mail_body
|
||||
# mail = mail.replace("Subject:", f"Subject: {mail_header}")
|
||||
# directory = config["database"]["tempdir"]
|
||||
# directory = directory.replace("~", str(os.path.expanduser("~")))
|
||||
# with tempfile.NamedTemporaryFile(
|
||||
# mode="w", delete=False, suffix=".eml", encoding="utf-8", dir=directory
|
||||
# ) as f:
|
||||
# f.write(mail)
|
||||
# self.mail_path = f.name
|
||||
# print(self.mail_path)
|
||||
# # open the file using thunderbird
|
||||
# subprocess.Popen([f"{self.mail_path}"])
|
||||
# # delete the file
|
||||
# # os.remove(self.mail_path)
|
||||
|
||||
|
||||
def launch_gui(app_id="", app_name="", app_subject="", prof_name="", prof_mail=""):
|
||||
|
||||
@@ -494,6 +494,9 @@
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Apparatsdetails</string>
|
||||
</property>
|
||||
@@ -700,7 +703,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="fach_mand">
|
||||
@@ -810,6 +813,9 @@
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QToolButton" name="valid_check_app_fach">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -858,7 +864,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhDigitsOnly</set>
|
||||
<set>Qt::ImhNone</set>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string/>
|
||||
@@ -902,7 +908,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sommer</string>
|
||||
@@ -973,6 +979,9 @@
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>sdvosdvsdv</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Prof. Titel</string>
|
||||
</property>
|
||||
@@ -1076,8 +1085,8 @@
|
||||
<rect>
|
||||
<x>560</x>
|
||||
<y>100</y>
|
||||
<width>202</width>
|
||||
<height>80</height>
|
||||
<width>211</width>
|
||||
<height>99</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
@@ -1172,10 +1181,10 @@
|
||||
<widget class="QCheckBox" name="check_send_mail">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<x>450</x>
|
||||
<y>150</y>
|
||||
<width>91</width>
|
||||
<height>17</height>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
@@ -1204,7 +1213,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Winter</string>
|
||||
@@ -1267,7 +1276,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>searching</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Speichern</string>
|
||||
@@ -1367,6 +1376,12 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Format: Nachname, Vorname</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -1386,6 +1401,9 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -1402,6 +1420,9 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -1418,6 +1439,12 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>mail@irgendwas.wasanderes</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -1434,6 +1461,9 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -1789,6 +1819,11 @@
|
||||
<string>Kapiteltitel</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Autor(en)</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Buchtitel</string>
|
||||
@@ -1804,6 +1839,11 @@
|
||||
<string>Seite</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Herausgeber</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
<widget class="QFrame" name="elsa_statistic_frame">
|
||||
<property name="geometry">
|
||||
@@ -2930,7 +2970,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1280</x>
|
||||
<y>0</y>
|
||||
<y>20</y>
|
||||
<width>301</width>
|
||||
<height>341</height>
|
||||
</rect>
|
||||
@@ -3030,10 +3070,12 @@
|
||||
<tabstop>drpdwn_app_nr</tabstop>
|
||||
<tabstop>prof_title</tabstop>
|
||||
<tabstop>drpdwn_prof_name</tabstop>
|
||||
<tabstop>prof_mail</tabstop>
|
||||
<tabstop>prof_tel_nr</tabstop>
|
||||
<tabstop>prof_mail</tabstop>
|
||||
<tabstop>app_name</tabstop>
|
||||
<tabstop>app_fach</tabstop>
|
||||
<tabstop>sem_winter</tabstop>
|
||||
<tabstop>sem_sommer</tabstop>
|
||||
<tabstop>sem_year</tabstop>
|
||||
<tabstop>check_eternal_app</tabstop>
|
||||
<tabstop>btn_add_document</tabstop>
|
||||
@@ -3042,8 +3084,6 @@
|
||||
<tabstop>check_send_mail</tabstop>
|
||||
<tabstop>btn_apparat_save</tabstop>
|
||||
<tabstop>btn_apparat_apply</tabstop>
|
||||
<tabstop>edit_faculty_member_new_title</tabstop>
|
||||
<tabstop>edit_faculty_member_new_surname</tabstop>
|
||||
<tabstop>user_faculty_member_new_name</tabstop>
|
||||
<tabstop>user_faculty_member_new_mail</tabstop>
|
||||
<tabstop>user_faculty_member_new_telnr</tabstop>
|
||||
@@ -3083,27 +3123,19 @@
|
||||
<tabstop>elsa_add_new</tabstop>
|
||||
<tabstop>elsa_table</tabstop>
|
||||
<tabstop>reset_selection</tabstop>
|
||||
<tabstop>valid_check_app_fach</tabstop>
|
||||
<tabstop>edit_faculty_member_new_surname</tabstop>
|
||||
<tabstop>valid_check_profname</tabstop>
|
||||
<tabstop>valid_check_appname</tabstop>
|
||||
<tabstop>valid_check_semester</tabstop>
|
||||
<tabstop>valid_check_mail</tabstop>
|
||||
<tabstop>valid_check_telnr</tabstop>
|
||||
<tabstop>edit_faculty_member_new_title</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../../resources.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>elsa_semester</sender>
|
||||
<signal>textChanged(QString)</signal>
|
||||
<receiver>active_semester</receiver>
|
||||
<slot>hide()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>242</x>
|
||||
<y>331</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>444</x>
|
||||
<y>342</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>elsa_semester</sender>
|
||||
<signal>textChanged(QString)</signal>
|
||||
@@ -3120,5 +3152,21 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>elsa_semester</sender>
|
||||
<signal>textChanged(QString)</signal>
|
||||
<receiver>active_semester</receiver>
|
||||
<slot>hide()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>242</x>
|
||||
<y>331</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>444</x>
|
||||
<y>342</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -51,9 +51,9 @@ from src.ui import (
|
||||
parsed_titles_ui,
|
||||
popus_confirm,
|
||||
reminder_ui,
|
||||
SearchStatisticPage,
|
||||
)
|
||||
from src.ui.widgets.searchPage import SearchStatisticPage
|
||||
|
||||
from src.ui.extensions import ValidatorButton
|
||||
config = OmegaConf.load("config.yaml")
|
||||
|
||||
|
||||
@@ -72,12 +72,6 @@ class Medien(medienadder_ui):
|
||||
return self.comboBox.currentText()
|
||||
|
||||
|
||||
class MyComboBox(QtWidgets.QComboBox):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
||||
|
||||
valid_input = (0, 0, 0, 0, 0, 0)
|
||||
|
||||
|
||||
@@ -100,7 +94,7 @@ class Ui(Ui_Semesterapparat):
|
||||
self.btn_check_file_threaded
|
||||
) # default: self.add_media_from_file
|
||||
self.create_new_app.clicked.connect(self.btn_create_new_apparat)
|
||||
self.btn_apparat_save.clicked.connect(self.btn_save_apparat)
|
||||
self.btn_apparat_save.clicked.connect(lambda: self.btn_save_apparat(True))
|
||||
self.btn_apparat_apply.clicked.connect(self.update_apparat)
|
||||
self.btn_open_document.clicked.connect(self.open_document)
|
||||
self.add_medium.clicked.connect(self.btn_add_medium)
|
||||
@@ -143,19 +137,32 @@ class Ui(Ui_Semesterapparat):
|
||||
)
|
||||
)
|
||||
self.prof_tel_nr.setValidator(QtGui.QIntValidator())
|
||||
# set the validator for the app name, allow all letters and umlauts
|
||||
self.app_fach.setValidator(
|
||||
|
||||
# set app_fach validator to allow only entries from the present items in self.app_fach and allow manual text entry
|
||||
# self.app_fach.setValidator(
|
||||
# QtGui.QRegularExpressionValidator(
|
||||
# QtCore.QRegularExpression(
|
||||
# "|".join([f"{subject[1]}" for subject in self.db.getSubjects()])
|
||||
# )
|
||||
# )
|
||||
# )
|
||||
self.app_fach.setValidator( # validator to allow typing in the app_fach field
|
||||
QtGui.QRegularExpressionValidator(
|
||||
QtCore.QRegularExpression(r"[a-zA-Z\s\W]+")
|
||||
QtCore.QRegularExpression(r"[a-zA-Z0-9\s\W]+")
|
||||
)
|
||||
)
|
||||
self.prof_tel_nr.setValidator(
|
||||
QtGui.QRegularExpressionValidator(
|
||||
QtCore.QRegularExpression(r"^\d{3}|^\d{4}-\d{2}|^\+\d{8,}")
|
||||
)
|
||||
)
|
||||
|
||||
# allow only letters, numbers, whitespaces, symbols for the apparat name
|
||||
self.app_name.setValidator(
|
||||
QtGui.QRegularExpressionValidator(
|
||||
QtCore.QRegularExpression(r"[a-zA-Z0-9\s\W]+")
|
||||
)
|
||||
)
|
||||
|
||||
self.tableWidget_apparate.addScrollBarWidget(
|
||||
QtWidgets.QScrollBar(), QtCore.Qt.AlignmentFlag.AlignRight
|
||||
)
|
||||
@@ -243,7 +250,11 @@ class Ui(Ui_Semesterapparat):
|
||||
self.tableWidget_apparat_media.customContextMenuRequested.connect(
|
||||
self.media_context_menu
|
||||
)
|
||||
self.table_elsa_list.setContextMenuPolicy(
|
||||
QtCore.Qt.ContextMenuPolicy.CustomContextMenu
|
||||
)
|
||||
|
||||
self.table_elsa_list.customContextMenuRequested.connect(self.elsa_context_menu)
|
||||
# elsa buttons
|
||||
self.elsa_add_new.clicked.connect(self.add_new_elsa)
|
||||
self.elsa_cancel_create.clicked.connect(self.cancel_elsa_creation)
|
||||
@@ -269,13 +280,17 @@ class Ui(Ui_Semesterapparat):
|
||||
self.mail_thread = None
|
||||
self.autoGrabber = None
|
||||
|
||||
def elsa_context_menu(self, position):
|
||||
menu = QtWidgets.QMenu()
|
||||
# TODO: add functions
|
||||
pass
|
||||
|
||||
def toggleButton(self, button):
|
||||
if button.isChecked():
|
||||
button.setChecked(False)
|
||||
|
||||
def open_about(self):
|
||||
about = About()
|
||||
about.exec()
|
||||
About().exec()
|
||||
|
||||
def quit(self):
|
||||
# delete all temporary files
|
||||
@@ -316,7 +331,7 @@ class Ui(Ui_Semesterapparat):
|
||||
or self.elsa_date.text() == ""
|
||||
):
|
||||
# warning message
|
||||
self.confirm_popup("Bitte füllen Sie alle Felder aus")
|
||||
self.confirm_popup("Bitte füllen Sie alle Felder aus", title="Fehler")
|
||||
|
||||
return
|
||||
prof = self.elsa_prof.currentText()
|
||||
@@ -391,7 +406,7 @@ class Ui(Ui_Semesterapparat):
|
||||
self.table_elsa_list.setItem(0, 1, QtWidgets.QTableWidgetItem(scan[2]))
|
||||
self.table_elsa_list.setItem(0, 2, QtWidgets.QTableWidgetItem(scan[3]))
|
||||
self.table_elsa_list.setItem(0, 3, QtWidgets.QTableWidgetItem(scan[4]))
|
||||
|
||||
self.create_frame_elsa.setEnabled(True)
|
||||
def addDokumentElsa(self):
|
||||
print("Add document")
|
||||
picker = FilePicker()
|
||||
@@ -447,11 +462,15 @@ class Ui(Ui_Semesterapparat):
|
||||
self.table_elsa_list.insertRow(0)
|
||||
ic(row)
|
||||
chapter_title = row[2]
|
||||
author = row[0]
|
||||
book_author = row[3]
|
||||
book_title = row[4]
|
||||
signature = row[7]
|
||||
pages = row[6]
|
||||
data = {
|
||||
"chapter": chapter_title,
|
||||
"book_author": book_author,
|
||||
"text_author": author,
|
||||
"title": book_title,
|
||||
"signature": signature,
|
||||
"pages": pages,
|
||||
@@ -459,13 +478,17 @@ class Ui(Ui_Semesterapparat):
|
||||
self.table_elsa_list.setItem(
|
||||
0, 0, QtWidgets.QTableWidgetItem(chapter_title)
|
||||
)
|
||||
self.table_elsa_list.setItem(0, 1, QtWidgets.QTableWidgetItem(author))
|
||||
self.table_elsa_list.setItem(
|
||||
0, 1, QtWidgets.QTableWidgetItem(book_title)
|
||||
0, 2, QtWidgets.QTableWidgetItem(book_title)
|
||||
)
|
||||
self.table_elsa_list.setItem(
|
||||
0, 2, QtWidgets.QTableWidgetItem(signature)
|
||||
0, 3, QtWidgets.QTableWidgetItem(signature)
|
||||
)
|
||||
self.table_elsa_list.setItem(0, 4, QtWidgets.QTableWidgetItem(pages))
|
||||
self.table_elsa_list.setItem(
|
||||
0, 5, QtWidgets.QTableWidgetItem(book_author)
|
||||
)
|
||||
self.table_elsa_list.setItem(0, 3, QtWidgets.QTableWidgetItem(pages))
|
||||
self.db.addElsaMedia(
|
||||
data,
|
||||
self.db.getElsaId(
|
||||
@@ -506,7 +529,6 @@ class Ui(Ui_Semesterapparat):
|
||||
# documentation.show()
|
||||
|
||||
def tabW1_changed(self):
|
||||
|
||||
if self.tabWidget.currentIndex() == 1: # Statistics
|
||||
stats_layout = self.search_statistics.layout()
|
||||
if stats_layout is not None:
|
||||
@@ -874,16 +896,8 @@ class Ui(Ui_Semesterapparat):
|
||||
popup.exec()
|
||||
return popup.result()
|
||||
|
||||
def threads(self):
|
||||
while True:
|
||||
self.validate_prof_mail()
|
||||
self.validate_prof_name()
|
||||
self.validate_prof_tel()
|
||||
self.validate_app_name()
|
||||
self.validate_app_fach()
|
||||
self.validate_semester()
|
||||
|
||||
def thread_check(self):
|
||||
print("Thread started")
|
||||
self.prof_mail.textChanged.connect(self.validate_prof_mail)
|
||||
self.drpdwn_prof_name.editTextChanged.connect(self.validate_prof_name)
|
||||
self.prof_tel_nr.textChanged.connect(self.validate_prof_tel)
|
||||
@@ -892,84 +906,70 @@ class Ui(Ui_Semesterapparat):
|
||||
self.sem_year.textChanged.connect(self.validate_semester)
|
||||
self.check_eternal_app.stateChanged.connect(self.validate_semester)
|
||||
|
||||
def validate_prof_name(self):
|
||||
if self.app_group_box.isEnabled():
|
||||
if "," in self.drpdwn_prof_name.currentText():
|
||||
Icon("valid_true", self.valid_check_profname)
|
||||
self.profname_mand.setText("")
|
||||
self.change_state(0, 1)
|
||||
else:
|
||||
Icon("valid_false", self.valid_check_profname)
|
||||
self.profname_mand.setText("*")
|
||||
self.change_state(0, 0)
|
||||
else:
|
||||
pass
|
||||
# self.drpdwn_prof_name.setStyleSheet("border: 1px solid black;")
|
||||
# else:
|
||||
# pass
|
||||
# # self.drpdwn_prof_name.setStyleSheet("border: 1px solid black;")
|
||||
|
||||
# Validators
|
||||
def __setValidState(self, widget, state, mand, index):
|
||||
if state:
|
||||
Icon("valid_true", widget)
|
||||
mand.setText("")
|
||||
self.change_state(index, 1)
|
||||
else:
|
||||
Icon("valid_false", widget)
|
||||
mand.setText("*")
|
||||
self.change_state(index, 0)
|
||||
def validate_prof_name(self):
|
||||
if (
|
||||
self.app_group_box.isEnabled()
|
||||
and "," in self.drpdwn_prof_name.currentText()
|
||||
):
|
||||
self.__setValidState(self.valid_check_profname, 1, self.profname_mand, 0)
|
||||
else:
|
||||
self.__setValidState(self.valid_check_profname, 0, self.profname_mand, 0)
|
||||
def validate_prof_mail(self):
|
||||
if self.app_group_box.isEnabled():
|
||||
if self.prof_mail.hasAcceptableInput():
|
||||
Icon("valid_true", self.valid_check_mail)
|
||||
self.mail_mand.setText("")
|
||||
self.change_state(1, 1)
|
||||
self.__setValidState(self.valid_check_mail, 1, self.mail_mand, 1)
|
||||
else:
|
||||
Icon("valid_false", self.valid_check_mail)
|
||||
self.mail_mand.setText("*")
|
||||
self.change_state(1, 0)
|
||||
|
||||
self.__setValidState(self.valid_check_mail, 0, self.mail_mand, 1)
|
||||
else:
|
||||
self.__setValidState(self.valid_check_mail, 0, self.mail_mand, 1)
|
||||
def validate_prof_tel(self):
|
||||
if self.app_group_box.isEnabled():
|
||||
if self.prof_tel_nr.text() != "":
|
||||
Icon("valid_true", self.valid_check_telnr)
|
||||
self.telnr_mand.setText("")
|
||||
self.change_state(2, 1)
|
||||
if self.prof_tel_nr.text() != "" and self.prof_tel_nr.hasAcceptableInput():
|
||||
self.__setValidState(self.valid_check_telnr, 1, self.telnr_mand, 2)
|
||||
else:
|
||||
Icon("valid_false", self.valid_check_telnr)
|
||||
self.telnr_mand.setText("*")
|
||||
self.change_state(2, 0)
|
||||
|
||||
self.__setValidState(self.valid_check_telnr, 0, self.telnr_mand, 2)
|
||||
else:
|
||||
self.__setValidState(self.valid_check_telnr, 0, self.telnr_mand, 2)
|
||||
def validate_app_name(self):
|
||||
if self.app_group_box.isEnabled():
|
||||
if self.app_name.hasAcceptableInput():
|
||||
Icon("valid_true", self.valid_check_appname)
|
||||
self.appname_mand.setText("")
|
||||
self.change_state(3, 1)
|
||||
else:
|
||||
Icon("valid_false", self.valid_check_appname)
|
||||
self.appname_mand.setText("*")
|
||||
self.change_state(3, 0)
|
||||
|
||||
if self.app_group_box.isEnabled() and self.app_name.hasAcceptableInput():
|
||||
self.__setValidState(self.valid_check_appname, 1, self.appname_mand, 3)
|
||||
else:
|
||||
self.__setValidState(self.valid_check_appname, 0, self.appname_mand, 3)
|
||||
def validate_app_fach(self):
|
||||
if self.app_group_box.isEnabled():
|
||||
if self.app_fach.currentText() != "":
|
||||
# change color to green to signal that the field is filled
|
||||
Icon("valid_true", self.valid_check_app_fach)
|
||||
self.valid_check_app_fach.setToolTip("Fach ist gesetzt")
|
||||
self.fach_mand.setText("")
|
||||
self.change_state(4, 1)
|
||||
else:
|
||||
# self.app_fach.setStyleSheet("border: 1px solid red;")
|
||||
Icon("valid_false", self.valid_check_app_fach)
|
||||
self.valid_check_app_fach.setToolTip("Fach ist nicht gesetzt")
|
||||
self.fach_mand.setText("*")
|
||||
self.change_state(4, 0)
|
||||
if self.app_group_box.isEnabled() and self.app_fach.currentText() != "":
|
||||
self.__setValidState(self.valid_check_app_fach, 1, self.fach_mand, 4)
|
||||
else:
|
||||
self.__setValidState(self.valid_check_app_fach, 0, self.fach_mand, 4)
|
||||
|
||||
def validate_semester(self):
|
||||
if self.app_group_box.isEnabled():
|
||||
if (
|
||||
if (
|
||||
self.app_group_box.isEnabled()
|
||||
and (
|
||||
(self.sem_sommer.isChecked() or self.sem_winter.isChecked())
|
||||
and self.sem_year.text() != ""
|
||||
and len(self.sem_year.text()) == 4
|
||||
) or self.check_eternal_app.isChecked():
|
||||
self._mand.setText("")
|
||||
self.change_state(5, 1)
|
||||
self.check_eternal_app.setEnabled(True)
|
||||
Icon("valid_true", self.valid_check_semester)
|
||||
else:
|
||||
self._mand.setText("*")
|
||||
self.change_state(5, 0)
|
||||
Icon("valid_false", self.valid_check_semester)
|
||||
self.check_eternal_app.setEnabled(False)
|
||||
)
|
||||
or self.check_eternal_app.isChecked()
|
||||
):
|
||||
self.__setValidState(self.valid_check_semester, 1, self._mand, 5)
|
||||
self.check_eternal_app.setEnabled(True)
|
||||
else:
|
||||
self.__setValidState(self.valid_check_semester, 0, self._mand, 5)
|
||||
self.check_eternal_app.setEnabled(False)
|
||||
|
||||
def change_state(self, index, state):
|
||||
global valid_input
|
||||
@@ -1227,6 +1227,12 @@ class Ui(Ui_Semesterapparat):
|
||||
|
||||
for child in self.app_group_box.findChildren(QtWidgets.QLineEdit):
|
||||
child.clear()
|
||||
self.validate_app_fach()
|
||||
self.validate_app_name()
|
||||
self.validate_prof_mail()
|
||||
self.validate_prof_name()
|
||||
self.validate_prof_tel()
|
||||
self.validate_semester()
|
||||
|
||||
def update_app_media_list(self):
|
||||
deleted = 0 if not self.chkbx_show_del_media.isChecked() else 1
|
||||
@@ -1630,6 +1636,7 @@ class Ui(Ui_Semesterapparat):
|
||||
apparat=appd.appnr, mail="Information zum Semesterapparat", location=""
|
||||
)
|
||||
if clear_fields:
|
||||
print("clearing fields")
|
||||
self.__clear_fields()
|
||||
|
||||
def send_mail_preview(self):
|
||||
@@ -1930,6 +1937,7 @@ class Ui(Ui_Semesterapparat):
|
||||
profname = pid
|
||||
|
||||
profname = f"{profname.split(" ")[1]} {profname.split(" ")[0]}"
|
||||
print(profname, pid)
|
||||
if prof_id:
|
||||
pmail = self.db.getSpecificProfData(prof_id, ["mail"])
|
||||
else:
|
||||
@@ -1955,10 +1963,7 @@ class Ui(Ui_Semesterapparat):
|
||||
"Bitte erst einen Apparat auswählen!", title="Apparat auswählen"
|
||||
)
|
||||
return
|
||||
else:
|
||||
self.__contact_dialog(apparat, location, mail, pid=pid)
|
||||
else:
|
||||
self.__contact_dialog(apparat, mail=mail, pid=pid, location=location)
|
||||
self.__contact_dialog(apparat, mail=mail, pid=pid, location=location)
|
||||
|
||||
def delete_apparat(self, position):
|
||||
selected_apparat_id = self.tableWidget_apparate.item(
|
||||
|
||||
@@ -5,3 +5,4 @@ from .graph import DataGraph
|
||||
from .Ui_message_widget import Ui_Form as Message_Widget
|
||||
from .calendar_entry import CalendarEntry
|
||||
from .MessageCalendar import MessageCalendar
|
||||
from .searchPage import SearchStatisticPage
|
||||
|
||||
@@ -4,8 +4,8 @@ from PyQt6.QtCore import pyqtSignal
|
||||
from src.backend import Database, generateSemesterByDate
|
||||
from src.logic import custom_sort
|
||||
from src import MyLogger
|
||||
from src import Icon
|
||||
from src.ui import DataGraph, Mail_Dialog, StatusWidget
|
||||
from src.ui.dialogs import Mail_Dialog
|
||||
from src.ui.widgets import DataGraph, StatusWidget
|
||||
from natsort import natsorted
|
||||
from icecream import ic
|
||||
|
||||
@@ -16,6 +16,7 @@ class MyComboBox(QtWidgets.QComboBox):
|
||||
super().__init__(parent)
|
||||
|
||||
|
||||
|
||||
class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
apparat_open = pyqtSignal(str)
|
||||
reloadSignal = pyqtSignal()
|
||||
@@ -155,7 +156,6 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
return self.tabWidget_3.currentIndex()
|
||||
|
||||
def gridchange(self):
|
||||
print("gridchange")
|
||||
if self.check_deletable.isChecked():
|
||||
self.box_semester.setEnabled(False)
|
||||
self.box_appnrs.setEnabled(False)
|
||||
@@ -266,6 +266,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
|
||||
def statistics(self):
|
||||
"""Generate the statistics based on the selected filters."""
|
||||
self.tableWidget.setRowCount(0)
|
||||
active_semseter = generateSemesterByDate()
|
||||
self.db_err_message.setText("")
|
||||
self.btn_del_select_apparats.setEnabled(True)
|
||||
@@ -312,7 +313,6 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
params = {
|
||||
key: value for key, value in params.items() if value != "Alle"
|
||||
} # remove empty lines to prevent errors
|
||||
print(params)
|
||||
result = self.db.statistic_request(**params)
|
||||
# add QTableWidgetItems to the table
|
||||
# self.tableWidget.setRowCount(len(result))
|
||||
@@ -326,7 +326,6 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
sem_year = int(sem_year.split("/")[0])
|
||||
else:
|
||||
sem_year = int(sem_year)
|
||||
print(sem_year)
|
||||
for entry in result:
|
||||
if "deletable" in params.keys():
|
||||
entry_sem_time = entry[5].split(" ")[0]
|
||||
@@ -345,7 +344,6 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
data.append(entry)
|
||||
self.tableWidget.setRowCount(len(data))
|
||||
for i in range(len(data)):
|
||||
print("adding", data[i][1])
|
||||
# set the items 0 = clickable checkbox, 1 = appname, 2 = profname, 3 = fach
|
||||
self.tableWidget.setItem(i, 0, QtWidgets.QTableWidgetItem(""))
|
||||
self.tableWidget.setItem(i, 1, QtWidgets.QTableWidgetItem(data[i][1]))
|
||||
@@ -368,7 +366,6 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
)
|
||||
# # remove empty rows
|
||||
for row in range(self.tableWidget.rowCount()):
|
||||
print(row, self.tableWidget.item(row, 1))
|
||||
if self.tableWidget.item(row, 1) is None:
|
||||
self.tableWidget.removeRow(row)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(1244, 756)
|
||||
Dialog.resize(1244, 767)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.tabWidget_2 = QtWidgets.QTabWidget(parent=Dialog)
|
||||
@@ -98,31 +98,40 @@ class Ui_Dialog(object):
|
||||
self.tabWidget_2.addTab(self.tab_3, "")
|
||||
self.tab_4 = QtWidgets.QWidget()
|
||||
self.tab_4.setObjectName("tab_4")
|
||||
self.formLayoutWidget = QtWidgets.QWidget(parent=self.tab_4)
|
||||
self.formLayoutWidget.setGeometry(QtCore.QRect(10, 10, 451, 121))
|
||||
self.formLayoutWidget.setObjectName("formLayoutWidget")
|
||||
self.formLayout_6 = QtWidgets.QFormLayout(self.formLayoutWidget)
|
||||
self.formLayout_6.setContentsMargins(0, 0, 0, 0)
|
||||
self.formLayout_6.setObjectName("formLayout_6")
|
||||
self.label_25 = QtWidgets.QLabel(parent=self.formLayoutWidget)
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.tab_4)
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
self.gridLayout = QtWidgets.QGridLayout()
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.label_25 = QtWidgets.QLabel(parent=self.tab_4)
|
||||
self.label_25.setObjectName("label_25")
|
||||
self.formLayout_6.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_25)
|
||||
self.seach_by_signature = QtWidgets.QLineEdit(parent=self.formLayoutWidget)
|
||||
self.seach_by_signature.setClearButtonEnabled(True)
|
||||
self.seach_by_signature.setObjectName("seach_by_signature")
|
||||
self.formLayout_6.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.seach_by_signature)
|
||||
self.label_26 = QtWidgets.QLabel(parent=self.formLayoutWidget)
|
||||
self.gridLayout.addWidget(self.label_25, 0, 0, 1, 1)
|
||||
self.label_26 = QtWidgets.QLabel(parent=self.tab_4)
|
||||
self.label_26.setObjectName("label_26")
|
||||
self.formLayout_6.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_26)
|
||||
self.search_by_title = QtWidgets.QLineEdit(parent=self.formLayoutWidget)
|
||||
self.gridLayout.addWidget(self.label_26, 1, 0, 1, 1)
|
||||
self.search_by_title = QtWidgets.QLineEdit(parent=self.tab_4)
|
||||
self.search_by_title.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
|
||||
self.search_by_title.setClearButtonEnabled(True)
|
||||
self.search_by_title.setObjectName("search_by_title")
|
||||
self.formLayout_6.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.search_by_title)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.formLayout_6.setItem(2, QtWidgets.QFormLayout.ItemRole.LabelRole, spacerItem2)
|
||||
self.gridLayout.addWidget(self.search_by_title, 1, 1, 1, 1)
|
||||
self.book_search = QtWidgets.QPushButton(parent=self.tab_4)
|
||||
self.book_search.setGeometry(QtCore.QRect(10, 180, 75, 23))
|
||||
self.book_search.setObjectName("book_search")
|
||||
self.gridLayout.addWidget(self.book_search, 3, 0, 1, 1)
|
||||
self.seach_by_signature = QtWidgets.QLineEdit(parent=self.tab_4)
|
||||
self.seach_by_signature.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
|
||||
self.seach_by_signature.setClearButtonEnabled(True)
|
||||
self.seach_by_signature.setObjectName("seach_by_signature")
|
||||
self.gridLayout.addWidget(self.seach_by_signature, 0, 1, 1, 1)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.gridLayout.addItem(spacerItem2, 2, 0, 1, 1)
|
||||
self.gridLayout.setRowMinimumHeight(0, 1)
|
||||
self.gridLayout.setRowMinimumHeight(1, 1)
|
||||
self.gridLayout.setRowMinimumHeight(2, 1)
|
||||
self.gridLayout.setRowMinimumHeight(3, 1)
|
||||
self.horizontalLayout_3.addLayout(self.gridLayout)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_3.addItem(spacerItem3)
|
||||
self.horizontalLayout_3.setStretch(0, 30)
|
||||
self.horizontalLayout_3.setStretch(1, 70)
|
||||
self.tabWidget_2.addTab(self.tab_4, "")
|
||||
self.verticalLayout.addWidget(self.tabWidget_2)
|
||||
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
|
||||
@@ -155,8 +164,8 @@ class Ui_Dialog(object):
|
||||
self.btn_notify_for_deletion = QtWidgets.QPushButton(parent=self.apparatResult)
|
||||
self.btn_notify_for_deletion.setObjectName("btn_notify_for_deletion")
|
||||
self.horizontalLayout_7.addWidget(self.btn_notify_for_deletion)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_7.addItem(spacerItem3)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_7.addItem(spacerItem4)
|
||||
self.verticalLayout_4.addLayout(self.horizontalLayout_7)
|
||||
self.tableWidget = QtWidgets.QTableWidget(parent=self.apparatResult)
|
||||
self.tableWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
@@ -208,7 +217,7 @@ class Ui_Dialog(object):
|
||||
self.statistics_table.horizontalHeader().setDefaultSectionSize(80)
|
||||
self.statistics_table.horizontalHeader().setMinimumSectionSize(40)
|
||||
self.statistics_table.horizontalHeader().setSortIndicatorShown(True)
|
||||
self.statistics_table.horizontalHeader().setStretchLastSection(True)
|
||||
self.statistics_table.horizontalHeader().setStretchLastSection(False)
|
||||
self.statistics_table.verticalHeader().setStretchLastSection(True)
|
||||
self.verticalLayout_6.addWidget(self.statistics_table)
|
||||
self.dataLayout = QtWidgets.QHBoxLayout()
|
||||
@@ -297,6 +306,7 @@ class Ui_Dialog(object):
|
||||
self.label_25.setText(_translate("Dialog", "Signatur"))
|
||||
self.label_26.setText(_translate("Dialog", "Titel"))
|
||||
self.book_search.setText(_translate("Dialog", "Suchen"))
|
||||
self.seach_by_signature.setStatusTip(_translate("Dialog", "Trunkierung mit * am Ende unterstützt"))
|
||||
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_4), _translate("Dialog", "Suchen"))
|
||||
self.btn_del_select_apparats.setText(_translate("Dialog", "Ausgewählte Löschen"))
|
||||
self.btn_notify_for_deletion.setStatusTip(_translate("Dialog", "Zeigt für jeden ausgewählten Apparat eine eMail-Vorlage an"))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1244</width>
|
||||
<height>756</height>
|
||||
<height>767</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -207,78 +207,88 @@
|
||||
<attribute name="title">
|
||||
<string>Suchen</string>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>451</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>Signatur</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>seach_by_signature</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="seach_by_signature">
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>Titel</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>search_by_title</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="search_by_title">
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="book_search">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>180</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Suchen</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="30,70">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" rowminimumheight="1,1,1,1">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>Signatur</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>seach_by_signature</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>Titel</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>search_by_title</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="search_by_title">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QPushButton" name="book_search">
|
||||
<property name="text">
|
||||
<string>Suchen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="seach_by_signature">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Trunkierung mit * am Ende unterstützt</string>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -443,7 +453,7 @@
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
|
||||
Reference in New Issue
Block a user