diff --git a/src/logic/userInterface.py b/src/logic/userInterface.py index ac8f974..67801fa 100644 --- a/src/logic/userInterface.py +++ b/src/logic/userInterface.py @@ -115,7 +115,7 @@ class Ui(Ui_Semesterapparat): self.MainWindow = MainWindow # set the window title MainWindow.setWindowTitle("Semesterapparatsmanagement") - MainWindow.setWindowIcon(Icon("logo", "ico").icon) + MainWindow.setWindowIcon(Icon("logo").icon) self.db = Database() # self.show() @@ -219,7 +219,7 @@ class Ui(Ui_Semesterapparat): # Set visibility/enabled state of certain entries self.chkbx_show_del_media.setEnabled(False) self.label_info.hide() - self.frame.setEnabled(False) + self.app_group_box.setEnabled(False) self.line_2.hide() self.progress_label.hide() self.message_frame.hide() @@ -293,7 +293,7 @@ class Ui(Ui_Semesterapparat): self.elsa_save.clicked.connect(self.save_elsa) self.elsa_date_today.clicked.connect(self.generateTodayDateElsa) self.active_semester.clicked.connect(self.addSemester) - Icon("semap", "png").set_icon(self.active_semester) + Icon("semap").set_icon(self.active_semester) self.elsa_table.doubleClicked.connect(self.open_elsa) self.btn_add_document_elsa.clicked.connect(self.addDokumentElsa) self.check_file_elsa.clicked.connect(self.parseDokumentElsa) @@ -1199,7 +1199,7 @@ class Ui(Ui_Semesterapparat): self.check_eternal_app.setChecked(appdata.dauerapp) self.prof_id_adis.setText(str(appdata.prof_adis_id)) self.apparat_id_adis.setText(str(appdata.apparat_adis_id)) - self.frame.setEnabled(True) + self.app_group_box.setEnabled(True) self.groupBox_2.hide() self.groupBox.hide() self.validateLoadedData() @@ -1267,7 +1267,7 @@ class Ui(Ui_Semesterapparat): self.check_eternal_app.stateChanged.connect(self.validate_semester) def validate_prof_name(self): - if self.frame.isEnabled(): + if self.app_group_box.isEnabled(): if "," in self.drpdwn_prof_name.currentText(): self.drpdwn_prof_name.setStyleSheet("border: 1px solid green;") self.profname_mand.setText("") @@ -1281,7 +1281,7 @@ class Ui(Ui_Semesterapparat): # self.drpdwn_prof_name.setStyleSheet("border: 1px solid black;") def validate_prof_mail(self): - if self.frame.isEnabled(): + if self.app_group_box.isEnabled(): if self.prof_mail.hasAcceptableInput(): self.prof_mail.setStyleSheet("border: 1px solid green;") self.mail_mand.setText("") @@ -1294,7 +1294,7 @@ class Ui(Ui_Semesterapparat): self.prof_mail.setStyleSheet("border: 1px solid black;") def validate_prof_tel(self): - if self.frame.isEnabled(): + if self.app_group_box.isEnabled(): if self.prof_tel_nr.text() != "": self.prof_tel_nr.setStyleSheet("border: 1px solid green;") self.telnr_mand.setText("") @@ -1305,7 +1305,7 @@ class Ui(Ui_Semesterapparat): self.change_state(2, 0) def validate_app_name(self): - if self.frame.isEnabled(): + if self.app_group_box.isEnabled(): if self.app_name.hasAcceptableInput(): self.app_name.setStyleSheet("border: 1px solid green;") self.appname_mand.setText("") @@ -1316,7 +1316,7 @@ class Ui(Ui_Semesterapparat): self.change_state(3, 0) def validate_app_fach(self): - if self.frame.isEnabled(): + if self.app_group_box.isEnabled(): if self.app_fach.currentText() != "": self.app_fach.setStyleSheet("border: 1px solid green;") self.fach_mand.setText("") @@ -1327,7 +1327,7 @@ class Ui(Ui_Semesterapparat): self.change_state(4, 0) def validate_semester(self): - if self.frame.isEnabled(): + if self.app_group_box.isEnabled(): if ( (self.sem_sommer.isChecked() or self.sem_winter.isChecked()) and self.sem_year.hasAcceptableInput() @@ -1363,7 +1363,7 @@ class Ui(Ui_Semesterapparat): # def req_fields_filled(self): # # check if all required fields are filled # values = [] - # for item in self.frame.findChildren(QtWidgets.QLabel): + # for item in self.app_group_box.findChildren(QtWidgets.QLabel): # # if label name contains "req" and the text is empty, return false # if "mand" in item.objectName() and item.text() == "": # values.append(True) @@ -1444,8 +1444,8 @@ class Ui(Ui_Semesterapparat): # # remove all rows from table # #get all # self.tableWidget_apparate.sortItems(0, QtCore.Qt.SortOrder.AscendingOrder) - # self.frame.setDisabled(True) - # for child in self.frame.findChildren(QtWidgets.QLineEdit): + # self.app_group_box.setDisabled(True) + # for child in self.app_group_box.findChildren(QtWidgets.QLineEdit): # child.clear() def btn_create_new_apparat(self): @@ -1457,7 +1457,7 @@ class Ui(Ui_Semesterapparat): # clear dokumemt_list self.dokument_list.setRowCount(0) self.cancel_active_selection.setEnabled(True) - self.frame.setEnabled(True) + self.app_group_box.setEnabled(True) self.sem_year.setEnabled(True) self.sem_sommer.setEnabled(True) @@ -1469,7 +1469,7 @@ class Ui(Ui_Semesterapparat): if self.tableWidget_apparat_media.rowCount() > 0: self.tableWidget_apparat_media.setRowCount(0) # clear all fields - for item in self.frame.findChildren(QtWidgets.QLineEdit): + for item in self.app_group_box.findChildren(QtWidgets.QLineEdit): item.clear() self.drpdwn_app_nr.clear() self.prof_title.clear() @@ -1499,7 +1499,7 @@ class Ui(Ui_Semesterapparat): self.label_info.hide() def btn_add_medium(self): - if not self.frame.isEnabled(): + if not self.app_group_box.isEnabled(): self.confirm_popup("Bitte erst einen Apparat auswählen!") return @@ -1614,7 +1614,7 @@ class Ui(Ui_Semesterapparat): # clear the rows of the table self.tableWidget_apparat_media.setRowCount(0) self.dokument_list.setRowCount(0) - self.frame.setEnabled(False) + self.app_group_box.setEnabled(False) self.app_fach.setCurrentText("") self.chkbx_show_del_media.hide() self.check_send_mail.hide() @@ -1626,7 +1626,7 @@ class Ui(Ui_Semesterapparat): self.sem_sommer.setChecked(False) self.sem_winter.setChecked(False) - for child in self.frame.findChildren(QtWidgets.QLineEdit): + for child in self.app_group_box.findChildren(QtWidgets.QLineEdit): child.clear() def update_app_media_list(self): @@ -1982,7 +1982,7 @@ class Ui(Ui_Semesterapparat): self.apparat_id_adis.clear() self.drpdwn_prof_name.clear() self.tableWidget_apparat_media.setRowCount(0) - self.frame.setEnabled(False) + self.app_group_box.setEnabled(False) self.groupBox_2.hide() self.groupBox.hide() self.check_send_mail.setChecked(False) @@ -2170,7 +2170,6 @@ class Ui(Ui_Semesterapparat): appnr = message["appnr"] appnr = "/" if appnr is None else str(appnr) self.line_app_info.setText(appnr) - def __delete_message(): message = messages[self.spin_select_message.value() - 1] self.db.deleteMessage(message["id"]) @@ -2206,11 +2205,9 @@ class Ui(Ui_Semesterapparat): self.btn_delete_message.clicked.connect(__delete_message) def open_settings(self): - dialog = QtWidgets.QDialog() settings = settings_ui(self.active_user) - settings.setupUi(dialog) - dialog.exec() - if dialog.result() == QtWidgets.QDialog.DialogCode.Accepted: + settings.exec() + if settings.result() == QtWidgets.QDialog.DialogCode.Accepted: data = settings.return_data() print(data) OmegaConf.save(data, "config.yaml") diff --git a/src/ui/semesterapparat_ui.ui b/src/ui/semesterapparat_ui.ui index 5b872e0..99ddfff 100644 --- a/src/ui/semesterapparat_ui.ui +++ b/src/ui/semesterapparat_ui.ui @@ -74,7 +74,7 @@ Qt::NoFocus - 1 + 0 @@ -255,1021 +255,6 @@ - - - - true - - - - 0 - 0 - - - - - 0 - 210 - - - - - 12 - true - - - - Apparatsdetails - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - false - - - - - 765 - 20 - 321 - 181 - - - - - 10 - false - false - - - - Qt::NoFocus - - - true - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustToContents - - - true - - - QAbstractItemView::DropOnly - - - Qt::LinkAction - - - QAbstractItemView::SingleSelection - - - 107 - - - - Dokumentname - - - - Arial - 8 - - - - - - Dateityp - - - - Arial - 8 - - - - - - Neu? - - - - Arial - 8 - - - - - - path - - - - - - true - - - - 10 - 30 - 1241 - 151 - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 250 - 20 - 91 - 21 - - - - - 9 - false - - - - Apparatsname - - - - - - 340 - 50 - 82 - 17 - - - - - 9 - false - - - - Qt::NoFocus - - - Winter - - - - - - 10 - 80 - 71 - 21 - - - - - 9 - false - - - - Prof. Name - - - - - - 110 - 20 - 69 - 22 - - - - - 9 - false - - - - Qt::ImhNone - - - true - - - - - - 340 - 20 - 113 - 20 - - - - - 9 - false - - - - Qt::StrongFocus - - - - - - 340 - 70 - 82 - 17 - - - - - 9 - false - - - - Qt::NoFocus - - - Sommer - - - - - - 10 - 50 - 61 - 20 - - - - - 9 - false - - - - Prof. Titel - - - - - - 270 - 60 - 61 - 21 - - - - - 9 - false - - - - Semester - - - - - - 410 - 60 - 113 - 20 - - - - - 9 - false - - - - Qt::StrongFocus - - - 4 - - - 2023 - - - - - - 10 - 20 - 101 - 21 - - - - - 9 - false - - - - Apparatsnummer - - - - - - 260 - 120 - 75 - 23 - - - - - 9 - false - - - - searching - - - Speichern - - - - - - 350 - 120 - 75 - 23 - - - - - 9 - false - - - - Aktualisieren - - - - - false - - - - 340 - 90 - 101 - 17 - - - - - 9 - false - - - - Dauerapparat - - - - - - 10 - 110 - 71 - 21 - - - - - 9 - false - - - - Mail - - - - - - 110 - 110 - 121 - 20 - - - - - 9 - false - - - - Qt::ImhEmailCharactersOnly - - - 200 - - - - - - - - - 10 - 130 - 71 - 21 - - - - - 9 - false - - - - Tel - - - - - - 110 - 130 - 121 - 20 - - - - - 9 - false - - - - Qt::ImhDigitsOnly - - - - - - - - - 470 - 20 - 51 - 21 - - - - - 9 - false - - - - Fach - - - - - - 110 - 80 - 121 - 22 - - - - - 9 - false - - - - Qt::StrongFocus - - - Qt::ImhNone - - - true - - - QComboBox::InsertAlphabetically - - - true - - - - - - 100 - 110 - 47 - 21 - - - - - 9 - false - - - - * - - - - - - 100 - 130 - 47 - 21 - - - - - 9 - false - - - - * - - - - - - 100 - 80 - 47 - 21 - - - - - 9 - false - - - - * - - - - - - 330 - 20 - 16 - 21 - - - - - 9 - false - - - - * - - - - - - 500 - 20 - 47 - 21 - - - - - 9 - false - - - - Qt::NoFocus - - - * - - - - - - 330 - 60 - 16 - 21 - - - - - 9 - false - - - - * - - - - - - 1090 - 20 - 131 - 25 - - - - - 9 - false - - - - Dokument hinzufügen - - - - - - 1090 - 60 - 131 - 25 - - - - - 9 - false - - - - Dokument öffnen - - - - - - 1090 - 100 - 131 - 51 - - - - - 9 - false - - - - Abhängig von der Anzahl der Medien kann die Suche sehr lange dauern - - - Medien aus Dokument - hinzufügen - - - - - - 550 - 70 - 202 - 80 - - - - - - - - 9 - false - - - - Prof-ID-aDIS - - - - - - - - 9 - false - - - - Qt::ImhPreferNumbers - - - - - - - - - - - 9 - false - - - - Apparat-ID-aDIS - - - - - - - - 9 - false - - - - Qt::ImhPreferNumbers - - - - - - - - - 450 - 120 - 91 - 17 - - - - - 9 - false - - - - Mail senden - - - - - - 510 - 0 - 241 - 61 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 0 - 0 - 241 - 61 - - - - - - - - 16777215 - 25 - - - - - 9 - false - - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 110 - 50 - 71 - 20 - - - - - 9 - false - - - - Qt::StrongFocus - - - mail_mand - _mand - label_5 - sem_winter - label_4 - drpdwn_app_nr - sem_sommer - label_3 - label_6 - sem_year - label_2 - btn_apparat_save - btn_apparat_apply - check_eternal_app - label_8 - label_9 - label_10 - telnr_mand - profname_mand - appname_mand - fach_mand - btn_add_document - btn_open_document - app_name - prof_tel_nr - drpdwn_prof_name - prof_mail - check_file - formLayoutWidget_2 - check_send_mail - frame_3 - prof_title - - frame - dokument_list - - - - - - - 0 - 0 - - - - - 1259 - 0 - - - - Qt::NoFocus - - - Qt::CustomContextMenu - - - QAbstractScrollArea::AdjustToContents - - - QAbstractItemView::NoEditTriggers - - - true - - - QAbstractItemView::SelectRows - - - true - - - true - - - - Buchtitel - - - Es kann sein, dass der Buchtitel leer ist, dies kommt vor, wenn der Titel nicht passend formatiert ist - - - - - Signatur - - - - - Auflage - - - - - Autor - - - - - im Apparat? - - - Diese Angabe ist nicht zuverlässig. Ist das ❌ vorhanden, kann das Medium im Apparat sein, aber aufgrund eines Bugs nicht gefunden worden - - - - - Vorgemerkt - - - - - Link - - - - - - - - - 11 - true - - - - Medienliste - - - @@ -1398,6 +383,946 @@ + + + + + 0 + 0 + + + + + 1259 + 0 + + + + Qt::NoFocus + + + Qt::CustomContextMenu + + + QAbstractScrollArea::AdjustToContents + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SelectRows + + + true + + + true + + + + Buchtitel + + + Es kann sein, dass der Buchtitel leer ist, dies kommt vor, wenn der Titel nicht passend formatiert ist + + + + + Signatur + + + + + Auflage + + + + + Autor + + + + + im Apparat? + + + Diese Angabe ist nicht zuverlässig. Ist das ❌ vorhanden, kann das Medium im Apparat sein, aber aufgrund eines Bugs nicht gefunden worden + + + + + Vorgemerkt + + + + + Link + + + + + + + + + 11 + true + + + + Medienliste + + + + + + + true + + + + 0 + 0 + + + + + 0 + 210 + + + + + 12 + true + + + + Apparatsdetails + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + + + 780 + 20 + 321 + 181 + + + + + 10 + false + false + + + + Qt::NoFocus + + + true + + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustToContents + + + true + + + QAbstractItemView::DropOnly + + + Qt::LinkAction + + + QAbstractItemView::SingleSelection + + + 107 + + + + Dokumentname + + + + Arial + 8 + + + + + + Dateityp + + + + Arial + 8 + + + + + + Neu? + + + + Arial + 8 + + + + + + path + + + + + + + 1110 + 120 + 131 + 51 + + + + + 9 + false + + + + Abhängig von der Anzahl der Medien kann die Suche sehr lange dauern + + + Medien aus Dokument + hinzufügen + + + + + + 1110 + 80 + 131 + 25 + + + + + 9 + false + + + + Dokument öffnen + + + + + + 1110 + 40 + 131 + 25 + + + + + 9 + false + + + + Dokument hinzufügen + + + + + + 340 + 50 + 16 + 21 + + + + + 9 + false + + + + * + + + + + + 110 + 110 + 47 + 21 + + + + + 9 + false + + + + * + + + + + + 120 + 80 + 71 + 20 + + + + + 9 + false + + + + Qt::StrongFocus + + + + + + 510 + 50 + 47 + 21 + + + + + 9 + false + + + + Qt::NoFocus + + + * + + + + + + 360 + 150 + 75 + 23 + + + + + 9 + false + + + + Aktualisieren + + + + + + 20 + 160 + 71 + 21 + + + + + 9 + false + + + + Tel + + + + + + 520 + 30 + 241 + 61 + + + + + + + + 16777215 + 25 + + + + + 9 + false + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 340 + 90 + 16 + 21 + + + + + 9 + false + + + + * + + + + + + 120 + 160 + 121 + 20 + + + + + 9 + false + + + + Qt::ImhDigitsOnly + + + + + + + + false + + + + 350 + 120 + 101 + 17 + + + + + 9 + false + + + + Dauerapparat + + + + + + 350 + 100 + 82 + 17 + + + + + 9 + false + + + + Qt::NoFocus + + + Sommer + + + + + + 120 + 110 + 121 + 22 + + + + + 9 + false + + + + Qt::StrongFocus + + + Qt::ImhNone + + + true + + + QComboBox::InsertAlphabetically + + + true + + + + + + 110 + 140 + 47 + 21 + + + + + 9 + false + + + + * + + + + + + 20 + 80 + 61 + 20 + + + + + 9 + false + + + + Prof. Titel + + + + + + 20 + 50 + 101 + 21 + + + + + 9 + false + + + + Apparatsnummer + + + + + + 20 + 140 + 71 + 21 + + + + + 9 + false + + + + Mail + + + + + + 480 + 50 + 51 + 21 + + + + + 9 + false + + + + Fach + + + + + + 120 + 140 + 121 + 20 + + + + + 9 + false + + + + Qt::ImhEmailCharactersOnly + + + 200 + + + + + + + + + 560 + 100 + 202 + 80 + + + + + + + + 9 + false + + + + Prof-ID-aDIS + + + + + + + + 9 + false + + + + Qt::ImhPreferNumbers + + + + + + + + + + + 9 + false + + + + Apparat-ID-aDIS + + + + + + + + 9 + false + + + + Qt::ImhPreferNumbers + + + + + + + + + 420 + 90 + 113 + 20 + + + + + 9 + false + + + + Qt::StrongFocus + + + 4 + + + 2023 + + + + + + 460 + 150 + 91 + 17 + + + + + 9 + false + + + + Mail senden + + + + + + 350 + 80 + 82 + 17 + + + + + 9 + false + + + + Qt::NoFocus + + + Winter + + + + + + 20 + 110 + 71 + 21 + + + + + 9 + false + + + + Prof. Name + + + + + + 110 + 160 + 47 + 21 + + + + + 9 + false + + + + * + + + + + + 270 + 150 + 75 + 23 + + + + + 9 + false + + + + searching + + + Speichern + + + + + + 260 + 50 + 91 + 21 + + + + + 9 + false + + + + Apparatsname + + + + + + 350 + 50 + 113 + 20 + + + + + 9 + false + + + + Qt::StrongFocus + + + + + + 120 + 50 + 69 + 22 + + + + + 9 + false + + + + Qt::ImhNone + + + true + + + + + + 280 + 90 + 61 + 21 + + + + + 9 + false + + + + Semester + + + + @@ -3243,7 +3168,7 @@ - 130 + 100 10 75 23 @@ -3259,7 +3184,7 @@ - 210 + 180 10 74 22 @@ -3272,7 +3197,7 @@ - 240 + 190 10 21 22 @@ -3352,23 +3277,9 @@ - drpdwn_app_nr - prof_title - drpdwn_prof_name - prof_mail - prof_tel_nr - app_name - app_fach - sem_year - check_eternal_app btn_add_document btn_open_document check_file - check_send_mail - btn_apparat_save - btn_apparat_apply - prof_id_adis - apparat_id_adis tabWidget_2 seach_by_signature search_by_title