bump python version, ruff check

This commit is contained in:
2026-02-10 14:33:54 +01:00
parent 639afe9b95
commit 2e5cda6689
70 changed files with 2946 additions and 1858 deletions

View File

@@ -1 +1 @@
3.13
3.14

View File

@@ -4,6 +4,7 @@ from omegaconf import OmegaConf, DictConfig
import os
from pathlib import Path
@dataclass
class OpenAI:
api_key: str
@@ -15,6 +16,7 @@ class OpenAI:
def _setattr(self, name: str, value: Any):
setattr(self, name, value)
@dataclass
class Zotero:
api_key: str
@@ -33,6 +35,7 @@ class Database:
name: str
path: Union[str, Path, None]
temp: Union[str, Path, None]
def getattr(self, name: str):
return getattr(self, name)
@@ -45,6 +48,7 @@ class Database:
if isinstance(self.temp, str):
self.temp = Path(self.temp).expanduser()
@dataclass
class Mail:
smtp_server: str
@@ -138,6 +142,7 @@ class Config:
_config: Optional[DictConfig] = None
config_exists: bool = True
def __init__(self, config_path: str):
"""
Loads the configuration file and stores it for future access.

View File

@@ -22,13 +22,14 @@ dependencies = [
"pdfquery>=0.4.3",
"playwright>=1.49.1",
"pymupdf>=1.26.6",
"pyramid>=2.0.2",
"flask>=3.1.0",
"pyside6>=6.9.1",
"python-docx>=1.1.2",
"pyzotero>=1.6.4",
"ratelimit>=2.2.1",
"regex>=2025.11.3",
"requests>=2.32.3",
"setuptools>=82.0.0",
"zensical>=0.0.10",
]
@@ -37,6 +38,7 @@ dev = [
"bump-my-version>=0.29.0",
"icecream>=2.1.4",
"nuitka>=2.5.9",
"prek>=0.3.2",
"pyinstaller>=6.17.0",
]
swbtest = ["alive-progress>=3.3.0"]

View File

@@ -19,6 +19,7 @@ def get_app_base_path() -> Path:
# Initialize LOG_DIR and CONFIG_DIR with fallbacks for frozen apps
try:
from appdirs import AppDirs
app = AppDirs("SemesterApparatsManager", "SAM")
_user_log_dir = app.user_log_dir
_user_config_dir = app.user_config_dir

View File

@@ -172,14 +172,14 @@ class Catalogue:
# based on PPN, get title, people, edition, year, language, pages, isbn,
link = f"https://rds.ibs-bw.de/phfreiburg/opac/RDSIndexrecord/{ppn}"
result = self.search(link)
soup = BeautifulSoup(result, "html.parser")
BeautifulSoup(result, "html.parser")
def get_ppn(self, searchterm: str) -> str | None:
links = self.get_book_links(searchterm)
ppn = None
for link in links:
result = self.search(link)
soup = BeautifulSoup(result, "html.parser")
BeautifulSoup(result, "html.parser")
# debug: link
# print(link)
ppn = link.split("/")[-1]

View File

@@ -1227,7 +1227,9 @@ class Database:
if app_id:
return AppPresentError(app_id)
if not prof_id:
log.debug("prof id not present, creating prof with data: {}", preview(prof, 300))
log.debug(
"prof id not present, creating prof with data: {}", preview(prof, 300)
)
prof_id = self.createProf(prof)
log.debug("prof_id: {}", preview(prof_id, 50))
query = f"INSERT OR IGNORE INTO semesterapparat (appnr, name, erstellsemester, dauer, prof_id, fach,deletion_status,konto) VALUES ('{app.appnr}', '{app.name}', '{app.created_semester}', '{app.eternal}', {prof_id}, '{app.subject}', '{0}', '{SEMAP_MEDIA_ACCOUNTS[app.appnr]}')"
@@ -1399,7 +1401,11 @@ class Database:
apparat_data.apparat.apparat_id_adis,
apparat_data.apparat.appnr,
)
log.debug("Updating apparat: query: {} params: {}", preview(query, 200), preview(params, 300))
log.debug(
"Updating apparat: query: {} params: {}",
preview(query, 200),
preview(params, 300),
)
self.query_db(query, params)
def checkApparatExists(self, app_name: str):

View File

@@ -1,4 +1,3 @@
import sys
import time
from src.shared.logging import log
@@ -7,7 +6,6 @@ from src.shared.logging import log
from PySide6.QtCore import QThread
from PySide6.QtCore import Signal as Signal
from src import LOG_DIR
from src.database import Database
# use centralized logging from src.shared.logging

View File

@@ -1162,7 +1162,9 @@ class Database:
if app_id:
return AppPresentError(app_id)
if not prof_id:
bloat.debug("prof id not present, creating prof with data: {}", preview(prof, 300))
bloat.debug(
"prof id not present, creating prof with data: {}", preview(prof, 300)
)
prof_id = self.createProf(prof)
log.debug("prof_id: {}", preview(prof_id, 50))
query = f"INSERT OR IGNORE INTO semesterapparat (appnr, name, erstellsemester, dauer, prof_id, fach,deletion_status,konto) VALUES ('{app.appnr}', '{app.name}', '{app.created_semester}', '{app.eternal}', {prof_id}, '{app.subject}', '{0}', '{SEMAP_MEDIA_ACCOUNTS[app.appnr]}')"
@@ -1324,7 +1326,11 @@ class Database:
apparat_data.apparat.apparat_id_adis,
apparat_data.apparat.appnr,
)
log.debug("Updating apparat: query: {} params: {}", preview(query, 200), preview(params, 300))
log.debug(
"Updating apparat: query: {} params: {}",
preview(query, 200),
preview(params, 300),
)
self.query_db(query, params)
def checkApparatExists(self, app_name: str):

View File

@@ -1,2 +1 @@

View File

@@ -2,7 +2,6 @@ from __future__ import annotations
import json
import re
import sys
from dataclasses import dataclass
from dataclasses import field as dataclass_field
from typing import Any, List

View File

@@ -48,8 +48,8 @@ class Catalogue:
log.info(f"Searching for term: {searchterm}")
links = self.get_book_links(searchterm)
# debug: links
# print(links)
# debug: links
# print(links)
for elink in links:
result = self.search(elink)
# in result search for class col-xs-12 rds-dl RDS_LOCATION
@@ -167,16 +167,16 @@ class Catalogue:
# based on PPN, get title, people, edition, year, language, pages, isbn,
link = f"https://rds.ibs-bw.de/phfreiburg/opac/RDSIndexrecord/{ppn}"
result = self.search(link)
soup = BeautifulSoup(result, "html.parser")
BeautifulSoup(result, "html.parser")
def get_ppn(self, searchterm: str) -> str | None:
links = self.get_book_links(searchterm)
ppn = None
for link in links:
result = self.search(link)
soup = BeautifulSoup(result, "html.parser")
# debug: link
# print(link)
BeautifulSoup(result, "html.parser")
# debug: link
# print(link)
ppn = link.split("/")[-1]
if ppn and regex.match(r"^\d{8,10}[X\d]?$", ppn):
return ppn
@@ -268,8 +268,8 @@ class Catalogue:
# Find the signature for the entry whose location mentions "Semesterapparat"
for g in groups:
# debug: group contents
# print(g)
# debug: group contents
# print(g)
loc = g.get("location", "").lower()
if "semesterapparat" in loc:
signature = g.get("signature")

View File

@@ -5,7 +5,7 @@ from pyzotero import zotero
from src import settings
from src.services.webrequest import BibTextTransformer, WebRequest
from src.shared.logging import log, get_bloat_logger, preview
from src.shared.logging import get_bloat_logger, preview
@dataclass
@@ -216,7 +216,9 @@ class ZoteroController:
resp = self.zot.create_items([item]) # type: ignore
if "successful" in resp.keys():
bloat = get_bloat_logger()
bloat.debug("Zotero create_items response (preview): {}", preview(resp, 1000))
bloat.debug(
"Zotero create_items response (preview): {}", preview(resp, 1000)
)
return resp["successful"]["0"]["key"]
else:
return None
@@ -249,7 +251,9 @@ class ZoteroController:
]
chapter.creators += authors
bloat.debug("Zotero Chapter payload (preview): {}", preview(chapter.to_dict(), 1000))
bloat.debug(
"Zotero Chapter payload (preview): {}", preview(chapter.to_dict(), 1000)
)
return self.createItem(chapter.to_dict())
pass

View File

@@ -2,7 +2,6 @@ from __future__ import annotations
import json
import re
import sys
from dataclasses import dataclass
from dataclasses import field as dataclass_field
from typing import Any, List
@@ -12,6 +11,7 @@ from src.core.models import BookData
# use centralized logging from src.shared.logging
###Pydatnic models
@dataclass
class Item:

View File

@@ -22,7 +22,12 @@ class Ui_Dialog(object):
self.verticalLayout.addWidget(self.label)
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.gridLayout.addItem(spacerItem, 0, 1, 1, 1)
self.checkBox = QtWidgets.QCheckBox(Dialog)
self.checkBox.setObjectName("checkBox")
@@ -42,22 +47,33 @@ class Ui_Dialog(object):
self.verticalLayout_2.addWidget(self.frame)
self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout_2.addWidget(self.buttonBox)
self.frame.setVisible(False)
self.checkBox.stateChanged.connect(lambda: self.frame.setVisible(self.checkBox.isChecked()))
self.checkBox.stateChanged.connect(
lambda: self.frame.setVisible(self.checkBox.isChecked())
)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
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.label.setText(_translate("Dialog", "Das eingegebene Fach wurde nicht in der Datenbank gefunden. Soll es angelegt werden?"))
self.label.setText(
_translate(
"Dialog",
"Das eingegebene Fach wurde nicht in der Datenbank gefunden. Soll es angelegt werden?",
)
)
self.checkBox.setText(_translate("Dialog", "Ja"))
self.label_2.setText(_translate("Dialog", "Name des Neuen Faches:"))
def return_state(self):
return self.lineEdit.text()

View File

@@ -166,8 +166,6 @@ class Ui_Dialog(object):
self.os_apps.setChecked(config.default_apps)
applications = config.custom_applications
for application in applications:
name = application.application
file_type = application.extensions
display_name = application.name
# print(name, file_type, display_name) #
# create new item

View File

@@ -16,15 +16,18 @@ class Ui_extend_confirm(object):
self.buttonBox = QtWidgets.QDialogButtonBox(parent=extend_confirm)
self.buttonBox.setGeometry(QtCore.QRect(290, 20, 81, 241))
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Vertical)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.textEdit = QtWidgets.QTextEdit(parent=extend_confirm)
self.textEdit.setGeometry(QtCore.QRect(10, 10, 271, 81))
self.textEdit.setObjectName("textEdit")
self.retranslateUi(extend_confirm)
self.buttonBox.accepted.connect(extend_confirm.accept) # type: ignore
self.buttonBox.rejected.connect(extend_confirm.reject) # type: ignore
self.buttonBox.accepted.connect(extend_confirm.accept) # type: ignore
self.buttonBox.rejected.connect(extend_confirm.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(extend_confirm)
def retranslateUi(self, extend_confirm):

View File

@@ -8,27 +8,25 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QSizePolicy, QWidget)
from PySide6.QtCore import (
QCoreApplication,
QMetaObject,
)
class Ui_Form(object):
def setupUi(self, Form):
if not Form.objectName():
Form.setObjectName(u"Form")
Form.setObjectName("Form")
Form.resize(300, 500)
self.retranslateUi(Form)
QMetaObject.connectSlotsByName(Form)
# setupUi
def retranslateUi(self, Form):
Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
# retranslateUi
Form.setWindowTitle(QCoreApplication.translate("Form", "Form", None))
# retranslateUi

View File

@@ -13,7 +13,9 @@ class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(388, 103)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
@@ -23,11 +25,16 @@ class Ui_Dialog(object):
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
self.buttonBox.setGeometry(QtCore.QRect(290, 30, 81, 241))
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Vertical)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Abort|QtWidgets.QDialogButtonBox.StandardButton.Save)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Abort
| QtWidgets.QDialogButtonBox.StandardButton.Save
)
self.buttonBox.setObjectName("buttonBox")
self.label = QtWidgets.QLabel(parent=Dialog)
self.label.setGeometry(QtCore.QRect(10, 0, 281, 31))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
@@ -60,14 +67,16 @@ class Ui_Dialog(object):
self.dauerapp.setObjectName("dauerapp")
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
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.label.setText(_translate("Dialog", "Bis wann soll der Apparat verlängert werden?"))
self.label.setText(
_translate("Dialog", "Bis wann soll der Apparat verlängert werden?")
)
self.rad_sommer.setText(_translate("Dialog", "Sommer"))
self.rad_winter.setText(_translate("Dialog", "Winter"))
self.sem_year.setPlaceholderText(_translate("Dialog", "2023"))

View File

@@ -20,13 +20,16 @@ class Ui_extend_confirm(object):
self.horizontalLayout.addWidget(self.textEdit)
self.buttonBox = QtWidgets.QDialogButtonBox(parent=extend_confirm)
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Vertical)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.horizontalLayout.addWidget(self.buttonBox)
self.retranslateUi(extend_confirm)
self.buttonBox.accepted.connect(extend_confirm.accept) # type: ignore
self.buttonBox.rejected.connect(extend_confirm.reject) # type: ignore
self.buttonBox.accepted.connect(extend_confirm.accept) # type: ignore
self.buttonBox.rejected.connect(extend_confirm.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(extend_confirm)
def retranslateUi(self, extend_confirm):

View File

@@ -8,34 +8,43 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject)
from PySide6.QtWidgets import (QHBoxLayout, QLabel, QLineEdit, QPushButton, QSizePolicy,
QSpacerItem, QTableWidget, QTableWidgetItem, QVBoxLayout)
from PySide6.QtCore import QCoreApplication, QMetaObject
from PySide6.QtWidgets import (
QHBoxLayout,
QLabel,
QLineEdit,
QPushButton,
QSizePolicy,
QSpacerItem,
QTableWidget,
QTableWidgetItem,
QVBoxLayout,
)
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(1001, 649)
self.verticalLayout = QVBoxLayout(Dialog)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setObjectName("horizontalLayout")
self.label = QLabel(Dialog)
self.label.setObjectName(u"label")
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.label)
self.lineEdit = QLineEdit(Dialog)
self.lineEdit.setObjectName(u"lineEdit")
self.lineEdit.setObjectName("lineEdit")
self.horizontalLayout.addWidget(self.lineEdit)
self.verticalLayout.addLayout(self.horizontalLayout)
self.tableWidget = QTableWidget(Dialog)
if (self.tableWidget.columnCount() < 7):
if self.tableWidget.columnCount() < 7:
self.tableWidget.setColumnCount(7)
__qtablewidgetitem = QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(0, __qtablewidgetitem)
@@ -51,64 +60,81 @@ class Ui_Dialog(object):
self.tableWidget.setHorizontalHeaderItem(5, __qtablewidgetitem5)
__qtablewidgetitem6 = QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(6, __qtablewidgetitem6)
self.tableWidget.setObjectName(u"tableWidget")
self.tableWidget.setObjectName("tableWidget")
self.tableWidget.setAlternatingRowColors(True)
self.tableWidget.horizontalHeader().setStretchLastSection(True)
self.verticalLayout.addWidget(self.tableWidget)
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.horizontalSpacer_2 = QSpacerItem(20, 20, QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Minimum)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.horizontalSpacer_2 = QSpacerItem(
20, 20, QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Minimum
)
self.horizontalLayout_2.addItem(self.horizontalSpacer_2)
self.reset_btn = QPushButton(Dialog)
self.reset_btn.setObjectName(u"reset_btn")
self.reset_btn.setObjectName("reset_btn")
self.horizontalLayout_2.addWidget(self.reset_btn)
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalSpacer = QSpacerItem(
40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
)
self.horizontalLayout_2.addItem(self.horizontalSpacer)
self.delete_btn = QPushButton(Dialog)
self.delete_btn.setObjectName(u"delete_btn")
self.delete_btn.setObjectName("delete_btn")
self.horizontalLayout_2.addWidget(self.delete_btn)
self.cancel_btn = QPushButton(Dialog)
self.cancel_btn.setObjectName(u"cancel_btn")
self.cancel_btn.setObjectName("cancel_btn")
self.horizontalLayout_2.addWidget(self.cancel_btn)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.retranslateUi(Dialog)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
self.label.setText(QCoreApplication.translate("Dialog", u"Medium suchen", None))
self.lineEdit.setPlaceholderText(QCoreApplication.translate("Dialog", u"Titel/Signatursuche", None))
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
self.label.setText(QCoreApplication.translate("Dialog", "Medium suchen", None))
self.lineEdit.setPlaceholderText(
QCoreApplication.translate("Dialog", "Titel/Signatursuche", None)
)
___qtablewidgetitem = self.tableWidget.horizontalHeaderItem(1)
___qtablewidgetitem.setText(QCoreApplication.translate("Dialog", u"Apparat", None))
___qtablewidgetitem.setText(
QCoreApplication.translate("Dialog", "Apparat", None)
)
___qtablewidgetitem1 = self.tableWidget.horizontalHeaderItem(2)
___qtablewidgetitem1.setText(QCoreApplication.translate("Dialog", u"Signatur", None))
___qtablewidgetitem1.setText(
QCoreApplication.translate("Dialog", "Signatur", None)
)
___qtablewidgetitem2 = self.tableWidget.horizontalHeaderItem(3)
___qtablewidgetitem2.setText(QCoreApplication.translate("Dialog", u"Titel", None))
___qtablewidgetitem2.setText(
QCoreApplication.translate("Dialog", "Titel", None)
)
___qtablewidgetitem3 = self.tableWidget.horizontalHeaderItem(4)
___qtablewidgetitem3.setText(QCoreApplication.translate("Dialog", u"Auflage", None))
___qtablewidgetitem3.setText(
QCoreApplication.translate("Dialog", "Auflage", None)
)
___qtablewidgetitem4 = self.tableWidget.horizontalHeaderItem(5)
___qtablewidgetitem4.setText(QCoreApplication.translate("Dialog", u"ISBN", None))
___qtablewidgetitem4.setText(QCoreApplication.translate("Dialog", "ISBN", None))
___qtablewidgetitem5 = self.tableWidget.horizontalHeaderItem(6)
___qtablewidgetitem5.setText(QCoreApplication.translate("Dialog", u"ID", None))
self.reset_btn.setText(QCoreApplication.translate("Dialog", u"Zur\u00fccksetzen", None))
self.delete_btn.setText(QCoreApplication.translate("Dialog", u"L\u00f6schen", None))
self.cancel_btn.setText(QCoreApplication.translate("Dialog", u"Abbrechen", None))
# retranslateUi
___qtablewidgetitem5.setText(QCoreApplication.translate("Dialog", "ID", None))
self.reset_btn.setText(
QCoreApplication.translate("Dialog", "Zur\u00fccksetzen", None)
)
self.delete_btn.setText(
QCoreApplication.translate("Dialog", "L\u00f6schen", None)
)
self.cancel_btn.setText(QCoreApplication.translate("Dialog", "Abbrechen", None))
# retranslateUi

View File

@@ -74,7 +74,10 @@ class Ui_Dialog(object):
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.textBrowser = QtWidgets.QTextBrowser(parent=self.frame)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.textBrowser.sizePolicy().hasHeightForWidth())
@@ -91,12 +94,16 @@ class Ui_Dialog(object):
font = QtGui.QFont()
font.setBold(False)
self.tableWidget.setFont(font)
self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidget.setEditTriggers(
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
)
self.tableWidget.setObjectName("tableWidget")
self.tableWidget.setColumnCount(2)
self.tableWidget.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
item.setTextAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignVCenter)
item.setTextAlignment(
QtCore.Qt.AlignmentFlag.AlignLeading | QtCore.Qt.AlignmentFlag.AlignVCenter
)
self.tableWidget.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(1, item)
@@ -113,30 +120,55 @@ class Ui_Dialog(object):
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.label.setText(_translate("Dialog", "Mit dem Klick auf Okay wird eine Übersicht aller aktiven Semesterapparate erstellt und an den FollowME Drucker gesendet. Es kann bis zu 5 Minuten dauern, bis das Dokument im Drucker angezeigt wird."))
self.label.setText(
_translate(
"Dialog",
"Mit dem Klick auf Okay wird eine Übersicht aller aktiven Semesterapparate erstellt und an den FollowME Drucker gesendet. Es kann bis zu 5 Minuten dauern, bis das Dokument im Drucker angezeigt wird.",
)
)
self.pushButton.setText(_translate("Dialog", "Dokument erstellen und drucken"))
self.toolBox.setItemText(self.toolBox.indexOf(self.page), _translate("Dialog", "Semesterapparatsübersicht"))
self.label_2.setText(_translate("Dialog", "Hier kann das Dokument für die Semesterapparatsschilder erstellt werden. Hierfür müssen die entsprechenden Apparate ausgewählt werden. Mithilfe dieser wird das Dokument erstellt."))
self.pushButton_2.setText(_translate("Dialog", "Dokument erstellen und drucken"))
self.btn_load_current_apparats.setText(_translate("Dialog", "Aktuelle Apparate laden"))
self.toolBox.setItemText(
self.toolBox.indexOf(self.page),
_translate("Dialog", "Semesterapparatsübersicht"),
)
self.label_2.setText(
_translate(
"Dialog",
"Hier kann das Dokument für die Semesterapparatsschilder erstellt werden. Hierfür müssen die entsprechenden Apparate ausgewählt werden. Mithilfe dieser wird das Dokument erstellt.",
)
)
self.pushButton_2.setText(
_translate("Dialog", "Dokument erstellen und drucken")
)
self.btn_load_current_apparats.setText(
_translate("Dialog", "Aktuelle Apparate laden")
)
self.expertMode.setText(_translate("Dialog", "Expertenmodus"))
self.textBrowser.setHtml(_translate("Dialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"hr { height: 1px; border-width: 0; }\n"
"li.unchecked::marker { content: \"\\2610\"; }\n"
"li.checked::marker { content: \"\\2612\"; }\n"
"</style></head><body style=\" font-family:\'Segoe UI\'; font-size:9pt; font-weight:700; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">SELECT</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> prof.lname || \' (\' || semesterapparat.name || \')\' AS formatted_result</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">from</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> semesterapparat</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> INNER JOIN prof ON semesterapparat.prof_id = prof.id</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">WHERE</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> (erstellsemester = \'SoSe 25\'</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> OR erstellsemester = \'WiSe 24/25\')</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> and semesterapparat.deletion_status = 0</p></body></html>"))
self.textBrowser.setHtml(
_translate(
"Dialog",
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">\n'
'<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">\n'
"p, li { white-space: pre-wrap; }\n"
"hr { height: 1px; border-width: 0; }\n"
'li.unchecked::marker { content: "\\2610"; }\n'
'li.checked::marker { content: "\\2612"; }\n'
"</style></head><body style=\" font-family:'Segoe UI'; font-size:9pt; font-weight:700; font-style:normal;\">\n"
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">SELECT</p>\n'
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> prof.lname || ' (' || semesterapparat.name || ')' AS formatted_result</p>\n"
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">from</p>\n'
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> semesterapparat</p>\n'
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> INNER JOIN prof ON semesterapparat.prof_id = prof.id</p>\n'
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">WHERE</p>\n'
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> (erstellsemester = 'SoSe 25'</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> OR erstellsemester = 'WiSe 24/25')</p>\n"
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> and semesterapparat.deletion_status = 0</p></body></html>',
)
)
self.manualCheck.setText(_translate("Dialog", "Anfragen und anzeigen"))
item = self.tableWidget.horizontalHeaderItem(1)
item.setText(_translate("Dialog", "Name"))
self.toolBox.setItemText(self.toolBox.indexOf(self.page_2), _translate("Dialog", "Semesterapparatsschilder"))
self.toolBox.setItemText(
self.toolBox.indexOf(self.page_2),
_translate("Dialog", "Semesterapparatsschilder"),
)

View File

@@ -16,13 +16,18 @@ class Ui_Dialog(object):
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
self.buttonBox.setGeometry(QtCore.QRect(260, 530, 161, 32))
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.gridLayoutWidget = QtWidgets.QWidget(parent=Dialog)
self.gridLayoutWidget.setGeometry(QtCore.QRect(0, 0, 441, 531))
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint)
self.gridLayout.setSizeConstraint(
QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint
)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.label_10 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
@@ -66,7 +71,12 @@ class Ui_Dialog(object):
self.label_2 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 1, 1, 1, 1)
spacerItem = QtWidgets.QSpacerItem(5, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem = QtWidgets.QSpacerItem(
5,
20,
QtWidgets.QSizePolicy.Policy.Fixed,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.gridLayout.addItem(spacerItem, 8, 0, 1, 1)
self.line_title = QtWidgets.QLineEdit(parent=self.gridLayoutWidget)
self.line_title.setObjectName("line_title")
@@ -97,8 +107,8 @@ class Ui_Dialog(object):
self.gridLayout.addWidget(self.line_publisher, 4, 2, 1, 1)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@@ -653,9 +653,7 @@ class Ui_Dialog(object):
QCoreApplication.translate("Dialog", "Zitat erstellen", None)
)
self.label.setText(
QCoreApplication.translate(
"Dialog", "Autor(en)\n" " Nachname, Vorname", None
)
QCoreApplication.translate("Dialog", "Autor(en)\n Nachname, Vorname", None)
)
# if QT_CONFIG(tooltip)
self.book_author.setToolTip(
@@ -697,15 +695,13 @@ class Ui_Dialog(object):
)
self.label_21.setText(QCoreApplication.translate("Dialog", "Auflage", None))
self.label_19.setText(
QCoreApplication.translate(
"Dialog", "Autor(en)\n" "Nachname, Vorname", None
)
QCoreApplication.translate("Dialog", "Autor(en)\nNachname, Vorname", None)
)
self.label_30.setText(QCoreApplication.translate("Dialog", "ISBN", None))
self.label_25.setText(QCoreApplication.translate("Dialog", "Ort", None))
self.label_22.setText(
QCoreApplication.translate(
"Dialog", "Herausgebername(n)\n" "Nachname, Vorname", None
"Dialog", "Herausgebername(n)\nNachname, Vorname", None
)
)
# if QT_CONFIG(tooltip)
@@ -717,9 +713,7 @@ class Ui_Dialog(object):
# endif // QT_CONFIG(tooltip)
self.page_warn_3.setText("")
self.label_10.setText(
QCoreApplication.translate(
"Dialog", "Autor(en)\n" "Nachname, Vorname", None
)
QCoreApplication.translate("Dialog", "Autor(en)\nNachname, Vorname", None)
)
self.label_14.setText(
QCoreApplication.translate("Dialog", "Name der Zeitschrift", None)

View File

@@ -30,7 +30,12 @@ class Ui_Dialog(object):
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)
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)
@@ -57,7 +62,9 @@ class Ui_Dialog(object):
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_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)

View File

@@ -13,7 +13,9 @@ 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 = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
@@ -98,14 +100,17 @@ class Ui_Dialog(object):
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.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
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
@@ -117,4 +122,8 @@ class Ui_Dialog(object):
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"))
self.label_6.setText(
_translate(
"Dialog", "Hier können fehlerhafte / fehlende Daten geändert werden"
)
)

View File

@@ -14,7 +14,11 @@ class Ui_Dialog(object):
Dialog.setObjectName("Dialog")
Dialog.resize(218, 190)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/resources/1f510.svg"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
icon.addPixmap(
QtGui.QPixmap(":/icons/resources/1f510.svg"),
QtGui.QIcon.Mode.Normal,
QtGui.QIcon.State.Off,
)
Dialog.setWindowIcon(icon)
self.label = QtWidgets.QLabel(parent=Dialog)
self.label.setGeometry(QtCore.QRect(20, 40, 71, 21))

View File

@@ -8,27 +8,38 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject, QSize, Qt)
from PySide6.QtWidgets import (QComboBox, QDialogButtonBox, QGridLayout, QHBoxLayout, QLabel,
QLineEdit, QPushButton, QRadioButton, QSizePolicy,
QSpacerItem, QTextEdit)
from PySide6.QtCore import QCoreApplication, QMetaObject, QSize, Qt
from PySide6.QtWidgets import (
QComboBox,
QDialogButtonBox,
QGridLayout,
QHBoxLayout,
QLabel,
QLineEdit,
QPushButton,
QRadioButton,
QSizePolicy,
QSpacerItem,
QTextEdit,
)
class Ui_eMailPreview(object):
def setupUi(self, eMailPreview):
if not eMailPreview.objectName():
eMailPreview.setObjectName(u"eMailPreview")
eMailPreview.setObjectName("eMailPreview")
eMailPreview.resize(700, 668)
self.gridLayout_2 = QGridLayout(eMailPreview)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.gridLayout_2.setObjectName("gridLayout_2")
self.gridLayout = QGridLayout()
self.gridLayout.setObjectName(u"gridLayout")
self.gridLayout.setObjectName("gridLayout")
self.prof_name = QLineEdit(eMailPreview)
self.prof_name.setObjectName(u"prof_name")
self.prof_name.setObjectName("prof_name")
self.gridLayout.addWidget(self.prof_name, 2, 2, 1, 1)
self.newTemplate = QPushButton(eMailPreview)
self.newTemplate.setObjectName(u"newTemplate")
self.newTemplate.setObjectName("newTemplate")
self.newTemplate.setAutoFillBackground(False)
self.newTemplate.setIconSize(QSize(24, 24))
self.newTemplate.setAutoDefault(True)
@@ -37,134 +48,146 @@ class Ui_eMailPreview(object):
self.gridLayout.addWidget(self.newTemplate, 0, 3, 1, 1)
self.comboBox = QComboBox(eMailPreview)
self.comboBox.setObjectName(u"comboBox")
self.comboBox.setObjectName("comboBox")
self.gridLayout.addWidget(self.comboBox, 0, 2, 1, 1)
self.mail_header = QLineEdit(eMailPreview)
self.mail_header.setObjectName(u"mail_header")
self.mail_header.setObjectName("mail_header")
self.gridLayout.addWidget(self.mail_header, 3, 2, 1, 1)
self.label_6 = QLabel(eMailPreview)
self.label_6.setObjectName(u"label_6")
self.label_6.setObjectName("label_6")
self.gridLayout.addWidget(self.label_6, 4, 0, 1, 1)
self.mail_body = QTextEdit(eMailPreview)
self.mail_body.setObjectName(u"mail_body")
self.mail_body.setObjectName("mail_body")
self.gridLayout.addWidget(self.mail_body, 5, 2, 1, 1)
self.label_2 = QLabel(eMailPreview)
self.label_2.setObjectName(u"label_2")
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
self.mail_name = QLineEdit(eMailPreview)
self.mail_name.setObjectName(u"mail_name")
self.mail_name.setObjectName("mail_name")
self.gridLayout.addWidget(self.mail_name, 1, 2, 1, 1)
self.label_5 = QLabel(eMailPreview)
self.label_5.setObjectName(u"label_5")
self.label_5.setObjectName("label_5")
self.gridLayout.addWidget(self.label_5, 0, 0, 1, 1)
self.label_4 = QLabel(eMailPreview)
self.label_4.setObjectName(u"label_4")
self.label_4.setObjectName("label_4")
self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.gender_male = QRadioButton(eMailPreview)
self.gender_male.setObjectName(u"gender_male")
self.gender_male.setObjectName("gender_male")
self.horizontalLayout_3.addWidget(self.gender_male)
self.gender_female = QRadioButton(eMailPreview)
self.gender_female.setObjectName(u"gender_female")
self.gender_female.setObjectName("gender_female")
self.horizontalLayout_3.addWidget(self.gender_female)
self.gender_non = QRadioButton(eMailPreview)
self.gender_non.setObjectName(u"gender_non")
self.gender_non.setObjectName("gender_non")
self.horizontalLayout_3.addWidget(self.gender_non)
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalSpacer = QSpacerItem(
40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
)
self.horizontalLayout_3.addItem(self.horizontalSpacer)
self.gridLayout.addLayout(self.horizontalLayout_3, 4, 2, 1, 1)
self.label_3 = QLabel(eMailPreview)
self.label_3.setObjectName(u"label_3")
self.label_3.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop)
self.label_3.setObjectName("label_3")
self.label_3.setAlignment(Qt.AlignLeading | Qt.AlignLeft | Qt.AlignTop)
self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
self.label = QLabel(eMailPreview)
self.label.setObjectName(u"label")
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.horizontalSpacer_2 = QSpacerItem(
40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
)
self.horizontalLayout_2.addItem(self.horizontalSpacer_2)
self.btn_okay = QPushButton(eMailPreview)
self.btn_okay.setObjectName(u"btn_okay")
self.btn_okay.setObjectName("btn_okay")
self.horizontalLayout_2.addWidget(self.btn_okay)
self.buttonBox = QDialogButtonBox(eMailPreview)
self.buttonBox.setObjectName(u"buttonBox")
self.buttonBox.setObjectName("buttonBox")
self.buttonBox.setOrientation(Qt.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel)
self.buttonBox.setCenterButtons(True)
self.horizontalLayout_2.addWidget(self.buttonBox)
self.gridLayout.addLayout(self.horizontalLayout_2, 6, 2, 1, 1)
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
self.retranslateUi(eMailPreview)
self.buttonBox.accepted.connect(eMailPreview.accept)
self.buttonBox.rejected.connect(eMailPreview.reject)
self.newTemplate.setDefault(False)
QMetaObject.connectSlotsByName(eMailPreview)
# setupUi
def retranslateUi(self, eMailPreview):
eMailPreview.setWindowTitle(QCoreApplication.translate("eMailPreview", u"eMail Voransicht", None))
eMailPreview.setWindowTitle(
QCoreApplication.translate("eMailPreview", "eMail Voransicht", None)
)
self.newTemplate.setText("")
self.label_6.setText(QCoreApplication.translate("eMailPreview", u"Anrede", None))
self.label_2.setText(QCoreApplication.translate("eMailPreview", u"Prof", None))
self.label_5.setText(QCoreApplication.translate("eMailPreview", u"Art", None))
self.label_4.setText(QCoreApplication.translate("eMailPreview", u"Betreff", None))
self.gender_male.setText(QCoreApplication.translate("eMailPreview", u"M", None))
self.gender_female.setText(QCoreApplication.translate("eMailPreview", u"W", None))
self.gender_non.setText(QCoreApplication.translate("eMailPreview", u"Divers", None))
self.label_3.setText(QCoreApplication.translate("eMailPreview", u"Mail", None))
self.label.setText(QCoreApplication.translate("eMailPreview", u"eMail", None))
#if QT_CONFIG(statustip)
self.label_6.setText(QCoreApplication.translate("eMailPreview", "Anrede", None))
self.label_2.setText(QCoreApplication.translate("eMailPreview", "Prof", None))
self.label_5.setText(QCoreApplication.translate("eMailPreview", "Art", None))
self.label_4.setText(
QCoreApplication.translate("eMailPreview", "Betreff", None)
)
self.gender_male.setText(QCoreApplication.translate("eMailPreview", "M", None))
self.gender_female.setText(
QCoreApplication.translate("eMailPreview", "W", None)
)
self.gender_non.setText(
QCoreApplication.translate("eMailPreview", "Divers", None)
)
self.label_3.setText(QCoreApplication.translate("eMailPreview", "Mail", None))
self.label.setText(QCoreApplication.translate("eMailPreview", "eMail", None))
# if QT_CONFIG(statustip)
self.btn_okay.setStatusTip("")
#endif // QT_CONFIG(statustip)
#if QT_CONFIG(whatsthis)
self.btn_okay.setWhatsThis(QCoreApplication.translate("eMailPreview", u"test", None))
#endif // QT_CONFIG(whatsthis)
self.btn_okay.setText(QCoreApplication.translate("eMailPreview", u"Senden", None))
# retranslateUi
# endif // QT_CONFIG(statustip)
# if QT_CONFIG(whatsthis)
self.btn_okay.setWhatsThis(
QCoreApplication.translate("eMailPreview", "test", None)
)
# endif // QT_CONFIG(whatsthis)
self.btn_okay.setText(
QCoreApplication.translate("eMailPreview", "Senden", None)
)
# retranslateUi

View File

@@ -14,7 +14,11 @@ class Ui_Dialog(object):
Dialog.setObjectName("Dialog")
Dialog.resize(620, 481)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/resources/2795.svg"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
icon.addPixmap(
QtGui.QPixmap(":/icons/resources/2795.svg"),
QtGui.QIcon.Mode.Normal,
QtGui.QIcon.State.Off,
)
Dialog.setWindowIcon(icon)
self.label = QtWidgets.QLabel(parent=Dialog)
self.label.setGeometry(QtCore.QRect(20, 10, 47, 21))
@@ -47,12 +51,22 @@ class Ui_Dialog(object):
self.tableWidget.setAutoFillBackground(False)
self.tableWidget.setLineWidth(0)
self.tableWidget.setMidLineWidth(0)
self.tableWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
self.tableWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
self.tableWidget.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidget.setVerticalScrollBarPolicy(
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
)
self.tableWidget.setHorizontalScrollBarPolicy(
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
)
self.tableWidget.setSizeAdjustPolicy(
QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents
)
self.tableWidget.setEditTriggers(
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
)
self.tableWidget.setAlternatingRowColors(True)
self.tableWidget.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.NoSelection)
self.tableWidget.setSelectionMode(
QtWidgets.QAbstractItemView.SelectionMode.NoSelection
)
self.tableWidget.setTextElideMode(QtCore.Qt.TextElideMode.ElideMiddle)
self.tableWidget.setObjectName("tableWidget")
self.tableWidget.setColumnCount(4)
@@ -179,7 +193,9 @@ class Ui_Dialog(object):
self.horizontalLayout.addWidget(self.tableWidget)
self.listWidget = QtWidgets.QListWidget(parent=Dialog)
self.listWidget.setGeometry(QtCore.QRect(10, 110, 281, 321))
self.listWidget.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
self.listWidget.setContextMenuPolicy(
QtCore.Qt.ContextMenuPolicy.CustomContextMenu
)
self.listWidget.setObjectName("listWidget")
self.label_4 = QtWidgets.QLabel(parent=Dialog)
self.label_4.setGeometry(QtCore.QRect(330, 50, 181, 21))
@@ -354,7 +370,16 @@ class Ui_Dialog(object):
self.list_amount.setText(_translate("Dialog", "0"))
self.btn_save.setText(_translate("Dialog", "Ok"))
self.btn_cancel.setText(_translate("Dialog", "Abbrechen"))
self.check_use_any_book.setToolTip(_translate("Dialog", "Verwendet ein zufälliges Buch des Datensatzes, nützlich wenn das Buch noch nicht im Apparat ist"))
self.check_use_any_book.setToolTip(
_translate(
"Dialog",
"Verwendet ein zufälliges Buch des Datensatzes, nützlich wenn das Buch noch nicht im Apparat ist",
)
)
self.check_use_any_book.setText(_translate("Dialog", "Jedes Buch verwenden"))
self.check_use_exact_signature.setToolTip(_translate("Dialog", "Verwendet die eingegebene Signatur für die Suche von Daten"))
self.check_use_exact_signature.setToolTip(
_translate(
"Dialog", "Verwendet die eingegebene Signatur für die Suche von Daten"
)
)
self.check_use_exact_signature.setText(_translate("Dialog", "Exakte Signatur"))

View File

@@ -8,24 +8,36 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject, Qt)
from PySide6.QtWidgets import (QComboBox, QDialogButtonBox, QGridLayout, QHBoxLayout, QLabel,
QLineEdit, QPushButton, QSizePolicy, QSpacerItem,
QTextEdit, QVBoxLayout, QWidget)
from PySide6.QtCore import QCoreApplication, QMetaObject, Qt
from PySide6.QtWidgets import (
QComboBox,
QDialogButtonBox,
QGridLayout,
QHBoxLayout,
QLabel,
QLineEdit,
QPushButton,
QSizePolicy,
QSpacerItem,
QTextEdit,
QVBoxLayout,
QWidget,
)
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(689, 572)
self.verticalLayout_2 = QVBoxLayout(Dialog)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.verticalLayout = QVBoxLayout()
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setObjectName("verticalLayout")
self.gridLayout = QGridLayout()
self.gridLayout.setObjectName(u"gridLayout")
self.gridLayout.setObjectName("gridLayout")
self.label = QLabel(Dialog)
self.label.setObjectName(u"label")
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
@@ -36,19 +48,19 @@ class Ui_Dialog(object):
self.placeholder_list.addItem("")
self.placeholder_list.addItem("")
self.placeholder_list.addItem("")
self.placeholder_list.setObjectName(u"placeholder_list")
self.placeholder_list.setObjectName("placeholder_list")
self.placeholder_list.setFocusPolicy(Qt.NoFocus)
self.placeholder_list.setSizeAdjustPolicy(QComboBox.AdjustToContents)
self.gridLayout.addWidget(self.placeholder_list, 1, 0, 1, 1)
self.label_2 = QLabel(Dialog)
self.label_2.setObjectName(u"label_2")
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 0, 1, 1, 1)
self.lineEdit = QLineEdit(Dialog)
self.lineEdit.setObjectName(u"lineEdit")
self.lineEdit.setObjectName("lineEdit")
self.lineEdit.setEnabled(True)
self.lineEdit.setFocusPolicy(Qt.NoFocus)
self.lineEdit.setFrame(False)
@@ -57,50 +69,51 @@ class Ui_Dialog(object):
self.gridLayout.addWidget(self.lineEdit, 1, 1, 1, 1)
self.insertPlaceholder = QPushButton(Dialog)
self.insertPlaceholder.setObjectName(u"insertPlaceholder")
self.insertPlaceholder.setObjectName("insertPlaceholder")
self.insertPlaceholder.setFocusPolicy(Qt.NoFocus)
self.gridLayout.addWidget(self.insertPlaceholder, 1, 2, 1, 1)
self.verticalLayout.addLayout(self.gridLayout)
self.label_3 = QLabel(Dialog)
self.label_3.setObjectName(u"label_3")
self.label_3.setObjectName("label_3")
self.verticalLayout.addWidget(self.label_3)
self.subject = QLineEdit(Dialog)
self.subject.setObjectName(u"subject")
self.subject.setObjectName("subject")
self.verticalLayout.addWidget(self.subject)
self.templateEdit = QTextEdit(Dialog)
self.templateEdit.setObjectName(u"templateEdit")
self.templateEdit.setObjectName("templateEdit")
self.verticalLayout.addWidget(self.templateEdit)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.testTemplate = QPushButton(Dialog)
self.testTemplate.setObjectName(u"testTemplate")
self.testTemplate.setObjectName("testTemplate")
self.horizontalLayout_3.addWidget(self.testTemplate)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalSpacer_2 = QSpacerItem(
40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
)
self.horizontalLayout_3.addItem(self.horizontalSpacer_2)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.verticalLayout_2.addLayout(self.verticalLayout)
self.buttonBox = QDialogButtonBox(Dialog)
self.buttonBox.setObjectName(u"buttonBox")
self.buttonBox.setObjectName("buttonBox")
self.buttonBox.setOrientation(Qt.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel|QDialogButtonBox.Discard|QDialogButtonBox.Save)
self.buttonBox.setStandardButtons(
QDialogButtonBox.Cancel | QDialogButtonBox.Discard | QDialogButtonBox.Save
)
self.verticalLayout_2.addWidget(self.buttonBox)
@@ -113,21 +126,40 @@ class Ui_Dialog(object):
self.retranslateUi(Dialog)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
self.label.setText(QCoreApplication.translate("Dialog", u"Platzhalter", None))
self.placeholder_list.setItemText(0, QCoreApplication.translate("Dialog", u"\u00abAnrede\u00bb", None))
self.placeholder_list.setItemText(1, QCoreApplication.translate("Dialog", u"\u00abApparatsName\u00bb", None))
self.placeholder_list.setItemText(2, QCoreApplication.translate("Dialog", u"\u00abApparatsFach\u00bb", None))
self.placeholder_list.setItemText(3, QCoreApplication.translate("Dialog", u"\u00abApparatsNummer\u00bb", None))
self.placeholder_list.setItemText(4, QCoreApplication.translate("Dialog", u"\u00abDozentName\u00bb", None))
self.placeholder_list.setItemText(5, QCoreApplication.translate("Dialog", u"\u00abSignatur\u00bb", None))
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
self.label.setText(QCoreApplication.translate("Dialog", "Platzhalter", None))
self.placeholder_list.setItemText(
0, QCoreApplication.translate("Dialog", "\u00abAnrede\u00bb", None)
)
self.placeholder_list.setItemText(
1, QCoreApplication.translate("Dialog", "\u00abApparatsName\u00bb", None)
)
self.placeholder_list.setItemText(
2, QCoreApplication.translate("Dialog", "\u00abApparatsFach\u00bb", None)
)
self.placeholder_list.setItemText(
3, QCoreApplication.translate("Dialog", "\u00abApparatsNummer\u00bb", None)
)
self.placeholder_list.setItemText(
4, QCoreApplication.translate("Dialog", "\u00abDozentName\u00bb", None)
)
self.placeholder_list.setItemText(
5, QCoreApplication.translate("Dialog", "\u00abSignatur\u00bb", None)
)
self.label_2.setText(QCoreApplication.translate("Dialog", "Beschreibung", None))
self.insertPlaceholder.setText(
QCoreApplication.translate(
"Dialog", "An aktiver Position einf\u00fcgen", None
)
)
self.label_3.setText(QCoreApplication.translate("Dialog", "Betreff", None))
self.testTemplate.setText(
QCoreApplication.translate("Dialog", "Template testen", None)
)
self.label_2.setText(QCoreApplication.translate("Dialog", u"Beschreibung", None))
self.insertPlaceholder.setText(QCoreApplication.translate("Dialog", u"An aktiver Position einf\u00fcgen", None))
self.label_3.setText(QCoreApplication.translate("Dialog", u"Betreff", None))
self.testTemplate.setText(QCoreApplication.translate("Dialog", u"Template testen", None))
# retranslateUi

View File

@@ -8,19 +8,27 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject)
from PySide6.QtWidgets import (QHBoxLayout, QPushButton, QSizePolicy, QSpacerItem, QTableWidget,
QTableWidgetItem, QVBoxLayout)
from PySide6.QtCore import QCoreApplication, QMetaObject
from PySide6.QtWidgets import (
QHBoxLayout,
QPushButton,
QSizePolicy,
QSpacerItem,
QTableWidget,
QTableWidgetItem,
QVBoxLayout,
)
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(808, 629)
self.verticalLayout = QVBoxLayout(Dialog)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setObjectName("verticalLayout")
self.tableWidget = QTableWidget(Dialog)
if (self.tableWidget.columnCount() < 8):
if self.tableWidget.columnCount() < 8:
self.tableWidget.setColumnCount(8)
__qtablewidgetitem = QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(0, __qtablewidgetitem)
@@ -38,48 +46,61 @@ class Ui_Dialog(object):
self.tableWidget.setHorizontalHeaderItem(6, __qtablewidgetitem6)
__qtablewidgetitem7 = QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(7, __qtablewidgetitem7)
self.tableWidget.setObjectName(u"tableWidget")
self.tableWidget.setObjectName("tableWidget")
self.verticalLayout.addWidget(self.tableWidget)
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout.setObjectName("horizontalLayout")
self.horizontalSpacer = QSpacerItem(
40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
)
self.horizontalLayout.addItem(self.horizontalSpacer)
self.pushButton = QPushButton(Dialog)
self.pushButton.setObjectName(u"pushButton")
self.pushButton.setObjectName("pushButton")
self.horizontalLayout.addWidget(self.pushButton)
self.verticalLayout.addLayout(self.horizontalLayout)
self.retranslateUi(Dialog)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
___qtablewidgetitem = self.tableWidget.horizontalHeaderItem(0)
___qtablewidgetitem.setText(QCoreApplication.translate("Dialog", u"Bestellen", None))
___qtablewidgetitem.setText(
QCoreApplication.translate("Dialog", "Bestellen", None)
)
___qtablewidgetitem1 = self.tableWidget.horizontalHeaderItem(1)
___qtablewidgetitem1.setText(QCoreApplication.translate("Dialog", u"Signatur", None))
___qtablewidgetitem1.setText(
QCoreApplication.translate("Dialog", "Signatur", None)
)
___qtablewidgetitem2 = self.tableWidget.horizontalHeaderItem(2)
___qtablewidgetitem2.setText(QCoreApplication.translate("Dialog", u"Titel", None))
___qtablewidgetitem2.setText(
QCoreApplication.translate("Dialog", "Titel", None)
)
___qtablewidgetitem3 = self.tableWidget.horizontalHeaderItem(3)
___qtablewidgetitem3.setText(QCoreApplication.translate("Dialog", u"ISBN", None))
___qtablewidgetitem3.setText(QCoreApplication.translate("Dialog", "ISBN", None))
___qtablewidgetitem4 = self.tableWidget.horizontalHeaderItem(4)
___qtablewidgetitem4.setText(QCoreApplication.translate("Dialog", u"Autor", None))
___qtablewidgetitem4.setText(
QCoreApplication.translate("Dialog", "Autor", None)
)
___qtablewidgetitem5 = self.tableWidget.horizontalHeaderItem(5)
___qtablewidgetitem5.setText(QCoreApplication.translate("Dialog", u"Auflage", None))
___qtablewidgetitem5.setText(
QCoreApplication.translate("Dialog", "Auflage", None)
)
___qtablewidgetitem6 = self.tableWidget.horizontalHeaderItem(6)
___qtablewidgetitem6.setText(QCoreApplication.translate("Dialog", u"Standort", None))
___qtablewidgetitem6.setText(
QCoreApplication.translate("Dialog", "Standort", None)
)
___qtablewidgetitem7 = self.tableWidget.horizontalHeaderItem(7)
___qtablewidgetitem7.setText(QCoreApplication.translate("Dialog", u"Link", None))
self.pushButton.setText(QCoreApplication.translate("Dialog", u"Bestellen", None))
# retranslateUi
___qtablewidgetitem7.setText(QCoreApplication.translate("Dialog", "Link", None))
self.pushButton.setText(QCoreApplication.translate("Dialog", "Bestellen", None))
# retranslateUi

View File

@@ -38,7 +38,12 @@ class Ui_Form(object):
self.label_2 = QtWidgets.QLabel(parent=self.horizontalLayoutWidget)
self.label_2.setObjectName("label_2")
self.horizontalLayout.addWidget(self.label_2)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout.addItem(spacerItem)
self.frame_2 = QtWidgets.QFrame(parent=Form)
self.frame_2.setGeometry(QtCore.QRect(10, 80, 381, 201))
@@ -54,7 +59,9 @@ class Ui_Form(object):
self.listWidget = QtWidgets.QListWidget(parent=self.horizontalLayoutWidget_2)
self.listWidget.setObjectName("listWidget")
self.horizontalLayout_2.addWidget(self.listWidget)
self.listWidget_done = QtWidgets.QListWidget(parent=self.horizontalLayoutWidget_2)
self.listWidget_done = QtWidgets.QListWidget(
parent=self.horizontalLayoutWidget_2
)
self.listWidget_done.setObjectName("listWidget_done")
self.horizontalLayout_2.addWidget(self.listWidget_done)
self.progressBar = QtWidgets.QProgressBar(parent=Form)
@@ -63,7 +70,10 @@ class Ui_Form(object):
self.progressBar.setObjectName("progressBar")
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Form)
self.buttonBox.setGeometry(QtCore.QRect(230, 290, 156, 23))
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.toolButton = QtWidgets.QToolButton(parent=Form)
self.toolButton.setGeometry(QtCore.QRect(20, 290, 25, 19))

View File

@@ -16,7 +16,10 @@ class Ui_Erinnerung(object):
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Erinnerung)
self.buttonBox.setGeometry(QtCore.QRect(190, 270, 161, 32))
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.message_box = QtWidgets.QTextEdit(parent=Erinnerung)
self.message_box.setGeometry(QtCore.QRect(10, 60, 341, 201))
@@ -32,8 +35,8 @@ class Ui_Erinnerung(object):
self.dateEdit.setObjectName("dateEdit")
self.retranslateUi(Erinnerung)
self.buttonBox.accepted.connect(Erinnerung.accept) # type: ignore
self.buttonBox.rejected.connect(Erinnerung.reject) # type: ignore
self.buttonBox.accepted.connect(Erinnerung.accept) # type: ignore
self.buttonBox.rejected.connect(Erinnerung.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Erinnerung)
def retranslateUi(self, Erinnerung):

View File

@@ -14,7 +14,10 @@ class Ui_Dialog(object):
Dialog.setObjectName("Dialog")
Dialog.setWindowModality(QtCore.Qt.WindowModality.NonModal)
Dialog.resize(651, 679)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
@@ -22,7 +25,10 @@ class Ui_Dialog(object):
self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
self.verticalLayout.setObjectName("verticalLayout")
self.toolBox = QtWidgets.QToolBox(parent=Dialog)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.toolBox.sizePolicy().hasHeightForWidth())
@@ -31,7 +37,10 @@ class Ui_Dialog(object):
self.toolBox.setObjectName("toolBox")
self.page_1 = QtWidgets.QWidget()
self.page_1.setGeometry(QtCore.QRect(0, 0, 633, 511))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.page_1.sizePolicy().hasHeightForWidth())
@@ -64,7 +73,12 @@ class Ui_Dialog(object):
self.save_path = QtWidgets.QLineEdit(parent=self.page_1)
self.save_path.setObjectName("save_path")
self.gridLayout_3.addWidget(self.save_path, 2, 1, 1, 1)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
spacerItem = QtWidgets.QSpacerItem(
20,
40,
QtWidgets.QSizePolicy.Policy.Minimum,
QtWidgets.QSizePolicy.Policy.Expanding,
)
self.gridLayout_3.addItem(spacerItem, 3, 1, 1, 1)
self.toolBox.addItem(self.page_1, "")
self.page_2 = QtWidgets.QWidget()
@@ -85,7 +99,10 @@ class Ui_Dialog(object):
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1)
self.zotero_api_key = QtWidgets.QLineEdit(parent=self.page_2)
self.zotero_api_key.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhHiddenText|QtCore.Qt.InputMethodHint.ImhSensitiveData)
self.zotero_api_key.setInputMethodHints(
QtCore.Qt.InputMethodHint.ImhHiddenText
| QtCore.Qt.InputMethodHint.ImhSensitiveData
)
self.zotero_api_key.setObjectName("zotero_api_key")
self.gridLayout.addWidget(self.zotero_api_key, 0, 2, 1, 1)
self.label_2 = QtWidgets.QLabel(parent=self.page_2)
@@ -95,7 +112,12 @@ class Ui_Dialog(object):
self.toggle_api_visibility.setText("")
self.toggle_api_visibility.setObjectName("toggle_api_visibility")
self.gridLayout.addWidget(self.toggle_api_visibility, 0, 3, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
spacerItem1 = QtWidgets.QSpacerItem(
20,
40,
QtWidgets.QSizePolicy.Policy.Minimum,
QtWidgets.QSizePolicy.Policy.Expanding,
)
self.gridLayout.addItem(spacerItem1, 3, 2, 1, 1)
self.toolBox.addItem(self.page_2, "")
self.page_3 = QtWidgets.QWidget()
@@ -111,7 +133,9 @@ class Ui_Dialog(object):
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.gridLayout_2 = QtWidgets.QGridLayout()
self.gridLayout_2.setObjectName("gridLayout_2")
self.use_username_smtp_login = QtWidgets.QCheckBox(parent=self.email_settingsPage1_2)
self.use_username_smtp_login = QtWidgets.QCheckBox(
parent=self.email_settingsPage1_2
)
self.use_username_smtp_login.setTristate(False)
self.use_username_smtp_login.setObjectName("use_username_smtp_login")
self.gridLayout_2.addWidget(self.use_username_smtp_login, 4, 1, 1, 1)
@@ -119,7 +143,10 @@ class Ui_Dialog(object):
self.label_6.setObjectName("label_6")
self.gridLayout_2.addWidget(self.label_6, 1, 0, 1, 1)
self.smtp_port = QtWidgets.QLineEdit(parent=self.email_settingsPage1_2)
self.smtp_port.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhDigitsOnly|QtCore.Qt.InputMethodHint.ImhPreferNumbers)
self.smtp_port.setInputMethodHints(
QtCore.Qt.InputMethodHint.ImhDigitsOnly
| QtCore.Qt.InputMethodHint.ImhPreferNumbers
)
self.smtp_port.setClearButtonEnabled(True)
self.smtp_port.setObjectName("smtp_port")
self.gridLayout_2.addWidget(self.smtp_port, 1, 1, 1, 1)
@@ -127,7 +154,9 @@ class Ui_Dialog(object):
self.label_7.setObjectName("label_7")
self.gridLayout_2.addWidget(self.label_7, 2, 0, 1, 1)
self.sender_email = QtWidgets.QLineEdit(parent=self.email_settingsPage1_2)
self.sender_email.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhEmailCharactersOnly)
self.sender_email.setInputMethodHints(
QtCore.Qt.InputMethodHint.ImhEmailCharactersOnly
)
self.sender_email.setClearButtonEnabled(True)
self.sender_email.setObjectName("sender_email")
self.gridLayout_2.addWidget(self.sender_email, 2, 1, 1, 1)
@@ -140,7 +169,10 @@ class Ui_Dialog(object):
self.label_9.setObjectName("label_9")
self.gridLayout_2.addWidget(self.label_9, 7, 0, 1, 1)
self.password = QtWidgets.QLineEdit(parent=self.email_settingsPage1_2)
self.password.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhHiddenText|QtCore.Qt.InputMethodHint.ImhSensitiveData)
self.password.setInputMethodHints(
QtCore.Qt.InputMethodHint.ImhHiddenText
| QtCore.Qt.InputMethodHint.ImhSensitiveData
)
self.password.setClearButtonEnabled(True)
self.password.setObjectName("password")
self.gridLayout_2.addWidget(self.password, 5, 1, 1, 1)
@@ -178,7 +210,12 @@ class Ui_Dialog(object):
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem2 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_3.addItem(spacerItem2)
self.bold = QtWidgets.QPushButton(parent=self.email_settingsPage2_2)
self.bold.setCheckable(True)
@@ -192,7 +229,12 @@ class Ui_Dialog(object):
self.underscore.setCheckable(True)
self.underscore.setObjectName("underscore")
self.horizontalLayout_3.addWidget(self.underscore)
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem3 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_3.addItem(spacerItem3)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.horizontalLayout = QtWidgets.QHBoxLayout()
@@ -218,7 +260,12 @@ class Ui_Dialog(object):
self.font_size.addItem("")
self.font_size.addItem("")
self.horizontalLayout.addWidget(self.font_size)
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem4 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout.addItem(spacerItem4)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.verticalLayout_3.addLayout(self.verticalLayout_2)
@@ -275,7 +322,10 @@ class Ui_Dialog(object):
self.verticalLayout.addWidget(self.toolBox)
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
self.label_5.setBuddy(self.db_name)
@@ -285,37 +335,62 @@ class Ui_Dialog(object):
self.retranslateUi(Dialog)
self.toolBox.setCurrentIndex(2)
self.email_settings.setCurrentIndex(0)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
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.db_name.setText(_translate("Dialog", "sap.db"))
self.label_5.setToolTip(_translate("Dialog", "<html><head/><body><p>Name der Datenbank, welche verwendet werden soll. <span style=\" font-weight:600;\">Muss</span> auf .db enden</p></body></html>"))
self.label_5.setToolTip(
_translate(
"Dialog",
'<html><head/><body><p>Name der Datenbank, welche verwendet werden soll. <span style=" font-weight:600;">Muss</span> auf .db enden</p></body></html>',
)
)
self.label_5.setText(_translate("Dialog", "Datenbankname"))
self.label_12.setToolTip(_translate("Dialog", "Pfad, an dem heruntergeladene Dateien gespeichert werden sollen"))
self.label_12.setToolTip(
_translate(
"Dialog",
"Pfad, an dem heruntergeladene Dateien gespeichert werden sollen",
)
)
self.label_12.setText(_translate("Dialog", "Temporäre Dateien"))
self.label_11.setText(_translate("Dialog", "Datenbankpfad"))
self.tb_set_save_path.setText(_translate("Dialog", "..."))
self.tb_select_db.setText(_translate("Dialog", "..."))
self.toolBox.setItemText(self.toolBox.indexOf(self.page_1), _translate("Dialog", "Datenbank"))
self.toolBox.setItemText(
self.toolBox.indexOf(self.page_1), _translate("Dialog", "Datenbank")
)
self.label_4.setText(_translate("Dialog", "Bibliothekstyp"))
self.label_3.setText(_translate("Dialog", "Bibliotheks-ID"))
self.label_2.setText(_translate("Dialog", "API Key"))
self.toolBox.setItemText(self.toolBox.indexOf(self.page_2), _translate("Dialog", "Zotero"))
self.use_username_smtp_login.setStatusTip(_translate("Dialog", "Anklicken, wenn Nutzername benötigt wird, um sich beim Server anzumelden"))
self.use_username_smtp_login.setText(_translate("Dialog", "Nutzername zum\n"
" Anmelden verwenden"))
self.toolBox.setItemText(
self.toolBox.indexOf(self.page_2), _translate("Dialog", "Zotero")
)
self.use_username_smtp_login.setStatusTip(
_translate(
"Dialog",
"Anklicken, wenn Nutzername benötigt wird, um sich beim Server anzumelden",
)
)
self.use_username_smtp_login.setText(
_translate("Dialog", "Nutzername zum\n Anmelden verwenden")
)
self.label_6.setText(_translate("Dialog", "Port"))
self.label_7.setText(_translate("Dialog", "Sender-eMail"))
self.mail_username.setStatusTip(_translate("Dialog", "Kürzel, von der Hochschule vergeben, bsp: Aky547"))
self.mail_username.setStatusTip(
_translate("Dialog", "Kürzel, von der Hochschule vergeben, bsp: Aky547")
)
self.label.setText(_translate("Dialog", "SMTP-Server"))
self.label_10.setText(_translate("Dialog", "Passwort"))
self.label_8.setText(_translate("Dialog", "Nutzername"))
self.label_13.setText(_translate("Dialog", "Printmail"))
self.email_settings.setTabText(self.email_settings.indexOf(self.email_settingsPage1_2), _translate("Dialog", "Allgemeines"))
self.email_settings.setTabText(
self.email_settings.indexOf(self.email_settingsPage1_2),
_translate("Dialog", "Allgemeines"),
)
self.bold.setText(_translate("Dialog", "Fett"))
self.italic.setText(_translate("Dialog", "Kursiv"))
self.underscore.setText(_translate("Dialog", "Unterstrichen"))
@@ -335,7 +410,14 @@ class Ui_Dialog(object):
self.font_size.setItemText(13, _translate("Dialog", "48"))
self.font_size.setItemText(14, _translate("Dialog", "72"))
self.debug.setText(_translate("Dialog", "Debug"))
self.email_settings.setTabText(self.email_settings.indexOf(self.email_settingsPage2_2), _translate("Dialog", "Signatur"))
self.toolBox.setItemText(self.toolBox.indexOf(self.page_3), _translate("Dialog", "e-Mail"))
self.email_settings.setTabText(
self.email_settings.indexOf(self.email_settingsPage2_2),
_translate("Dialog", "Signatur"),
)
self.toolBox.setItemText(
self.toolBox.indexOf(self.page_3), _translate("Dialog", "e-Mail")
)
self.groupBox.setTitle(_translate("Dialog", "Farben"))
self.toolBox.setItemText(self.toolBox.indexOf(self.page_4), _translate("Dialog", "Icons"))
self.toolBox.setItemText(
self.toolBox.indexOf(self.page_4), _translate("Dialog", "Icons")
)

View File

@@ -187,7 +187,7 @@ class ElsaAddEntry(QtWidgets.QDialog, Ui_Dialog):
# data = data[0]
bib = BibTextTransformer()
bib.get_data(data)
data:BookData = bib.return_data()
data: BookData = bib.return_data()
self.setdata(data, pages)
def setdata(self, data: BookData, pages=None):

View File

@@ -18,7 +18,10 @@ class Ui_Frame(object):
self.label.setObjectName("label")
self.buttonBox = QtWidgets.QDialogButtonBox(Frame)
self.buttonBox.setGeometry(QtCore.QRect(90, 90, 156, 23))
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.sem_winter = QtWidgets.QRadioButton(Frame)
self.sem_winter.setGeometry(QtCore.QRect(60, 40, 82, 17))
@@ -36,13 +39,16 @@ class Ui_Frame(object):
def retranslateUi(self, Frame):
_translate = QtCore.QCoreApplication.translate
Frame.setWindowTitle(_translate("Frame", "Frame"))
self.label.setText(_translate("Frame", "Bis wann soll der Apparat verlängert werden?"))
self.label.setText(
_translate("Frame", "Bis wann soll der Apparat verlängert werden?")
)
self.sem_winter.setText(_translate("Frame", "Winter"))
self.sem_sommer.setText(_translate("Frame", "Sommer"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Frame = QtWidgets.QFrame()
ui = Ui_Frame()

View File

@@ -1,10 +1,8 @@
import hashlib
import sys
from src.shared.logging import log
from PySide6 import QtCore, QtWidgets
from src import LOG_DIR
from src.database import Database
from src.utils.icon import Icon
@@ -12,6 +10,7 @@ from .dialog_sources.login_ui import Ui_Dialog
# use centralized logging from src.shared.logging
class LoginDialog(Ui_Dialog):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")

View File

@@ -1,7 +1,5 @@
import os
import re
import sys
from pathlib import Path
from src.shared.logging import log, get_bloat_logger, preview
from PySide6 import QtCore, QtWidgets

View File

@@ -16,7 +16,10 @@ class Ui_eMailPreview(object):
self.buttonBox = QtWidgets.QDialogButtonBox(parent=eMailPreview)
self.buttonBox.setGeometry(QtCore.QRect(310, 630, 341, 32))
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.gridLayoutWidget = QtWidgets.QWidget(parent=eMailPreview)
self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 10, 661, 621))
@@ -31,7 +34,11 @@ class Ui_eMailPreview(object):
self.prof_name.setObjectName("prof_name")
self.gridLayout.addWidget(self.prof_name, 2, 2, 1, 1)
self.label_3 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
self.label_3.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignTop)
self.label_3.setAlignment(
QtCore.Qt.AlignmentFlag.AlignLeading
| QtCore.Qt.AlignmentFlag.AlignLeft
| QtCore.Qt.AlignmentFlag.AlignTop
)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
self.mail_name = QtWidgets.QLineEdit(parent=self.gridLayoutWidget)
@@ -66,7 +73,12 @@ class Ui_eMailPreview(object):
self.gender_non = QtWidgets.QRadioButton(parent=self.gridLayoutWidget)
self.gender_non.setObjectName("gender_non")
self.horizontalLayout_3.addWidget(self.gender_non)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_3.addItem(spacerItem)
self.gridLayout.addLayout(self.horizontalLayout_3, 4, 2, 1, 1)
self.label_6 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
@@ -74,8 +86,8 @@ class Ui_eMailPreview(object):
self.gridLayout.addWidget(self.label_6, 4, 0, 1, 1)
self.retranslateUi(eMailPreview)
self.buttonBox.accepted.connect(eMailPreview.accept) # type: ignore
self.buttonBox.rejected.connect(eMailPreview.reject) # type: ignore
self.buttonBox.accepted.connect(eMailPreview.accept) # type: ignore
self.buttonBox.rejected.connect(eMailPreview.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(eMailPreview)
def retranslateUi(self, eMailPreview):

View File

@@ -1,9 +1,7 @@
import sys
from src.shared.logging import log
from PySide6 import QtWidgets
from src import LOG_DIR
from src.background import AutoAdder
from .dialog_sources.parsed_titles_ui import Ui_Form

View File

@@ -38,7 +38,12 @@ class Ui_Form(object):
self.label_2 = QtWidgets.QLabel(parent=self.horizontalLayoutWidget)
self.label_2.setObjectName("label_2")
self.horizontalLayout.addWidget(self.label_2)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout.addItem(spacerItem)
self.frame_2 = QtWidgets.QFrame(parent=Form)
self.frame_2.setGeometry(QtCore.QRect(10, 80, 381, 201))
@@ -54,7 +59,9 @@ class Ui_Form(object):
self.listWidget = QtWidgets.QListWidget(parent=self.horizontalLayoutWidget_2)
self.listWidget.setObjectName("listWidget")
self.horizontalLayout_2.addWidget(self.listWidget)
self.listWidget_done = QtWidgets.QListWidget(parent=self.horizontalLayoutWidget_2)
self.listWidget_done = QtWidgets.QListWidget(
parent=self.horizontalLayoutWidget_2
)
self.listWidget_done.setObjectName("listWidget_done")
self.horizontalLayout_2.addWidget(self.listWidget_done)
self.progressBar = QtWidgets.QProgressBar(parent=Form)
@@ -63,7 +70,10 @@ class Ui_Form(object):
self.progressBar.setObjectName("progressBar")
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Form)
self.buttonBox.setGeometry(QtCore.QRect(230, 290, 156, 23))
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
self.buttonBox.setStandardButtons(
QtWidgets.QDialogButtonBox.StandardButton.Cancel
| QtWidgets.QDialogButtonBox.StandardButton.Ok
)
self.buttonBox.setObjectName("buttonBox")
self.toolButton = QtWidgets.QToolButton(parent=Form)
self.toolButton.setGeometry(QtCore.QRect(20, 290, 25, 19))

View File

@@ -34,7 +34,7 @@ class CheckThread(QtCore.QThread):
swb_client = SWB()
for i in tqdm_object:
book: BookData = self.items[i]
author = (
(
book.author.split(";")[0].replace(" ", "")
if ";" in book.author
else book.author.replace(" ", "")
@@ -90,4 +90,3 @@ class ProgressDialog(QDialog):
def start(self):
# Start logic is managed externally; keep method for UI wiring
pass

View File

@@ -3,7 +3,7 @@ import sys
from src.shared.logging import log, get_bloat_logger, preview
from PySide6 import QtCore, QtGui, QtWidgets
from src import LOG_DIR, settings
from src import settings
from src.ui.widgets.iconLine import IconWidget
from src.utils.icon import Icon
@@ -188,7 +188,9 @@ class Settings(QtWidgets.QDialog, _settings):
def debug_mode(self):
bloat = get_bloat_logger()
bloat.debug("Signature HTML (preview): {}", preview(self.editSignature.toHtml(), 2000))
bloat.debug(
"Signature HTML (preview): {}", preview(self.editSignature.toHtml(), 2000)
)
def return_data(self):
port = self.smtp_port.text()
@@ -253,7 +255,6 @@ class Settings(QtWidgets.QDialog, _settings):
def launch_settings():
import sys
app = QtWidgets.QApplication(sys.argv)
window = Settings()

View File

@@ -1 +1,5 @@
from .ValidatorButton import ValidatorButton
__all__ = [
"ValidatorButton",
]

File diff suppressed because it is too large Load Diff

View File

@@ -36,10 +36,9 @@ from src.parsers import (
pdf_to_semap,
word_to_semap,
)
from src.shared.logging import log, get_bloat_logger, preview
from src.shared.logging import get_bloat_logger, log, preview
# bloat logger for large/raw previews
bloat = get_bloat_logger()
from src.ui import Ui_Semesterapparat
from src.ui.dialogs import (
About,
@@ -74,6 +73,8 @@ from src.utils.files import delete_temp_contents as tempdelete
from src.utils.files import recreateFile
from src.utils.icon import Icon
bloat = get_bloat_logger()
log.success("UI started")
valid_input = (0, 0, 0, 0, 0, 0)
@@ -1124,8 +1125,8 @@ class Ui(QtWidgets.QMainWindow, Ui_Semesterapparat):
)
def add_media_from_file(self):
app_id = self.db.getId(self.app_name.text())
prof_id = self.db.getProfId(self.profdata)
self.db.getId(self.app_name.text())
self.db.getProfId(self.profdata)
def __open_dialog(signatures: list[str]):
dialog = QtWidgets.QDialog()
@@ -1151,25 +1152,25 @@ class Ui(QtWidgets.QMainWindow, Ui_Semesterapparat):
# if file is selected, check for books in the file
if self.document_list.currentRow() != -1:
# #log.debug("File selected")
file = self.document_list.item(
self.document_list.item(
self.document_list.currentRow(),
3,
).text()
file_type = self.document_list.item(
self.document_list.item(
self.document_list.currentRow(),
1,
).text()
file_location = self.document_list.item(
self.document_list.item(
self.document_list.currentRow(),
3,
).text()
file_name = self.document_list.item(
self.document_list.item(
self.document_list.currentRow(),
0,
).text()
data = self.extract_document_data()
self.extract_document_data()
# if file_location == "Database":
# # create a temporaty file to use, delete it after use
# temp_file = tempfile.NamedTemporaryFile(

View File

@@ -13,7 +13,7 @@ __all__ = [
"NewEditionChecker",
"NewEditionCheckSelector",
"UpdateSignatures",
"UpdaterThread"
"UpdaterThread",
]
from .admin_create_user import UserCreate
@@ -29,4 +29,3 @@ from .MessageCalendar import MessageCalendar
from .new_edition_check import NewEditionChecker, NewEditionCheckSelector
from .searchPage import SearchStatisticPage
from .signature_update import UpdateSignatures, UpdaterThread

View File

@@ -1,18 +1,14 @@
import sys
from src.shared.logging import log, get_bloat_logger, preview
# bloat logger for large object previews
bloat = get_bloat_logger()
from PySide6 import QtWidgets
from src import LOG_DIR
from src.database import Database
from src.core.models import Prof
from src.database import Database
from src.shared.logging import get_bloat_logger, preview
from .widget_sources.admin_edit_prof_ui import Ui_Dialog #
from .widget_sources.admin_edit_prof_ui import Ui_Dialog
# use centralized logging from src.shared.logging
# bloat logger for large object previews
bloat = get_bloat_logger()
class EditProf(QtWidgets.QDialog, Ui_Dialog):
@@ -23,7 +19,7 @@ class EditProf(QtWidgets.QDialog, Ui_Dialog):
self.db = Database()
self.edit_faculty_member_select_member.currentTextChanged.connect(
self.edit_faculty_member_set_data
self.edit_faculty_member_set_data,
)
self.update_faculty_member.clicked.connect(self.edit_faculty_member_action)
self.gather_data()
@@ -32,8 +28,8 @@ class EditProf(QtWidgets.QDialog, Ui_Dialog):
self.add_faculty_member_data()
apparats = self.db.getApparatsByProf(
self.db.getProfId(
Prof(fullname=self.edit_faculty_member_select_member.currentText())
)
Prof(fullname=self.edit_faculty_member_select_member.currentText()),
),
)
if len(apparats) == 0:
self.delete_faculty_member.setEnabled(True)
@@ -41,7 +37,7 @@ class EditProf(QtWidgets.QDialog, Ui_Dialog):
if apparat.deleted == 0:
self.delete_faculty_member.setEnabled(False)
self.delete_faculty_member.setToolTip(
"Professoren mit Apparaten können nicht gelöscht werden"
"Professoren mit Apparaten können nicht gelöscht werden",
)
break
@@ -92,7 +88,7 @@ class EditProf(QtWidgets.QDialog, Ui_Dialog):
if self.edit_faculty_member_select_member.currentText() == "":
return
olddata = self.db.getProfByName(
self.edit_faculty_member_select_member.currentText()
self.edit_faculty_member_select_member.currentText(),
)
bloat.debug("Old prof data (preview): {}", preview(olddata, 500))
data = olddata

View File

@@ -1,9 +1,7 @@
from PySide6 import QtCore, QtWidgets
from src.utils.icon import Icon
from src.database import Database
from .widget_sources. import Ui_Form
from src.utils.icon import Icon
class AdminQueryWidget(QtWidgets.QWidget, Ui_Form):

View File

@@ -7,10 +7,9 @@ from PySide6.QtGui import QRegularExpressionValidator
from src.core.models import Prof, Semester
from src.database import Database
from src.parsers import elsa_word_to_csv
from src.shared.logging import log, get_bloat_logger, preview
from src.shared.logging import get_bloat_logger, log, preview
# bloat logger for large/raw payloads
bloat = get_bloat_logger()
from src.ui.dialogs import ElsaAddEntry, popus_confirm
from src.ui.widgets.filepicker import FilePicker
from src.ui.widgets.graph import DataQtGraph
@@ -19,6 +18,8 @@ from src.utils.icon import Icon
from .widget_sources.elsa_maindialog_ui import Ui_Dialog
bloat = get_bloat_logger()
class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
def __init__(self):
@@ -234,7 +235,11 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
fullname=f"{prof.split(', ')[0]} {prof.split(', ')[1]}",
)
prof_id = self.db.getProfId(profdata)
bloat.debug("ProfData (preview): {} id: {}", preview(profdata, 500), preview(prof_id, 50))
bloat.debug(
"ProfData (preview): {} id: {}",
preview(profdata, 500),
preview(prof_id, 50),
)
if prof_id is None:
self.db.createProf(profdata)

View File

@@ -8,7 +8,9 @@ from loguru import logger as log
logger = log
logger.remove()
if Path("logs").exists():
logger.add("logs/application.log", rotation="1 week", retention="1 month", enqueue=True)
logger.add(
"logs/application.log", rotation="1 week", retention="1 month", enqueue=True
)
# logger.add(sys.stderr, format="{time} {level} {message}", level="INFO")

View File

@@ -254,7 +254,10 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
selected_apparats.append(data)
# delete all selected apparats
bloat = get_bloat_logger()
bloat.debug("Selected apparats for deletion (preview): {}", preview(selected_apparats, 1000))
bloat.debug(
"Selected apparats for deletion (preview): {}",
preview(selected_apparats, 1000),
)
dialogs = []
for i in selected_apparats:
app_id = i["app_id"]
@@ -375,7 +378,11 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
"x": [i[0] for i in data],
"y": {"Erstellt": [i[1] for i in data], "Gelöscht": [i[2] for i in data]},
}
log.debug("Graph data sizes: x={}, y_keys={}", len(graph_data.get("x", [])), list(graph_data.get("y", {}).keys()))
log.debug(
"Graph data sizes: x={}, y_keys={}",
len(graph_data.get("x", [])),
list(graph_data.get("y", {}).keys()),
)
graph = DataQtGraph(
title="Erstellte und gelöschte Apparate",
data=graph_data,

View File

@@ -26,10 +26,14 @@ class Ui_Dialog(object):
self.faculty_member_old_telnr.setObjectName("faculty_member_old_telnr")
self.gridLayout_2.addWidget(self.faculty_member_old_telnr, 1, 1, 1, 1)
self.edit_faculty_member_title = QtWidgets.QLineEdit(parent=Dialog)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.edit_faculty_member_title.sizePolicy().hasHeightForWidth())
sizePolicy.setHeightForWidth(
self.edit_faculty_member_title.sizePolicy().hasHeightForWidth()
)
self.edit_faculty_member_title.setSizePolicy(sizePolicy)
self.edit_faculty_member_title.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.edit_faculty_member_title.setReadOnly(True)
@@ -42,7 +46,9 @@ class Ui_Dialog(object):
self.label_3.setObjectName("label_3")
self.gridLayout_2.addWidget(self.label_3, 1, 0, 1, 1)
self.edit_faculty_member_select_member = QtWidgets.QComboBox(parent=Dialog)
self.edit_faculty_member_select_member.setObjectName("edit_faculty_member_select_member")
self.edit_faculty_member_select_member.setObjectName(
"edit_faculty_member_select_member"
)
self.gridLayout_2.addWidget(self.edit_faculty_member_select_member, 0, 1, 1, 1)
self.faculty_member_oldmail = QtWidgets.QLineEdit(parent=Dialog)
self.faculty_member_oldmail.setReadOnly(True)
@@ -56,7 +62,12 @@ class Ui_Dialog(object):
self.delete_faculty_member.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.delete_faculty_member.setObjectName("delete_faculty_member")
self.horizontalLayout.addWidget(self.delete_faculty_member)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Fixed,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout.addItem(spacerItem)
self.update_faculty_member = QtWidgets.QPushButton(parent=Dialog)
self.update_faculty_member.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
@@ -80,10 +91,14 @@ class Ui_Dialog(object):
self.label_9.setObjectName("label_9")
self.gridLayout_3.addWidget(self.label_9, 4, 0, 1, 1)
self.edit_faculty_member_new_title = QtWidgets.QLineEdit(parent=Dialog)
self.edit_faculty_member_new_title.setObjectName("edit_faculty_member_new_title")
self.edit_faculty_member_new_title.setObjectName(
"edit_faculty_member_new_title"
)
self.gridLayout_3.addWidget(self.edit_faculty_member_new_title, 0, 1, 1, 1)
self.user_faculty_member_new_telnr = QtWidgets.QLineEdit(parent=Dialog)
self.user_faculty_member_new_telnr.setObjectName("user_faculty_member_new_telnr")
self.user_faculty_member_new_telnr.setObjectName(
"user_faculty_member_new_telnr"
)
self.gridLayout_3.addWidget(self.user_faculty_member_new_telnr, 3, 1, 1, 1)
self.label_8 = QtWidgets.QLabel(parent=Dialog)
self.label_8.setObjectName("label_8")
@@ -98,7 +113,9 @@ class Ui_Dialog(object):
self.user_faculty_member_new_name.setObjectName("user_faculty_member_new_name")
self.gridLayout_3.addWidget(self.user_faculty_member_new_name, 2, 1, 1, 1)
self.edit_faculty_member_new_surname = QtWidgets.QLineEdit(parent=Dialog)
self.edit_faculty_member_new_surname.setObjectName("edit_faculty_member_new_surname")
self.edit_faculty_member_new_surname.setObjectName(
"edit_faculty_member_new_surname"
)
self.gridLayout_3.addWidget(self.edit_faculty_member_new_surname, 1, 1, 1, 1)
self.label_5 = QtWidgets.QLabel(parent=Dialog)
self.label_5.setObjectName("label_5")
@@ -123,14 +140,28 @@ class Ui_Dialog(object):
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
Dialog.setTabOrder(self.edit_faculty_member_select_member, self.faculty_member_old_telnr)
Dialog.setTabOrder(
self.edit_faculty_member_select_member, self.faculty_member_old_telnr
)
Dialog.setTabOrder(self.faculty_member_old_telnr, self.faculty_member_oldmail)
Dialog.setTabOrder(self.faculty_member_oldmail, self.edit_faculty_member_new_title)
Dialog.setTabOrder(self.edit_faculty_member_new_title, self.edit_faculty_member_new_surname)
Dialog.setTabOrder(self.edit_faculty_member_new_surname, self.user_faculty_member_new_name)
Dialog.setTabOrder(self.user_faculty_member_new_name, self.user_faculty_member_new_telnr)
Dialog.setTabOrder(self.user_faculty_member_new_telnr, self.user_faculty_member_new_mail)
Dialog.setTabOrder(self.user_faculty_member_new_mail, self.edit_faculty_member_title)
Dialog.setTabOrder(
self.faculty_member_oldmail, self.edit_faculty_member_new_title
)
Dialog.setTabOrder(
self.edit_faculty_member_new_title, self.edit_faculty_member_new_surname
)
Dialog.setTabOrder(
self.edit_faculty_member_new_surname, self.user_faculty_member_new_name
)
Dialog.setTabOrder(
self.user_faculty_member_new_name, self.user_faculty_member_new_telnr
)
Dialog.setTabOrder(
self.user_faculty_member_new_telnr, self.user_faculty_member_new_mail
)
Dialog.setTabOrder(
self.user_faculty_member_new_mail, self.edit_faculty_member_title
)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate

View File

@@ -28,7 +28,9 @@ class Ui_Dialog(object):
self.user_edit_frame_new_password.setObjectName("user_edit_frame_new_password")
self.gridLayout.addWidget(self.user_edit_frame_new_password, 1, 1, 1, 1)
self.user_delete_frame_user_select = QtWidgets.QComboBox(parent=Dialog)
self.user_delete_frame_user_select.setObjectName("user_delete_frame_user_select")
self.user_delete_frame_user_select.setObjectName(
"user_delete_frame_user_select"
)
self.gridLayout.addWidget(self.user_delete_frame_user_select, 0, 1, 1, 1)
self.label_2 = QtWidgets.QLabel(parent=Dialog)
self.label_2.setObjectName("label_2")

View File

@@ -8,76 +8,100 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject)
from PySide6.QtWidgets import (QFormLayout, QLabel,
QProgressBar, QPushButton, QSizePolicy, QSpacerItem,
QSpinBox, QVBoxLayout)
from PySide6.QtCore import QCoreApplication, QMetaObject
from PySide6.QtWidgets import (
QFormLayout,
QLabel,
QProgressBar,
QPushButton,
QSizePolicy,
QSpacerItem,
QSpinBox,
QVBoxLayout,
)
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(735, 384)
self.verticalLayout = QVBoxLayout(Dialog)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setObjectName("verticalLayout")
self.formLayout = QFormLayout()
self.formLayout.setObjectName(u"formLayout")
self.formLayout.setObjectName("formLayout")
self.btn_update_signatures = QPushButton(Dialog)
self.btn_update_signatures.setObjectName(u"btn_update_signatures")
self.btn_update_signatures.setObjectName("btn_update_signatures")
self.formLayout.setWidget(0, QFormLayout.ItemRole.LabelRole, self.btn_update_signatures)
self.formLayout.setWidget(
0, QFormLayout.ItemRole.LabelRole, self.btn_update_signatures
)
self.btn_add_missing_data = QPushButton(Dialog)
self.btn_add_missing_data.setObjectName(u"btn_add_missing_data")
self.btn_add_missing_data.setObjectName("btn_add_missing_data")
self.formLayout.setWidget(0, QFormLayout.ItemRole.FieldRole, self.btn_add_missing_data)
self.formLayout.setWidget(
0, QFormLayout.ItemRole.FieldRole, self.btn_add_missing_data
)
self.formLayout_2 = QFormLayout()
self.formLayout_2.setObjectName(u"formLayout_2")
self.formLayout_2.setObjectName("formLayout_2")
self.label = QLabel(Dialog)
self.label.setObjectName(u"label")
self.label.setObjectName("label")
self.formLayout_2.setWidget(0, QFormLayout.ItemRole.LabelRole, self.label)
self.btn_add_medianr = QPushButton(Dialog)
self.btn_add_medianr.setObjectName(u"btn_add_medianr")
self.btn_add_medianr.setObjectName("btn_add_medianr")
self.formLayout_2.setWidget(1, QFormLayout.ItemRole.FieldRole, self.btn_add_medianr)
self.formLayout_2.setWidget(
1, QFormLayout.ItemRole.FieldRole, self.btn_add_medianr
)
self.spin_thread_count = QSpinBox(Dialog)
self.spin_thread_count.setObjectName(u"spin_thread_count")
self.spin_thread_count.setObjectName("spin_thread_count")
self.spin_thread_count.setMinimum(1)
self.spin_thread_count.setValue(6)
self.formLayout_2.setWidget(0, QFormLayout.ItemRole.FieldRole, self.spin_thread_count)
self.formLayout_2.setWidget(
0, QFormLayout.ItemRole.FieldRole, self.spin_thread_count
)
self.formLayout.setLayout(1, QFormLayout.ItemRole.FieldRole, self.formLayout_2)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalSpacer = QSpacerItem(
20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding
)
self.formLayout.setItem(2, QFormLayout.ItemRole.FieldRole, self.verticalSpacer)
self.verticalLayout.addLayout(self.formLayout)
self.progressBar = QProgressBar(Dialog)
self.progressBar.setObjectName(u"progressBar")
self.progressBar.setObjectName("progressBar")
self.progressBar.setValue(24)
self.verticalLayout.addWidget(self.progressBar)
self.retranslateUi(Dialog)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
self.btn_update_signatures.setText(QCoreApplication.translate("Dialog", u"Signaturen aktualisieren", None))
self.btn_add_missing_data.setText(QCoreApplication.translate("Dialog", u"Fehlende Daten hinzuf\u00fcgen", None))
self.label.setText(QCoreApplication.translate("Dialog", u"Anzahl Parraleler Aktionen", None))
self.btn_add_medianr.setText(QCoreApplication.translate("Dialog", u"Mediennummern erg\u00e4nzen", None))
# retranslateUi
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
self.btn_update_signatures.setText(
QCoreApplication.translate("Dialog", "Signaturen aktualisieren", None)
)
self.btn_add_missing_data.setText(
QCoreApplication.translate("Dialog", "Fehlende Daten hinzuf\u00fcgen", None)
)
self.label.setText(
QCoreApplication.translate("Dialog", "Anzahl Parraleler Aktionen", None)
)
self.btn_add_medianr.setText(
QCoreApplication.translate("Dialog", "Mediennummern erg\u00e4nzen", None)
)
# retranslateUi

View File

@@ -22,10 +22,14 @@ class Ui_Dialog(object):
self.horizontalLayout.addWidget(self.label_14)
self.line_app_info = QtWidgets.QLineEdit(parent=Dialog)
self.line_app_info.setEnabled(True)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.line_app_info.sizePolicy().hasHeightForWidth())
sizePolicy.setHeightForWidth(
self.line_app_info.sizePolicy().hasHeightForWidth()
)
self.line_app_info.setSizePolicy(sizePolicy)
self.line_app_info.setMaximumSize(QtCore.QSize(30, 16777215))
self.line_app_info.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
@@ -38,10 +42,14 @@ class Ui_Dialog(object):
self.btn_delete_message.setObjectName("btn_delete_message")
self.horizontalLayout.addWidget(self.btn_delete_message)
self.spin_select_message = QtWidgets.QSpinBox(parent=Dialog)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.spin_select_message.sizePolicy().hasHeightForWidth())
sizePolicy.setHeightForWidth(
self.spin_select_message.sizePolicy().hasHeightForWidth()
)
self.spin_select_message.setSizePolicy(sizePolicy)
self.spin_select_message.setMaximumSize(QtCore.QSize(500, 16777215))
self.spin_select_message.setMinimum(1)

View File

@@ -19,7 +19,12 @@ class Ui_Dialog(object):
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
spacerItem = QtWidgets.QSpacerItem(
20,
40,
QtWidgets.QSizePolicy.Policy.Minimum,
QtWidgets.QSizePolicy.Policy.Expanding,
)
self.verticalLayout_2.addItem(spacerItem)
self.elsa_add_new = QtWidgets.QPushButton(parent=Dialog)
self.elsa_add_new.setObjectName("elsa_add_new")
@@ -28,13 +33,22 @@ class Ui_Dialog(object):
self.elsa_cancel_create.setEnabled(False)
self.elsa_cancel_create.setObjectName("elsa_cancel_create")
self.verticalLayout_2.addWidget(self.elsa_cancel_create)
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
spacerItem1 = QtWidgets.QSpacerItem(
20,
40,
QtWidgets.QSizePolicy.Policy.Minimum,
QtWidgets.QSizePolicy.Policy.Expanding,
)
self.verticalLayout_2.addItem(spacerItem1)
self.horizontalLayout.addLayout(self.verticalLayout_2)
self.elsa_table = QtWidgets.QTableWidget(parent=Dialog)
self.elsa_table.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.elsa_table.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
self.elsa_table.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.elsa_table.setHorizontalScrollBarPolicy(
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
)
self.elsa_table.setEditTriggers(
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
)
self.elsa_table.setObjectName("elsa_table")
self.elsa_table.setColumnCount(3)
self.elsa_table.setRowCount(0)
@@ -70,7 +84,12 @@ class Ui_Dialog(object):
self.elsa_date = QtWidgets.QLineEdit(parent=self.create_frame_elsa)
self.elsa_date.setObjectName("elsa_date")
self.gridLayout_2.addWidget(self.elsa_date, 1, 1, 1, 1)
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
spacerItem2 = QtWidgets.QSpacerItem(
20,
40,
QtWidgets.QSizePolicy.Policy.Minimum,
QtWidgets.QSizePolicy.Policy.Expanding,
)
self.gridLayout_2.addItem(spacerItem2, 3, 0, 1, 1)
self.elsa_date_today = QtWidgets.QPushButton(parent=self.create_frame_elsa)
self.elsa_date_today.setText("")
@@ -107,50 +126,83 @@ class Ui_Dialog(object):
self.formLayout_2.setObjectName("formLayout_2")
self.label_4 = QtWidgets.QLabel(parent=self.newProf)
self.label_4.setObjectName("label_4")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_4)
self.formLayout_2.setWidget(
1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_4
)
self.label_5 = QtWidgets.QLabel(parent=self.newProf)
self.label_5.setObjectName("label_5")
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_5)
self.formLayout_2.setWidget(
2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_5
)
self.label_6 = QtWidgets.QLabel(parent=self.newProf)
self.label_6.setObjectName("label_6")
self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_6)
self.formLayout_2.setWidget(
3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_6
)
self.newProf_title = QtWidgets.QLineEdit(parent=self.newProf)
self.newProf_title.setObjectName("newProf_title")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.newProf_title)
self.formLayout_2.setWidget(
1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.newProf_title
)
self.newProf_mail = QtWidgets.QLineEdit(parent=self.newProf)
self.newProf_mail.setObjectName("newProf_mail")
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.newProf_mail)
self.formLayout_2.setWidget(
2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.newProf_mail
)
self.newProf_telnr = QtWidgets.QLineEdit(parent=self.newProf)
self.newProf_telnr.setObjectName("newProf_telnr")
self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.newProf_telnr)
self.formLayout_2.setWidget(
3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.newProf_telnr
)
self.label_7 = QtWidgets.QLabel(parent=self.newProf)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth())
self.label_7.setSizePolicy(sizePolicy)
self.label_7.setObjectName("label_7")
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.label_7)
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
self.formLayout_2.setItem(4, QtWidgets.QFormLayout.ItemRole.FieldRole, spacerItem3)
self.formLayout_2.setWidget(
0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.label_7
)
spacerItem3 = QtWidgets.QSpacerItem(
20,
40,
QtWidgets.QSizePolicy.Policy.Minimum,
QtWidgets.QSizePolicy.Policy.Expanding,
)
self.formLayout_2.setItem(
4, QtWidgets.QFormLayout.ItemRole.FieldRole, spacerItem3
)
self.prof_icon = QtWidgets.QToolButton(parent=self.newProf)
self.prof_icon.setText("")
self.prof_icon.setIconSize(QtCore.QSize(24, 24))
self.prof_icon.setAutoRaise(True)
self.prof_icon.setObjectName("prof_icon")
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.prof_icon)
self.formLayout_2.setWidget(
0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.prof_icon
)
self.horizontalLayout_2.addWidget(self.newProf)
self.dokument_list_elsa = QtWidgets.QTableWidget(parent=self.create_frame_elsa)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.dokument_list_elsa.sizePolicy().hasHeightForWidth())
sizePolicy.setHeightForWidth(
self.dokument_list_elsa.sizePolicy().hasHeightForWidth()
)
self.dokument_list_elsa.setSizePolicy(sizePolicy)
self.dokument_list_elsa.setMinimumSize(QtCore.QSize(350, 0))
self.dokument_list_elsa.setBaseSize(QtCore.QSize(350, 0))
self.dokument_list_elsa.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.dokument_list_elsa.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
self.dokument_list_elsa.setDragDropMode(QtWidgets.QAbstractItemView.DragDropMode.NoDragDrop)
self.dokument_list_elsa.setHorizontalScrollBarPolicy(
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
)
self.dokument_list_elsa.setDragDropMode(
QtWidgets.QAbstractItemView.DragDropMode.NoDragDrop
)
self.dokument_list_elsa.setObjectName("dokument_list_elsa")
self.dokument_list_elsa.setColumnCount(4)
self.dokument_list_elsa.setRowCount(0)
@@ -169,10 +221,14 @@ class Ui_Dialog(object):
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setSpacing(10)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.btn_add_document_elsa = QtWidgets.QPushButton(parent=self.create_frame_elsa)
self.btn_add_document_elsa = QtWidgets.QPushButton(
parent=self.create_frame_elsa
)
self.btn_add_document_elsa.setObjectName("btn_add_document_elsa")
self.verticalLayout_3.addWidget(self.btn_add_document_elsa)
self.btn_open_document_elsa = QtWidgets.QPushButton(parent=self.create_frame_elsa)
self.btn_open_document_elsa = QtWidgets.QPushButton(
parent=self.create_frame_elsa
)
self.btn_open_document_elsa.setObjectName("btn_open_document_elsa")
self.verticalLayout_3.addWidget(self.btn_open_document_elsa)
self.check_file_elsa = QtWidgets.QPushButton(parent=self.create_frame_elsa)
@@ -181,7 +237,12 @@ class Ui_Dialog(object):
self.seperateEntries = QtWidgets.QCheckBox(parent=self.create_frame_elsa)
self.seperateEntries.setObjectName("seperateEntries")
self.verticalLayout_3.addWidget(self.seperateEntries)
spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
spacerItem4 = QtWidgets.QSpacerItem(
20,
40,
QtWidgets.QSizePolicy.Policy.Minimum,
QtWidgets.QSizePolicy.Policy.Expanding,
)
self.verticalLayout_3.addItem(spacerItem4)
self.horizontalLayout_2.addLayout(self.verticalLayout_3)
self.verticalLayout.addWidget(self.create_frame_elsa)
@@ -202,23 +263,36 @@ class Ui_Dialog(object):
self.quote_entry = QtWidgets.QPushButton(parent=self.media_table)
self.quote_entry.setObjectName("quote_entry")
self.horizontalLayout_6.addWidget(self.quote_entry)
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
spacerItem5 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_6.addItem(spacerItem5)
self.verticalLayout_4.addLayout(self.horizontalLayout_6)
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.table_elsa_list = QtWidgets.QTableWidget(parent=self.media_table)
self.table_elsa_list.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.table_elsa_list.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.table_elsa_list.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectItems)
self.table_elsa_list.setEditTriggers(
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
)
self.table_elsa_list.setSelectionBehavior(
QtWidgets.QAbstractItemView.SelectionBehavior.SelectItems
)
self.table_elsa_list.setObjectName("table_elsa_list")
self.table_elsa_list.setColumnCount(12)
self.table_elsa_list.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
item.setTextAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignVCenter)
item.setTextAlignment(
QtCore.Qt.AlignmentFlag.AlignLeading | QtCore.Qt.AlignmentFlag.AlignVCenter
)
self.table_elsa_list.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
item.setTextAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignVCenter)
item.setTextAlignment(
QtCore.Qt.AlignmentFlag.AlignLeading | QtCore.Qt.AlignmentFlag.AlignVCenter
)
self.table_elsa_list.setHorizontalHeaderItem(1, item)
item = QtWidgets.QTableWidgetItem()
self.table_elsa_list.setHorizontalHeaderItem(2, item)
@@ -260,8 +334,12 @@ class Ui_Dialog(object):
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
self.elsa_statistics_table = QtWidgets.QTableWidget(parent=self.tab)
self.elsa_statistics_table.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.elsa_statistics_table.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
self.elsa_statistics_table.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.elsa_statistics_table.setHorizontalScrollBarPolicy(
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
)
self.elsa_statistics_table.setEditTriggers(
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
)
self.elsa_statistics_table.setTextElideMode(QtCore.Qt.TextElideMode.ElideMiddle)
self.elsa_statistics_table.setObjectName("elsa_statistics_table")
self.elsa_statistics_table.setColumnCount(2)
@@ -332,8 +410,9 @@ class Ui_Dialog(object):
item.setText(_translate("Dialog", "File"))
self.btn_add_document_elsa.setText(_translate("Dialog", "Dokument hinzufügen"))
self.btn_open_document_elsa.setText(_translate("Dialog", "Dokument öffnen"))
self.check_file_elsa.setText(_translate("Dialog", "Medien aus Dokument\n"
"hinzufügen"))
self.check_file_elsa.setText(
_translate("Dialog", "Medien aus Dokument\nhinzufügen")
)
self.seperateEntries.setText(_translate("Dialog", "Abschnitte trennen"))
self.quote_entry.setText(_translate("Dialog", " Eintrag zitieren "))
item = self.table_elsa_list.horizontalHeaderItem(0)
@@ -364,4 +443,6 @@ class Ui_Dialog(object):
item.setText(_translate("Dialog", "Semester"))
item = self.elsa_statistics_table.horizontalHeaderItem(1)
item.setText(_translate("Dialog", "Zugang"))
self.elsa_statistics.setTabText(self.elsa_statistics.indexOf(self.tab), _translate("Dialog", "Tabelle"))
self.elsa_statistics.setTabText(
self.elsa_statistics.indexOf(self.tab), _translate("Dialog", "Tabelle")
)

View File

@@ -20,10 +20,14 @@ class Ui_Dialog(object):
self.icon_name_settings.setObjectName("icon_name_settings")
self.horizontalLayout.addWidget(self.icon_name_settings)
self.icon_filename_line = QtWidgets.QLineEdit(parent=Dialog)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.icon_filename_line.sizePolicy().hasHeightForWidth())
sizePolicy.setHeightForWidth(
self.icon_filename_line.sizePolicy().hasHeightForWidth()
)
self.icon_filename_line.setSizePolicy(sizePolicy)
self.icon_filename_line.setMinimumSize(QtCore.QSize(230, 0))
self.icon_filename_line.setObjectName("icon_filename_line")

View File

@@ -8,29 +8,38 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject)
from PySide6.QtWidgets import (QFormLayout, QGridLayout,
QHBoxLayout, QLabel, QLineEdit, QPushButton,
QSizePolicy, QStackedWidget, QWidget)
from PySide6.QtCore import QCoreApplication, QMetaObject
from PySide6.QtWidgets import (
QFormLayout,
QGridLayout,
QHBoxLayout,
QLabel,
QLineEdit,
QPushButton,
QSizePolicy,
QStackedWidget,
QWidget,
)
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(618, 637)
Dialog.setSizeGripEnabled(False)
Dialog.setModal(False)
self.gridLayout = QGridLayout(Dialog)
self.gridLayout.setObjectName(u"gridLayout")
self.gridLayout.setObjectName("gridLayout")
self.label_10 = QLabel(Dialog)
self.label_10.setObjectName(u"label_10")
self.label_10.setObjectName("label_10")
self.gridLayout.addWidget(self.label_10, 0, 0, 1, 1)
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_9 = QLabel(Dialog)
self.label_9.setObjectName(u"label_9")
self.label_9.setObjectName("label_9")
sizePolicy = QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
@@ -40,182 +49,194 @@ class Ui_Dialog(object):
self.horizontalLayout_2.addWidget(self.label_9)
self.label_book_index = QLabel(Dialog)
self.label_book_index.setObjectName(u"label_book_index")
sizePolicy.setHeightForWidth(self.label_book_index.sizePolicy().hasHeightForWidth())
self.label_book_index.setObjectName("label_book_index")
sizePolicy.setHeightForWidth(
self.label_book_index.sizePolicy().hasHeightForWidth()
)
self.label_book_index.setSizePolicy(sizePolicy)
self.horizontalLayout_2.addWidget(self.label_book_index)
self.gridLayout.addLayout(self.horizontalLayout_2, 0, 1, 1, 1)
self.formLayout_2 = QFormLayout()
self.formLayout_2.setObjectName(u"formLayout_2")
self.formLayout_2.setObjectName("formLayout_2")
self.label = QLabel(Dialog)
self.label.setObjectName(u"label")
self.label.setObjectName("label")
self.formLayout_2.setWidget(0, QFormLayout.ItemRole.LabelRole, self.label)
self.line_ppn = QLineEdit(Dialog)
self.line_ppn.setObjectName(u"line_ppn")
self.line_ppn.setObjectName("line_ppn")
self.formLayout_2.setWidget(0, QFormLayout.ItemRole.FieldRole, self.line_ppn)
self.label_2 = QLabel(Dialog)
self.label_2.setObjectName(u"label_2")
self.label_2.setObjectName("label_2")
self.formLayout_2.setWidget(1, QFormLayout.ItemRole.LabelRole, self.label_2)
self.line_title = QLineEdit(Dialog)
self.line_title.setObjectName(u"line_title")
self.line_title.setObjectName("line_title")
self.formLayout_2.setWidget(1, QFormLayout.ItemRole.FieldRole, self.line_title)
self.label_3 = QLabel(Dialog)
self.label_3.setObjectName(u"label_3")
self.label_3.setObjectName("label_3")
self.formLayout_2.setWidget(2, QFormLayout.ItemRole.LabelRole, self.label_3)
self.line_signature = QLineEdit(Dialog)
self.line_signature.setObjectName(u"line_signature")
self.line_signature.setObjectName("line_signature")
self.formLayout_2.setWidget(2, QFormLayout.ItemRole.FieldRole, self.line_signature)
self.formLayout_2.setWidget(
2, QFormLayout.ItemRole.FieldRole, self.line_signature
)
self.label_4 = QLabel(Dialog)
self.label_4.setObjectName(u"label_4")
self.label_4.setObjectName("label_4")
self.formLayout_2.setWidget(3, QFormLayout.ItemRole.LabelRole, self.label_4)
self.line_edition = QLineEdit(Dialog)
self.line_edition.setObjectName(u"line_edition")
self.line_edition.setObjectName("line_edition")
self.formLayout_2.setWidget(3, QFormLayout.ItemRole.FieldRole, self.line_edition)
self.formLayout_2.setWidget(
3, QFormLayout.ItemRole.FieldRole, self.line_edition
)
self.label_5 = QLabel(Dialog)
self.label_5.setObjectName(u"label_5")
self.label_5.setObjectName("label_5")
self.formLayout_2.setWidget(4, QFormLayout.ItemRole.LabelRole, self.label_5)
self.line_publisher = QLineEdit(Dialog)
self.line_publisher.setObjectName(u"line_publisher")
self.line_publisher.setObjectName("line_publisher")
self.formLayout_2.setWidget(4, QFormLayout.ItemRole.FieldRole, self.line_publisher)
self.formLayout_2.setWidget(
4, QFormLayout.ItemRole.FieldRole, self.line_publisher
)
self.label_6 = QLabel(Dialog)
self.label_6.setObjectName(u"label_6")
self.label_6.setObjectName("label_6")
self.formLayout_2.setWidget(5, QFormLayout.ItemRole.LabelRole, self.label_6)
self.line_year = QLineEdit(Dialog)
self.line_year.setObjectName(u"line_year")
self.line_year.setObjectName("line_year")
self.formLayout_2.setWidget(5, QFormLayout.ItemRole.FieldRole, self.line_year)
self.label_7 = QLabel(Dialog)
self.label_7.setObjectName(u"label_7")
self.label_7.setObjectName("label_7")
self.formLayout_2.setWidget(6, QFormLayout.ItemRole.LabelRole, self.label_7)
self.line_pages = QLineEdit(Dialog)
self.line_pages.setObjectName(u"line_pages")
self.line_pages.setObjectName("line_pages")
self.formLayout_2.setWidget(6, QFormLayout.ItemRole.FieldRole, self.line_pages)
self.label_8 = QLabel(Dialog)
self.label_8.setObjectName(u"label_8")
self.label_8.setObjectName("label_8")
self.formLayout_2.setWidget(7, QFormLayout.ItemRole.LabelRole, self.label_8)
self.line_author = QLineEdit(Dialog)
self.line_author.setObjectName(u"line_author")
self.line_author.setObjectName("line_author")
self.formLayout_2.setWidget(7, QFormLayout.ItemRole.FieldRole, self.line_author)
self.label_11 = QLabel(Dialog)
self.label_11.setObjectName(u"label_11")
self.label_11.setObjectName("label_11")
self.formLayout_2.setWidget(8, QFormLayout.ItemRole.LabelRole, self.label_11)
self.line_isbn = QLineEdit(Dialog)
self.line_isbn.setObjectName(u"line_isbn")
self.line_isbn.setObjectName("line_isbn")
self.formLayout_2.setWidget(8, QFormLayout.ItemRole.FieldRole, self.line_isbn)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.label_source_local = QLabel(Dialog)
self.label_source_local.setObjectName(u"label_source_local")
self.label_source_local.setObjectName("label_source_local")
self.label_source_local.setOpenExternalLinks(True)
self.horizontalLayout_3.addWidget(self.label_source_local)
self.label_source_external = QLabel(Dialog)
self.label_source_external.setObjectName(u"label_source_external")
self.label_source_external.setObjectName("label_source_external")
self.label_source_external.setOpenExternalLinks(True)
self.horizontalLayout_3.addWidget(self.label_source_external)
self.formLayout_2.setLayout(9, QFormLayout.ItemRole.FieldRole, self.horizontalLayout_3)
self.formLayout_2.setLayout(
9, QFormLayout.ItemRole.FieldRole, self.horizontalLayout_3
)
self.label_12 = QLabel(Dialog)
self.label_12.setObjectName(u"label_12")
self.label_12.setObjectName("label_12")
self.formLayout_2.setWidget(9, QFormLayout.ItemRole.LabelRole, self.label_12)
self.gridLayout.addLayout(self.formLayout_2, 1, 0, 1, 1)
self.stackedWidget = QStackedWidget(Dialog)
self.stackedWidget.setObjectName(u"stackedWidget")
self.stackedWidget.setObjectName("stackedWidget")
self.page = QWidget()
self.page.setObjectName(u"page")
self.page.setObjectName("page")
self.stackedWidget.addWidget(self.page)
self.page_2 = QWidget()
self.page_2.setObjectName(u"page_2")
self.page_2.setObjectName("page_2")
self.stackedWidget.addWidget(self.page_2)
self.gridLayout.addWidget(self.stackedWidget, 1, 1, 1, 1)
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setObjectName("horizontalLayout")
self.btn_prev = QPushButton(Dialog)
self.btn_prev.setObjectName(u"btn_prev")
self.btn_prev.setObjectName("btn_prev")
self.horizontalLayout.addWidget(self.btn_prev)
self.btn_next = QPushButton(Dialog)
self.btn_next.setObjectName(u"btn_next")
self.btn_next.setObjectName("btn_next")
self.horizontalLayout.addWidget(self.btn_next)
self.gridLayout.addLayout(self.horizontalLayout, 2, 1, 1, 1)
self.retranslateUi(Dialog)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
self.label_10.setText(QCoreApplication.translate("Dialog", u"Ausgew\u00e4hltes Buch", None))
self.label_9.setText(QCoreApplication.translate("Dialog", u"Gefundenes Buch", None))
self.label_book_index.setText(QCoreApplication.translate("Dialog", u"TextLabel", None))
self.label.setText(QCoreApplication.translate("Dialog", u"PPN", None))
self.label_2.setText(QCoreApplication.translate("Dialog", u"Titel", None))
self.label_3.setText(QCoreApplication.translate("Dialog", u"Signatur", None))
self.label_4.setText(QCoreApplication.translate("Dialog", u"Auflage", None))
self.label_5.setText(QCoreApplication.translate("Dialog", u"Verlag", None))
self.label_6.setText(QCoreApplication.translate("Dialog", u"Jahr", None))
self.label_7.setText(QCoreApplication.translate("Dialog", u"Seiten", None))
self.label_8.setText(QCoreApplication.translate("Dialog", u"Autor", None))
self.label_11.setText(QCoreApplication.translate("Dialog", u"ISBN", None))
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
self.label_10.setText(
QCoreApplication.translate("Dialog", "Ausgew\u00e4hltes Buch", None)
)
self.label_9.setText(
QCoreApplication.translate("Dialog", "Gefundenes Buch", None)
)
self.label_book_index.setText(
QCoreApplication.translate("Dialog", "TextLabel", None)
)
self.label.setText(QCoreApplication.translate("Dialog", "PPN", None))
self.label_2.setText(QCoreApplication.translate("Dialog", "Titel", None))
self.label_3.setText(QCoreApplication.translate("Dialog", "Signatur", None))
self.label_4.setText(QCoreApplication.translate("Dialog", "Auflage", None))
self.label_5.setText(QCoreApplication.translate("Dialog", "Verlag", None))
self.label_6.setText(QCoreApplication.translate("Dialog", "Jahr", None))
self.label_7.setText(QCoreApplication.translate("Dialog", "Seiten", None))
self.label_8.setText(QCoreApplication.translate("Dialog", "Autor", None))
self.label_11.setText(QCoreApplication.translate("Dialog", "ISBN", None))
self.label_source_local.setText("")
self.label_source_external.setText("")
self.label_12.setText(QCoreApplication.translate("Dialog", u"Quelle", None))
self.btn_prev.setText(QCoreApplication.translate("Dialog", u"Previous", None))
self.btn_next.setText(QCoreApplication.translate("Dialog", u"Next", None))
# retranslateUi
self.label_12.setText(QCoreApplication.translate("Dialog", "Quelle", None))
self.btn_prev.setText(QCoreApplication.translate("Dialog", "Previous", None))
self.btn_next.setText(QCoreApplication.translate("Dialog", "Next", None))
# retranslateUi

View File

@@ -8,103 +8,116 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject, Qt)
from PySide6.QtWidgets import (QCheckBox, QFormLayout,
QLabel, QLineEdit, QSizePolicy, QSpacerItem)
from PySide6.QtCore import QCoreApplication, QMetaObject, Qt
from PySide6.QtWidgets import (
QCheckBox,
QFormLayout,
QLabel,
QLineEdit,
QSizePolicy,
QSpacerItem,
)
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(400, 346)
self.formLayout = QFormLayout(Dialog)
self.formLayout.setObjectName(u"formLayout")
self.formLayout.setObjectName("formLayout")
self.label = QLabel(Dialog)
self.label.setObjectName(u"label")
self.label.setObjectName("label")
self.formLayout.setWidget(0, QFormLayout.ItemRole.LabelRole, self.label)
self.line_ppn = QLineEdit(Dialog)
self.line_ppn.setObjectName(u"line_ppn")
self.line_ppn.setObjectName("line_ppn")
self.formLayout.setWidget(0, QFormLayout.ItemRole.FieldRole, self.line_ppn)
self.label_2 = QLabel(Dialog)
self.label_2.setObjectName(u"label_2")
self.label_2.setObjectName("label_2")
self.formLayout.setWidget(1, QFormLayout.ItemRole.LabelRole, self.label_2)
self.line_title = QLineEdit(Dialog)
self.line_title.setObjectName(u"line_title")
self.line_title.setObjectName("line_title")
self.formLayout.setWidget(1, QFormLayout.ItemRole.FieldRole, self.line_title)
self.label_3 = QLabel(Dialog)
self.label_3.setObjectName(u"label_3")
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(2, QFormLayout.ItemRole.LabelRole, self.label_3)
self.line_signature = QLineEdit(Dialog)
self.line_signature.setObjectName(u"line_signature")
self.line_signature.setObjectName("line_signature")
self.formLayout.setWidget(2, QFormLayout.ItemRole.FieldRole, self.line_signature)
self.formLayout.setWidget(
2, QFormLayout.ItemRole.FieldRole, self.line_signature
)
self.label_4 = QLabel(Dialog)
self.label_4.setObjectName(u"label_4")
self.label_4.setObjectName("label_4")
self.formLayout.setWidget(3, QFormLayout.ItemRole.LabelRole, self.label_4)
self.line_edition = QLineEdit(Dialog)
self.line_edition.setObjectName(u"line_edition")
self.line_edition.setObjectName("line_edition")
self.formLayout.setWidget(3, QFormLayout.ItemRole.FieldRole, self.line_edition)
self.label_5 = QLabel(Dialog)
self.label_5.setObjectName(u"label_5")
self.label_5.setObjectName("label_5")
self.formLayout.setWidget(4, QFormLayout.ItemRole.LabelRole, self.label_5)
self.line_publisher = QLineEdit(Dialog)
self.line_publisher.setObjectName(u"line_publisher")
self.line_publisher.setObjectName("line_publisher")
self.formLayout.setWidget(4, QFormLayout.ItemRole.FieldRole, self.line_publisher)
self.formLayout.setWidget(
4, QFormLayout.ItemRole.FieldRole, self.line_publisher
)
self.label_6 = QLabel(Dialog)
self.label_6.setObjectName(u"label_6")
self.label_6.setObjectName("label_6")
self.formLayout.setWidget(5, QFormLayout.ItemRole.LabelRole, self.label_6)
self.line_year = QLineEdit(Dialog)
self.line_year.setObjectName(u"line_year")
self.line_year.setObjectName("line_year")
self.formLayout.setWidget(5, QFormLayout.ItemRole.FieldRole, self.line_year)
self.label_7 = QLabel(Dialog)
self.label_7.setObjectName(u"label_7")
self.label_7.setObjectName("label_7")
self.formLayout.setWidget(6, QFormLayout.ItemRole.LabelRole, self.label_7)
self.line_pages = QLineEdit(Dialog)
self.line_pages.setObjectName(u"line_pages")
self.line_pages.setObjectName("line_pages")
self.formLayout.setWidget(6, QFormLayout.ItemRole.FieldRole, self.line_pages)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalSpacer = QSpacerItem(
20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding
)
self.formLayout.setItem(13, QFormLayout.ItemRole.FieldRole, self.verticalSpacer)
self.checkBox = QCheckBox(Dialog)
self.checkBox.setObjectName(u"checkBox")
self.checkBox.setObjectName("checkBox")
self.formLayout.setWidget(11, QFormLayout.ItemRole.FieldRole, self.checkBox)
self.label_8 = QLabel(Dialog)
self.label_8.setObjectName(u"label_8")
self.label_8.setObjectName("label_8")
self.formLayout.setWidget(10, QFormLayout.ItemRole.LabelRole, self.label_8)
self.line_source = QLabel(Dialog)
self.line_source.setObjectName(u"line_source")
self.line_source.setObjectName("line_source")
self.line_source.setFocusPolicy(Qt.NoFocus)
self.line_source.setTextFormat(Qt.PlainText)
self.line_source.setOpenExternalLinks(True)
@@ -113,50 +126,50 @@ class Ui_Dialog(object):
self.formLayout.setWidget(10, QFormLayout.ItemRole.FieldRole, self.line_source)
self.label_9 = QLabel(Dialog)
self.label_9.setObjectName(u"label_9")
self.label_9.setObjectName("label_9")
self.formLayout.setWidget(8, QFormLayout.ItemRole.LabelRole, self.label_9)
self.line_isbn = QLineEdit(Dialog)
self.line_isbn.setObjectName(u"line_isbn")
self.line_isbn.setObjectName("line_isbn")
self.formLayout.setWidget(8, QFormLayout.ItemRole.FieldRole, self.line_isbn)
self.in_library = QLabel(Dialog)
self.in_library.setObjectName(u"in_library")
self.in_library.setObjectName("in_library")
self.formLayout.setWidget(12, QFormLayout.ItemRole.FieldRole, self.in_library)
self.label_10 = QLabel(Dialog)
self.label_10.setObjectName(u"label_10")
self.label_10.setObjectName("label_10")
self.formLayout.setWidget(7, QFormLayout.ItemRole.LabelRole, self.label_10)
self.line_author = QLineEdit(Dialog)
self.line_author.setObjectName(u"line_author")
self.line_author.setObjectName("line_author")
self.formLayout.setWidget(7, QFormLayout.ItemRole.FieldRole, self.line_author)
self.retranslateUi(Dialog)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
self.label.setText(QCoreApplication.translate("Dialog", u"PPN", None))
self.label_2.setText(QCoreApplication.translate("Dialog", u"Titel", None))
self.label_3.setText(QCoreApplication.translate("Dialog", u"Signatur", None))
self.label_4.setText(QCoreApplication.translate("Dialog", u"Auflage", None))
self.label_5.setText(QCoreApplication.translate("Dialog", u"Verlag", None))
self.label_6.setText(QCoreApplication.translate("Dialog", u"Jahr", None))
self.label_7.setText(QCoreApplication.translate("Dialog", u"Seiten", None))
self.checkBox.setText(QCoreApplication.translate("Dialog", u"Bestellen", None))
self.label_8.setText(QCoreApplication.translate("Dialog", u"Quelle", None))
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
self.label.setText(QCoreApplication.translate("Dialog", "PPN", None))
self.label_2.setText(QCoreApplication.translate("Dialog", "Titel", None))
self.label_3.setText(QCoreApplication.translate("Dialog", "Signatur", None))
self.label_4.setText(QCoreApplication.translate("Dialog", "Auflage", None))
self.label_5.setText(QCoreApplication.translate("Dialog", "Verlag", None))
self.label_6.setText(QCoreApplication.translate("Dialog", "Jahr", None))
self.label_7.setText(QCoreApplication.translate("Dialog", "Seiten", None))
self.checkBox.setText(QCoreApplication.translate("Dialog", "Bestellen", None))
self.label_8.setText(QCoreApplication.translate("Dialog", "Quelle", None))
self.line_source.setText("")
self.label_9.setText(QCoreApplication.translate("Dialog", u"ISBN", None))
self.label_9.setText(QCoreApplication.translate("Dialog", "ISBN", None))
self.in_library.setText("")
self.label_10.setText(QCoreApplication.translate("Dialog", u"Autor", None))
# retranslateUi
self.label_10.setText(QCoreApplication.translate("Dialog", "Autor", None))
# retranslateUi

View File

@@ -8,47 +8,52 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject)
from PySide6.QtWidgets import (QHBoxLayout, QLabel,
QPushButton, QVBoxLayout)
from PySide6.QtCore import QCoreApplication, QMetaObject
from PySide6.QtWidgets import QHBoxLayout, QLabel, QPushButton, QVBoxLayout
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(475, 66)
self.verticalLayout = QVBoxLayout(Dialog)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setObjectName("verticalLayout")
self.label = QLabel(Dialog)
self.label.setObjectName(u"label")
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setObjectName("horizontalLayout")
self.btn_apparat = QPushButton(Dialog)
self.btn_apparat.setObjectName(u"btn_apparat")
self.btn_apparat.setObjectName("btn_apparat")
self.horizontalLayout.addWidget(self.btn_apparat)
self.btn_prof = QPushButton(Dialog)
self.btn_prof.setObjectName(u"btn_prof")
self.btn_prof.setObjectName("btn_prof")
self.horizontalLayout.addWidget(self.btn_prof)
self.verticalLayout.addLayout(self.horizontalLayout)
self.retranslateUi(Dialog)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
self.label.setText(QCoreApplication.translate("Dialog", u"Soll nur der Apparat gepr\u00fcft werden, oder sollen alle Medien des Profs gepr\u00fcft werden?", None))
self.btn_apparat.setText(QCoreApplication.translate("Dialog", u"Apparat", None))
self.btn_prof.setText(QCoreApplication.translate("Dialog", u"Prof", None))
# retranslateUi
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
self.label.setText(
QCoreApplication.translate(
"Dialog",
"Soll nur der Apparat gepr\u00fcft werden, oder sollen alle Medien des Profs gepr\u00fcft werden?",
None,
)
)
self.btn_apparat.setText(QCoreApplication.translate("Dialog", "Apparat", None))
self.btn_prof.setText(QCoreApplication.translate("Dialog", "Prof", None))
# retranslateUi

View File

@@ -8,79 +8,83 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject)
from PySide6.QtWidgets import (QFrame, QHBoxLayout,
QProgressBar, QPushButton, QStackedWidget,
QVBoxLayout, QWidget)
from PySide6.QtCore import QCoreApplication, QMetaObject
from PySide6.QtWidgets import (
QFrame,
QHBoxLayout,
QProgressBar,
QPushButton,
QStackedWidget,
QVBoxLayout,
QWidget,
)
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(632, 726)
self.verticalLayout_4 = QVBoxLayout(Dialog)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.verticalLayout_3 = QVBoxLayout()
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.frame = QFrame(Dialog)
self.frame.setObjectName(u"frame")
self.frame.setObjectName("frame")
self.frame.setFrameShape(QFrame.StyledPanel)
self.frame.setFrameShadow(QFrame.Raised)
self.verticalLayout_5 = QVBoxLayout(self.frame)
self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.stackedWidget = QStackedWidget(self.frame)
self.stackedWidget.setObjectName(u"stackedWidget")
self.stackedWidget.setObjectName("stackedWidget")
self.page = QWidget()
self.page.setObjectName(u"page")
self.page.setObjectName("page")
self.stackedWidget.addWidget(self.page)
self.page_2 = QWidget()
self.page_2.setObjectName(u"page_2")
self.page_2.setObjectName("page_2")
self.stackedWidget.addWidget(self.page_2)
self.verticalLayout_5.addWidget(self.stackedWidget)
self.verticalLayout_3.addWidget(self.frame)
self.progressBar = QProgressBar(Dialog)
self.progressBar.setObjectName(u"progressBar")
self.progressBar.setObjectName("progressBar")
self.progressBar.setValue(24)
self.verticalLayout_3.addWidget(self.progressBar)
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setObjectName("horizontalLayout")
self.btn_prev = QPushButton(Dialog)
self.btn_prev.setObjectName(u"btn_prev")
self.btn_prev.setObjectName("btn_prev")
self.horizontalLayout.addWidget(self.btn_prev)
self.btn_next = QPushButton(Dialog)
self.btn_next.setObjectName(u"btn_next")
self.btn_next.setObjectName("btn_next")
self.horizontalLayout.addWidget(self.btn_next)
self.btn_finish = QPushButton(Dialog)
self.btn_finish.setObjectName(u"btn_finish")
self.btn_finish.setObjectName("btn_finish")
self.horizontalLayout.addWidget(self.btn_finish)
self.verticalLayout_3.addLayout(self.horizontalLayout)
self.verticalLayout_4.addLayout(self.verticalLayout_3)
self.retranslateUi(Dialog)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
self.btn_prev.setText(QCoreApplication.translate("Dialog", u"Previous", None))
self.btn_next.setText(QCoreApplication.translate("Dialog", u"Next", None))
self.btn_finish.setText(QCoreApplication.translate("Dialog", u"Finish", None))
# retranslateUi
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
self.btn_prev.setText(QCoreApplication.translate("Dialog", "Previous", None))
self.btn_next.setText(QCoreApplication.translate("Dialog", "Next", None))
self.btn_finish.setText(QCoreApplication.translate("Dialog", "Finish", None))
# retranslateUi

View File

@@ -8,120 +8,137 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject, QSize, Qt)
from PySide6.QtWidgets import (QAbstractItemView, QCheckBox, QComboBox,
QFrame, QGridLayout, QHBoxLayout,
QLabel, QLayout, QLineEdit,
QPushButton, QSizePolicy, QSpacerItem, QStackedWidget,
QTabWidget, QTableWidget, QTableWidgetItem, QVBoxLayout,
QWidget)
from PySide6.QtCore import QCoreApplication, QMetaObject, QSize, Qt
from PySide6.QtWidgets import (
QAbstractItemView,
QCheckBox,
QComboBox,
QFrame,
QGridLayout,
QHBoxLayout,
QLabel,
QLayout,
QLineEdit,
QPushButton,
QSizePolicy,
QSpacerItem,
QStackedWidget,
QTabWidget,
QTableWidget,
QTableWidgetItem,
QVBoxLayout,
QWidget,
)
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(1244, 767)
self.verticalLayout = QVBoxLayout(Dialog)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setObjectName("verticalLayout")
self.tabWidget_2 = QTabWidget(Dialog)
self.tabWidget_2.setObjectName(u"tabWidget_2")
self.tabWidget_2.setObjectName("tabWidget_2")
self.tabWidget_2.setMaximumSize(QSize(16777215, 250))
self.tabWidget_2.setFocusPolicy(Qt.ClickFocus)
self.tabWidget_2.setTabPosition(QTabWidget.North)
self.tabWidget_2.setTabShape(QTabWidget.Rounded)
self.tab_3 = QWidget()
self.tab_3.setObjectName(u"tab_3")
self.tab_3.setObjectName("tab_3")
self.horizontalLayout_2 = QHBoxLayout(self.tab_3)
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.gridLayout_3 = QGridLayout()
self.gridLayout_3.setObjectName(u"gridLayout_3")
self.gridLayout_3.setObjectName("gridLayout_3")
self.box_semester = QComboBox(self.tab_3)
self.box_semester.setObjectName(u"box_semester")
self.box_semester.setObjectName("box_semester")
self.box_semester.setEditable(True)
self.gridLayout_3.addWidget(self.box_semester, 0, 3, 1, 1)
self.label_18 = QLabel(self.tab_3)
self.label_18.setObjectName(u"label_18")
self.label_18.setObjectName("label_18")
self.gridLayout_3.addWidget(self.label_18, 2, 2, 1, 1)
self.box_fach = QComboBox(self.tab_3)
self.box_fach.setObjectName(u"box_fach")
self.box_fach.setObjectName("box_fach")
self.box_fach.setEditable(True)
self.gridLayout_3.addWidget(self.box_fach, 2, 1, 1, 1)
self.label_15 = QLabel(self.tab_3)
self.label_15.setObjectName(u"label_15")
self.label_15.setObjectName("label_15")
self.gridLayout_3.addWidget(self.label_15, 3, 0, 1, 1)
self.label_11 = QLabel(self.tab_3)
self.label_11.setObjectName(u"label_11")
self.label_11.setObjectName("label_11")
self.gridLayout_3.addWidget(self.label_11, 1, 0, 1, 1)
self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalSpacer_3 = QSpacerItem(
20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding
)
self.gridLayout_3.addItem(self.verticalSpacer_3, 4, 0, 1, 1)
self.label_7 = QLabel(self.tab_3)
self.label_7.setObjectName(u"label_7")
self.label_7.setObjectName("label_7")
self.gridLayout_3.addWidget(self.label_7, 0, 0, 1, 1)
self.label_17 = QLabel(self.tab_3)
self.label_17.setObjectName(u"label_17")
self.label_17.setObjectName("label_17")
self.gridLayout_3.addWidget(self.label_17, 0, 2, 1, 1)
self.box_appnrs = QComboBox(self.tab_3)
self.box_appnrs.setObjectName(u"box_appnrs")
self.box_appnrs.setObjectName("box_appnrs")
self.box_appnrs.setEditable(True)
self.gridLayout_3.addWidget(self.box_appnrs, 0, 1, 1, 1)
self.box_dauerapp = QComboBox(self.tab_3)
self.box_dauerapp.setObjectName(u"box_dauerapp")
self.box_dauerapp.setObjectName("box_dauerapp")
self.gridLayout_3.addWidget(self.box_dauerapp, 2, 3, 1, 1)
self.box_person = QComboBox(self.tab_3)
self.box_person.setObjectName(u"box_person")
self.box_person.setObjectName("box_person")
self.box_person.setEditable(True)
self.gridLayout_3.addWidget(self.box_person, 1, 1, 1, 1)
self.box_erstellsemester = QComboBox(self.tab_3)
self.box_erstellsemester.setObjectName(u"box_erstellsemester")
self.box_erstellsemester.setObjectName("box_erstellsemester")
self.box_erstellsemester.setEditable(True)
self.gridLayout_3.addWidget(self.box_erstellsemester, 1, 3, 1, 1)
self.label_19 = QLabel(self.tab_3)
self.label_19.setObjectName(u"label_19")
self.label_19.setObjectName("label_19")
self.gridLayout_3.addWidget(self.label_19, 1, 2, 1, 1)
self.label_16 = QLabel(self.tab_3)
self.label_16.setObjectName(u"label_16")
self.label_16.setObjectName("label_16")
self.gridLayout_3.addWidget(self.label_16, 2, 0, 1, 1)
self.check_deletable = QCheckBox(self.tab_3)
self.check_deletable.setObjectName(u"check_deletable")
self.check_deletable.setObjectName("check_deletable")
self.check_deletable.setFocusPolicy(Qt.StrongFocus)
self.gridLayout_3.addWidget(self.check_deletable, 3, 1, 1, 1)
self.btn_search = QPushButton(self.tab_3)
self.btn_search.setObjectName(u"btn_search")
self.btn_search.setObjectName("btn_search")
self.gridLayout_3.addWidget(self.btn_search, 5, 0, 1, 1)
self.db_err_message = QLabel(self.tab_3)
self.db_err_message.setObjectName(u"db_err_message")
self.db_err_message.setObjectName("db_err_message")
self.gridLayout_3.addWidget(self.db_err_message, 5, 1, 1, 1)
@@ -133,7 +150,9 @@ class Ui_Dialog(object):
self.horizontalLayout_2.addLayout(self.gridLayout_3)
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalSpacer = QSpacerItem(
40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
)
self.horizontalLayout_2.addItem(self.horizontalSpacer)
@@ -141,58 +160,60 @@ class Ui_Dialog(object):
self.horizontalLayout_2.setStretch(1, 1)
self.tabWidget_2.addTab(self.tab_3, "")
self.tab_4 = QWidget()
self.tab_4.setObjectName(u"tab_4")
self.tab_4.setObjectName("tab_4")
self.horizontalLayout_3 = QHBoxLayout(self.tab_4)
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.gridLayout = QGridLayout()
self.gridLayout.setObjectName(u"gridLayout")
self.gridLayout.setObjectName("gridLayout")
self.search_by_signature = QLineEdit(self.tab_4)
self.search_by_signature.setObjectName(u"search_by_signature")
self.search_by_signature.setObjectName("search_by_signature")
self.search_by_signature.setFocusPolicy(Qt.ClickFocus)
self.search_by_signature.setClearButtonEnabled(True)
self.gridLayout.addWidget(self.search_by_signature, 0, 1, 1, 1)
self.label_25 = QLabel(self.tab_4)
self.label_25.setObjectName(u"label_25")
self.label_25.setObjectName("label_25")
self.gridLayout.addWidget(self.label_25, 0, 0, 1, 1)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalSpacer = QSpacerItem(
20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding
)
self.gridLayout.addItem(self.verticalSpacer, 5, 0, 1, 1)
self.search_by_title = QLineEdit(self.tab_4)
self.search_by_title.setObjectName(u"search_by_title")
self.search_by_title.setObjectName("search_by_title")
self.search_by_title.setFocusPolicy(Qt.ClickFocus)
self.search_by_title.setClearButtonEnabled(True)
self.gridLayout.addWidget(self.search_by_title, 1, 1, 1, 1)
self.label_26 = QLabel(self.tab_4)
self.label_26.setObjectName(u"label_26")
self.label_26.setObjectName("label_26")
self.gridLayout.addWidget(self.label_26, 1, 0, 1, 1)
self.horizontalLayout_4 = QHBoxLayout()
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.label = QLabel(self.tab_4)
self.label.setObjectName(u"label")
self.label.setObjectName("label")
self.horizontalLayout_4.addWidget(self.label)
self.no_result = QLabel(self.tab_4)
self.no_result.setObjectName(u"no_result")
self.no_result.setObjectName("no_result")
self.horizontalLayout_4.addWidget(self.no_result)
self.gridLayout.addLayout(self.horizontalLayout_4, 3, 1, 1, 1)
self.horizontalLayout_3.addLayout(self.gridLayout)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalSpacer_2 = QSpacerItem(
40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
)
self.horizontalLayout_3.addItem(self.horizontalSpacer_2)
@@ -203,59 +224,64 @@ class Ui_Dialog(object):
self.verticalLayout.addWidget(self.tabWidget_2)
self.verticalLayout_3 = QVBoxLayout()
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.verticalLayout_3.setSizeConstraint(QLayout.SetDefaultConstraint)
self.stackedWidget_4 = QStackedWidget(Dialog)
self.stackedWidget_4.setObjectName(u"stackedWidget_4")
sizePolicy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
self.stackedWidget_4.setObjectName("stackedWidget_4")
sizePolicy = QSizePolicy(
QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding
)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.stackedWidget_4.sizePolicy().hasHeightForWidth())
sizePolicy.setHeightForWidth(
self.stackedWidget_4.sizePolicy().hasHeightForWidth()
)
self.stackedWidget_4.setSizePolicy(sizePolicy)
self.stackedWidget_4.setFrameShape(QFrame.StyledPanel)
self.stackedWidget_4.setFrameShadow(QFrame.Raised)
self.apparatResult = QWidget()
self.apparatResult.setObjectName(u"apparatResult")
self.apparatResult.setObjectName("apparatResult")
self.horizontalLayout = QHBoxLayout(self.apparatResult)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setObjectName("horizontalLayout")
self.app_results = QWidget(self.apparatResult)
self.app_results.setObjectName(u"app_results")
self.app_results.setObjectName("app_results")
self.verticalLayout_6 = QVBoxLayout(self.app_results)
self.verticalLayout_6.setObjectName(u"verticalLayout_6")
self.verticalLayout_6.setObjectName("verticalLayout_6")
self.verticalLayout_4 = QVBoxLayout()
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.horizontalLayout_7 = QHBoxLayout()
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
self.verticalLayout_5 = QVBoxLayout()
self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.horizontalLayout_7.addLayout(self.verticalLayout_5)
self.btn_del_select_apparats = QPushButton(self.app_results)
self.btn_del_select_apparats.setObjectName(u"btn_del_select_apparats")
self.btn_del_select_apparats.setObjectName("btn_del_select_apparats")
self.btn_del_select_apparats.setFocusPolicy(Qt.StrongFocus)
self.horizontalLayout_7.addWidget(self.btn_del_select_apparats)
self.btn_notify_for_deletion = QPushButton(self.app_results)
self.btn_notify_for_deletion.setObjectName(u"btn_notify_for_deletion")
self.btn_notify_for_deletion.setObjectName("btn_notify_for_deletion")
self.horizontalLayout_7.addWidget(self.btn_notify_for_deletion)
self.btn_extendSelection = QPushButton(self.app_results)
self.btn_extendSelection.setObjectName(u"btn_extendSelection")
self.btn_extendSelection.setObjectName("btn_extendSelection")
self.horizontalLayout_7.addWidget(self.btn_extendSelection)
self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalSpacer_5 = QSpacerItem(
40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
)
self.horizontalLayout_7.addItem(self.horizontalSpacer_5)
self.verticalLayout_4.addLayout(self.horizontalLayout_7)
self.tableWidget = QTableWidget(self.app_results)
if (self.tableWidget.columnCount() < 5):
if self.tableWidget.columnCount() < 5:
self.tableWidget.setColumnCount(5)
__qtablewidgetitem = QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(0, __qtablewidgetitem)
@@ -267,35 +293,33 @@ class Ui_Dialog(object):
self.tableWidget.setHorizontalHeaderItem(3, __qtablewidgetitem3)
__qtablewidgetitem4 = QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(4, __qtablewidgetitem4)
self.tableWidget.setObjectName(u"tableWidget")
self.tableWidget.setObjectName("tableWidget")
self.tableWidget.setFocusPolicy(Qt.NoFocus)
self.tableWidget.setContextMenuPolicy(Qt.CustomContextMenu)
self.tableWidget.setEditTriggers(QAbstractItemView.NoEditTriggers)
self.tableWidget.setGridStyle(Qt.NoPen)
self.tableWidget.setSortingEnabled(True)
self.tableWidget.horizontalHeader().setStretchLastSection(True)
self.tableWidget.verticalHeader().setProperty(u"showSortIndicator", True)
self.tableWidget.verticalHeader().setProperty("showSortIndicator", True)
self.verticalLayout_4.addWidget(self.tableWidget)
self.verticalLayout_6.addLayout(self.verticalLayout_4)
self.horizontalLayout.addWidget(self.app_results)
self.stats = QFrame(self.apparatResult)
self.stats.setObjectName(u"stats")
self.stats.setObjectName("stats")
self.verticalLayout_8 = QVBoxLayout(self.stats)
self.verticalLayout_8.setObjectName(u"verticalLayout_8")
self.verticalLayout_8.setObjectName("verticalLayout_8")
self.tabWidget_3 = QTabWidget(self.stats)
self.tabWidget_3.setObjectName(u"tabWidget_3")
self.tabWidget_3.setObjectName("tabWidget_3")
self.statistic_table = QWidget()
self.statistic_table.setObjectName(u"statistic_table")
self.statistic_table.setObjectName("statistic_table")
self.verticalLayout_7 = QVBoxLayout(self.statistic_table)
self.verticalLayout_7.setObjectName(u"verticalLayout_7")
self.verticalLayout_7.setObjectName("verticalLayout_7")
self.statistics_table = QTableWidget(self.statistic_table)
if (self.statistics_table.columnCount() < 3):
if self.statistics_table.columnCount() < 3:
self.statistics_table.setColumnCount(3)
__qtablewidgetitem5 = QTableWidgetItem()
self.statistics_table.setHorizontalHeaderItem(0, __qtablewidgetitem5)
@@ -303,8 +327,10 @@ class Ui_Dialog(object):
self.statistics_table.setHorizontalHeaderItem(1, __qtablewidgetitem6)
__qtablewidgetitem7 = QTableWidgetItem()
self.statistics_table.setHorizontalHeaderItem(2, __qtablewidgetitem7)
self.statistics_table.setObjectName(u"statistics_table")
sizePolicy.setHeightForWidth(self.statistics_table.sizePolicy().hasHeightForWidth())
self.statistics_table.setObjectName("statistics_table")
sizePolicy.setHeightForWidth(
self.statistics_table.sizePolicy().hasHeightForWidth()
)
self.statistics_table.setSizePolicy(sizePolicy)
self.statistics_table.setMaximumSize(QSize(16777215, 16777215))
self.statistics_table.setFocusPolicy(Qt.NoFocus)
@@ -314,36 +340,35 @@ class Ui_Dialog(object):
self.statistics_table.horizontalHeader().setCascadingSectionResizes(True)
self.statistics_table.horizontalHeader().setMinimumSectionSize(40)
self.statistics_table.horizontalHeader().setDefaultSectionSize(80)
self.statistics_table.horizontalHeader().setProperty(u"showSortIndicator", True)
self.statistics_table.horizontalHeader().setProperty("showSortIndicator", True)
self.statistics_table.horizontalHeader().setStretchLastSection(False)
self.statistics_table.verticalHeader().setStretchLastSection(True)
self.verticalLayout_7.addWidget(self.statistics_table)
self.dataLayout = QHBoxLayout()
self.dataLayout.setObjectName(u"dataLayout")
self.dataLayout.setObjectName("dataLayout")
self.verticalLayout_7.addLayout(self.dataLayout)
self.tabWidget_3.addTab(self.statistic_table, "")
self.graph_table = QWidget()
self.graph_table.setObjectName(u"graph_table")
self.graph_table.setObjectName("graph_table")
self.tabWidget_3.addTab(self.graph_table, "")
self.verticalLayout_8.addWidget(self.tabWidget_3)
self.horizontalLayout.addWidget(self.stats)
self.stackedWidget_4.addWidget(self.apparatResult)
self.bookresult = QWidget()
self.bookresult.setObjectName(u"bookresult")
self.bookresult.setObjectName("bookresult")
sizePolicy.setHeightForWidth(self.bookresult.sizePolicy().hasHeightForWidth())
self.bookresult.setSizePolicy(sizePolicy)
self.verticalLayout_2 = QVBoxLayout(self.bookresult)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.book_search_result = QTableWidget(self.bookresult)
if (self.book_search_result.columnCount() < 3):
if self.book_search_result.columnCount() < 3:
self.book_search_result.setColumnCount(3)
__qtablewidgetitem8 = QTableWidgetItem()
self.book_search_result.setHorizontalHeaderItem(0, __qtablewidgetitem8)
@@ -351,7 +376,7 @@ class Ui_Dialog(object):
self.book_search_result.setHorizontalHeaderItem(1, __qtablewidgetitem9)
__qtablewidgetitem10 = QTableWidgetItem()
self.book_search_result.setHorizontalHeaderItem(2, __qtablewidgetitem10)
self.book_search_result.setObjectName(u"book_search_result")
self.book_search_result.setObjectName("book_search_result")
self.book_search_result.setFrameShadow(QFrame.Plain)
self.book_search_result.setEditTriggers(QAbstractItemView.NoEditTriggers)
self.book_search_result.setAlternatingRowColors(True)
@@ -359,9 +384,11 @@ class Ui_Dialog(object):
self.book_search_result.horizontalHeader().setCascadingSectionResizes(True)
self.book_search_result.horizontalHeader().setMinimumSectionSize(100)
self.book_search_result.horizontalHeader().setDefaultSectionSize(200)
self.book_search_result.horizontalHeader().setProperty(u"showSortIndicator", True)
self.book_search_result.horizontalHeader().setProperty(
"showSortIndicator", True
)
self.book_search_result.horizontalHeader().setStretchLastSection(True)
self.book_search_result.verticalHeader().setProperty(u"showSortIndicator", False)
self.book_search_result.verticalHeader().setProperty("showSortIndicator", False)
self.verticalLayout_2.addWidget(self.book_search_result)
@@ -369,10 +396,9 @@ class Ui_Dialog(object):
self.verticalLayout_3.addWidget(self.stackedWidget_4)
self.verticalLayout.addLayout(self.verticalLayout_3)
#if QT_CONFIG(shortcut)
# if QT_CONFIG(shortcut)
self.label_18.setBuddy(self.box_dauerapp)
self.label_15.setBuddy(self.check_deletable)
self.label_11.setBuddy(self.box_person)
@@ -382,7 +408,7 @@ class Ui_Dialog(object):
self.label_16.setBuddy(self.box_fach)
self.label_25.setBuddy(self.search_by_signature)
self.label_26.setBuddy(self.search_by_title)
#endif // QT_CONFIG(shortcut)
# endif // QT_CONFIG(shortcut)
QWidget.setTabOrder(self.box_appnrs, self.box_person)
QWidget.setTabOrder(self.box_person, self.box_fach)
QWidget.setTabOrder(self.box_fach, self.check_deletable)
@@ -400,58 +426,118 @@ class Ui_Dialog(object):
self.stackedWidget_4.setCurrentIndex(0)
self.tabWidget_3.setCurrentIndex(0)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
self.label_18.setText(QCoreApplication.translate("Dialog", u"Dauerapp:", None))
self.label_15.setText(QCoreApplication.translate("Dialog", u"L\u00f6schbar", None))
self.label_11.setText(QCoreApplication.translate("Dialog", u"Person:", None))
self.label_7.setText(QCoreApplication.translate("Dialog", u"Appnr.:", None))
self.label_17.setText(QCoreApplication.translate("Dialog", u"Endsemester:", None))
self.label_19.setText(QCoreApplication.translate("Dialog", u"Erstellsemester:", None))
self.label_16.setText(QCoreApplication.translate("Dialog", u"Fach:", None))
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
self.label_18.setText(QCoreApplication.translate("Dialog", "Dauerapp:", None))
self.label_15.setText(
QCoreApplication.translate("Dialog", "L\u00f6schbar", None)
)
self.label_11.setText(QCoreApplication.translate("Dialog", "Person:", None))
self.label_7.setText(QCoreApplication.translate("Dialog", "Appnr.:", None))
self.label_17.setText(
QCoreApplication.translate("Dialog", "Endsemester:", None)
)
self.label_19.setText(
QCoreApplication.translate("Dialog", "Erstellsemester:", None)
)
self.label_16.setText(QCoreApplication.translate("Dialog", "Fach:", None))
self.check_deletable.setText("")
self.btn_search.setText(QCoreApplication.translate("Dialog", u"Suchen", None))
self.btn_search.setText(QCoreApplication.translate("Dialog", "Suchen", None))
self.db_err_message.setText("")
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_3), QCoreApplication.translate("Dialog", u"Statistik", None))
#if QT_CONFIG(statustip)
self.search_by_signature.setStatusTip(QCoreApplication.translate("Dialog", u"Trunkierung mit * am Ende unterst\u00fctzt", None))
#endif // QT_CONFIG(statustip)
self.label_25.setText(QCoreApplication.translate("Dialog", u"Signatur", None))
self.label_26.setText(QCoreApplication.translate("Dialog", u"Titel", None))
self.label.setText(QCoreApplication.translate("Dialog", u"Suche mit Enter starten", None))
self.tabWidget_2.setTabText(
self.tabWidget_2.indexOf(self.tab_3),
QCoreApplication.translate("Dialog", "Statistik", None),
)
# if QT_CONFIG(statustip)
self.search_by_signature.setStatusTip(
QCoreApplication.translate(
"Dialog", "Trunkierung mit * am Ende unterst\u00fctzt", None
)
)
# endif // QT_CONFIG(statustip)
self.label_25.setText(QCoreApplication.translate("Dialog", "Signatur", None))
self.label_26.setText(QCoreApplication.translate("Dialog", "Titel", None))
self.label.setText(
QCoreApplication.translate("Dialog", "Suche mit Enter starten", None)
)
self.no_result.setText("")
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_4), QCoreApplication.translate("Dialog", u"Suchen", None))
self.btn_del_select_apparats.setText(QCoreApplication.translate("Dialog", u"Ausgew\u00e4hlte L\u00f6schen", None))
#if QT_CONFIG(statustip)
self.btn_notify_for_deletion.setStatusTip(QCoreApplication.translate("Dialog", u"Zeigt f\u00fcr jeden ausgew\u00e4hlten Apparat eine eMail-Vorlage an", None))
#endif // QT_CONFIG(statustip)
self.btn_notify_for_deletion.setText(QCoreApplication.translate("Dialog", u"Ausgew\u00e4hlte Benachrichtigen", None))
self.btn_extendSelection.setText(QCoreApplication.translate("Dialog", u"Ausgew\u00e4hlte Verl\u00e4ngern", None))
self.tabWidget_2.setTabText(
self.tabWidget_2.indexOf(self.tab_4),
QCoreApplication.translate("Dialog", "Suchen", None),
)
self.btn_del_select_apparats.setText(
QCoreApplication.translate("Dialog", "Ausgew\u00e4hlte L\u00f6schen", None)
)
# if QT_CONFIG(statustip)
self.btn_notify_for_deletion.setStatusTip(
QCoreApplication.translate(
"Dialog",
"Zeigt f\u00fcr jeden ausgew\u00e4hlten Apparat eine eMail-Vorlage an",
None,
)
)
# endif // QT_CONFIG(statustip)
self.btn_notify_for_deletion.setText(
QCoreApplication.translate(
"Dialog", "Ausgew\u00e4hlte Benachrichtigen", None
)
)
self.btn_extendSelection.setText(
QCoreApplication.translate(
"Dialog", "Ausgew\u00e4hlte Verl\u00e4ngern", None
)
)
___qtablewidgetitem = self.tableWidget.horizontalHeaderItem(1)
___qtablewidgetitem.setText(QCoreApplication.translate("Dialog", u"Apparatsname", None))
___qtablewidgetitem.setText(
QCoreApplication.translate("Dialog", "Apparatsname", None)
)
___qtablewidgetitem1 = self.tableWidget.horizontalHeaderItem(2)
___qtablewidgetitem1.setText(QCoreApplication.translate("Dialog", u"Apparatsnummer", None))
___qtablewidgetitem1.setText(
QCoreApplication.translate("Dialog", "Apparatsnummer", None)
)
___qtablewidgetitem2 = self.tableWidget.horizontalHeaderItem(3)
___qtablewidgetitem2.setText(QCoreApplication.translate("Dialog", u"Person", None))
___qtablewidgetitem2.setText(
QCoreApplication.translate("Dialog", "Person", None)
)
___qtablewidgetitem3 = self.tableWidget.horizontalHeaderItem(4)
___qtablewidgetitem3.setText(QCoreApplication.translate("Dialog", u"Fach", None))
___qtablewidgetitem3.setText(QCoreApplication.translate("Dialog", "Fach", None))
___qtablewidgetitem4 = self.statistics_table.horizontalHeaderItem(0)
___qtablewidgetitem4.setText(QCoreApplication.translate("Dialog", u"Semester", None))
___qtablewidgetitem4.setText(
QCoreApplication.translate("Dialog", "Semester", None)
)
___qtablewidgetitem5 = self.statistics_table.horizontalHeaderItem(1)
___qtablewidgetitem5.setText(QCoreApplication.translate("Dialog", u"Zugang", None))
___qtablewidgetitem5.setText(
QCoreApplication.translate("Dialog", "Zugang", None)
)
___qtablewidgetitem6 = self.statistics_table.horizontalHeaderItem(2)
___qtablewidgetitem6.setText(QCoreApplication.translate("Dialog", u"Abgang", None))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.statistic_table), QCoreApplication.translate("Dialog", u"Tabelle", None))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.graph_table), QCoreApplication.translate("Dialog", u"Erstellte und gel\u00f6schte Semesterapparate", None))
___qtablewidgetitem6.setText(
QCoreApplication.translate("Dialog", "Abgang", None)
)
self.tabWidget_3.setTabText(
self.tabWidget_3.indexOf(self.statistic_table),
QCoreApplication.translate("Dialog", "Tabelle", None),
)
self.tabWidget_3.setTabText(
self.tabWidget_3.indexOf(self.graph_table),
QCoreApplication.translate(
"Dialog", "Erstellte und gel\u00f6schte Semesterapparate", None
),
)
___qtablewidgetitem7 = self.book_search_result.horizontalHeaderItem(0)
___qtablewidgetitem7.setText(QCoreApplication.translate("Dialog", u"Titel", None))
___qtablewidgetitem7.setText(
QCoreApplication.translate("Dialog", "Titel", None)
)
___qtablewidgetitem8 = self.book_search_result.horizontalHeaderItem(1)
___qtablewidgetitem8.setText(QCoreApplication.translate("Dialog", u"Signatur", None))
___qtablewidgetitem8.setText(
QCoreApplication.translate("Dialog", "Signatur", None)
)
___qtablewidgetitem9 = self.book_search_result.horizontalHeaderItem(2)
___qtablewidgetitem9.setText(QCoreApplication.translate("Dialog", u"Apparat", None))
# retranslateUi
___qtablewidgetitem9.setText(
QCoreApplication.translate("Dialog", "Apparat", None)
)
# retranslateUi

View File

@@ -8,28 +8,42 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QMetaObject, Qt)
from PySide6.QtWidgets import (QCheckBox, QComboBox, QFormLayout,
QGridLayout, QHBoxLayout, QLabel, QLineEdit,
QPushButton, QSizePolicy, QSpacerItem, QTextEdit,
QToolButton, QVBoxLayout, QWidget, QWizard,
QWizardPage)
from PySide6.QtCore import QCoreApplication, QMetaObject, Qt
from PySide6.QtWidgets import (
QCheckBox,
QComboBox,
QFormLayout,
QGridLayout,
QHBoxLayout,
QLabel,
QLineEdit,
QPushButton,
QSizePolicy,
QSpacerItem,
QTextEdit,
QToolButton,
QVBoxLayout,
QWidget,
QWizard,
QWizardPage,
)
class Ui_Wizard(object):
def setupUi(self, Wizard):
if not Wizard.objectName():
Wizard.setObjectName(u"Wizard")
Wizard.setObjectName("Wizard")
Wizard.resize(564, 425)
Wizard.setSizeGripEnabled(False)
Wizard.setWizardStyle(QWizard.ClassicStyle)
Wizard.setSubTitleFormat(Qt.PlainText)
Wizard.setCurrentId(1)
self.wizardPage1 = QWizardPage()
self.wizardPage1.setObjectName(u"wizardPage1")
self.wizardPage1.setObjectName("wizardPage1")
self.verticalLayout = QVBoxLayout(self.wizardPage1)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setObjectName("verticalLayout")
self.textEdit = QTextEdit(self.wizardPage1)
self.textEdit.setObjectName(u"textEdit")
self.textEdit.setObjectName("textEdit")
self.textEdit.setEnabled(False)
self.textEdit.setFocusPolicy(Qt.NoFocus)
self.textEdit.setLineWidth(0)
@@ -40,196 +54,220 @@ class Ui_Wizard(object):
Wizard.setPage(0, self.wizardPage1)
self.wizardPage2 = QWizardPage()
self.wizardPage2.setObjectName(u"wizardPage2")
self.wizardPage2.setObjectName("wizardPage2")
self.gridLayout = QGridLayout(self.wizardPage2)
self.gridLayout.setObjectName(u"gridLayout")
self.gridLayout.setObjectName("gridLayout")
self.settings_temp = QLineEdit(self.wizardPage2)
self.settings_temp.setObjectName(u"settings_temp")
self.settings_temp.setObjectName("settings_temp")
self.settings_temp.setFocusPolicy(Qt.NoFocus)
self.settings_temp.setReadOnly(True)
self.gridLayout.addWidget(self.settings_temp, 2, 1, 1, 1)
self.label = QLabel(self.wizardPage2)
self.label.setObjectName(u"label")
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.settings_database = QLineEdit(self.wizardPage2)
self.settings_database.setObjectName(u"settings_database")
self.settings_database.setObjectName("settings_database")
self.settings_database.setFocusPolicy(Qt.NoFocus)
self.settings_database.setReadOnly(True)
self.gridLayout.addWidget(self.settings_database, 0, 1, 1, 1)
self.label_2 = QLabel(self.wizardPage2)
self.label_2.setObjectName(u"label_2")
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
self.btn_database = QToolButton(self.wizardPage2)
self.btn_database.setObjectName(u"btn_database")
self.btn_database.setObjectName("btn_database")
self.gridLayout.addWidget(self.btn_database, 0, 2, 1, 1)
self.btn_temp = QToolButton(self.wizardPage2)
self.btn_temp.setObjectName(u"btn_temp")
self.btn_temp.setObjectName("btn_temp")
self.gridLayout.addWidget(self.btn_temp, 2, 2, 1, 1)
self.label_16 = QLabel(self.wizardPage2)
self.label_16.setObjectName(u"label_16")
self.label_16.setObjectName("label_16")
self.gridLayout.addWidget(self.label_16, 1, 0, 1, 1)
self.settings_database_name = QLineEdit(self.wizardPage2)
self.settings_database_name.setObjectName(u"settings_database_name")
self.settings_database_name.setObjectName("settings_database_name")
self.gridLayout.addWidget(self.settings_database_name, 1, 1, 1, 1)
Wizard.setPage(1, self.wizardPage2)
self.wizardPage3 = QWizardPage()
self.wizardPage3.setObjectName(u"wizardPage3")
self.wizardPage3.setObjectName("wizardPage3")
self.formLayout = QFormLayout(self.wizardPage3)
self.formLayout.setObjectName(u"formLayout")
self.formLayout.setObjectName("formLayout")
self.label_3 = QLabel(self.wizardPage3)
self.label_3.setObjectName(u"label_3")
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(0, QFormLayout.ItemRole.LabelRole, self.label_3)
self.settings_mail_smtp_server = QLineEdit(self.wizardPage3)
self.settings_mail_smtp_server.setObjectName(u"settings_mail_smtp_server")
self.settings_mail_smtp_server.setObjectName("settings_mail_smtp_server")
self.settings_mail_smtp_server.setClearButtonEnabled(True)
self.formLayout.setWidget(0, QFormLayout.ItemRole.FieldRole, self.settings_mail_smtp_server)
self.formLayout.setWidget(
0, QFormLayout.ItemRole.FieldRole, self.settings_mail_smtp_server
)
self.settings_mail_smtp_port = QLineEdit(self.wizardPage3)
self.settings_mail_smtp_port.setObjectName(u"settings_mail_smtp_port")
self.settings_mail_smtp_port.setObjectName("settings_mail_smtp_port")
self.settings_mail_smtp_port.setInputMethodHints(Qt.ImhDigitsOnly)
self.settings_mail_smtp_port.setClearButtonEnabled(True)
self.formLayout.setWidget(1, QFormLayout.ItemRole.FieldRole, self.settings_mail_smtp_port)
self.formLayout.setWidget(
1, QFormLayout.ItemRole.FieldRole, self.settings_mail_smtp_port
)
self.settings_mail_user_name = QLineEdit(self.wizardPage3)
self.settings_mail_user_name.setObjectName(u"settings_mail_user_name")
self.settings_mail_user_name.setObjectName("settings_mail_user_name")
self.settings_mail_user_name.setClearButtonEnabled(True)
self.formLayout.setWidget(3, QFormLayout.ItemRole.FieldRole, self.settings_mail_user_name)
self.formLayout.setWidget(
3, QFormLayout.ItemRole.FieldRole, self.settings_mail_user_name
)
self.settings_mail_password = QLineEdit(self.wizardPage3)
self.settings_mail_password.setObjectName(u"settings_mail_password")
self.settings_mail_password.setObjectName("settings_mail_password")
self.formLayout.setWidget(4, QFormLayout.ItemRole.FieldRole, self.settings_mail_password)
self.formLayout.setWidget(
4, QFormLayout.ItemRole.FieldRole, self.settings_mail_password
)
self.label_4 = QLabel(self.wizardPage3)
self.label_4.setObjectName(u"label_4")
self.label_4.setObjectName("label_4")
self.formLayout.setWidget(3, QFormLayout.ItemRole.LabelRole, self.label_4)
self.label_5 = QLabel(self.wizardPage3)
self.label_5.setObjectName(u"label_5")
self.label_5.setObjectName("label_5")
self.formLayout.setWidget(1, QFormLayout.ItemRole.LabelRole, self.label_5)
self.label_6 = QLabel(self.wizardPage3)
self.label_6.setObjectName(u"label_6")
self.label_6.setObjectName("label_6")
self.formLayout.setWidget(4, QFormLayout.ItemRole.LabelRole, self.label_6)
self.settings_mail_use_user_name = QCheckBox(self.wizardPage3)
self.settings_mail_use_user_name.setObjectName(u"settings_mail_use_user_name")
self.settings_mail_use_user_name.setObjectName("settings_mail_use_user_name")
self.formLayout.setWidget(8, QFormLayout.ItemRole.FieldRole, self.settings_mail_use_user_name)
self.formLayout.setWidget(
8, QFormLayout.ItemRole.FieldRole, self.settings_mail_use_user_name
)
self.settings_mail_printer = QLineEdit(self.wizardPage3)
self.settings_mail_printer.setObjectName(u"settings_mail_printer")
self.settings_mail_printer.setObjectName("settings_mail_printer")
self.settings_mail_printer.setClearButtonEnabled(True)
self.formLayout.setWidget(7, QFormLayout.ItemRole.FieldRole, self.settings_mail_printer)
self.formLayout.setWidget(
7, QFormLayout.ItemRole.FieldRole, self.settings_mail_printer
)
self.label_8 = QLabel(self.wizardPage3)
self.label_8.setObjectName(u"label_8")
self.label_8.setObjectName("label_8")
self.formLayout.setWidget(7, QFormLayout.ItemRole.LabelRole, self.label_8)
self.label_9 = QLabel(self.wizardPage3)
self.label_9.setObjectName(u"label_9")
self.label_9.setObjectName("label_9")
self.formLayout.setWidget(8, QFormLayout.ItemRole.LabelRole, self.label_9)
self.settings_mail_signature = QTextEdit(self.wizardPage3)
self.settings_mail_signature.setObjectName(u"settings_mail_signature")
self.settings_mail_signature.setObjectName("settings_mail_signature")
self.formLayout.setWidget(5, QFormLayout.ItemRole.FieldRole, self.settings_mail_signature)
self.formLayout.setWidget(
5, QFormLayout.ItemRole.FieldRole, self.settings_mail_signature
)
self.label_10 = QLabel(self.wizardPage3)
self.label_10.setObjectName(u"label_10")
self.label_10.setObjectName("label_10")
self.formLayout.setWidget(5, QFormLayout.ItemRole.LabelRole, self.label_10)
self.label_7 = QLabel(self.wizardPage3)
self.label_7.setObjectName(u"label_7")
self.label_7.setObjectName("label_7")
self.formLayout.setWidget(2, QFormLayout.ItemRole.LabelRole, self.label_7)
self.settings_mail_address = QLineEdit(self.wizardPage3)
self.settings_mail_address.setObjectName(u"settings_mail_address")
self.settings_mail_address.setObjectName("settings_mail_address")
self.settings_mail_address.setClearButtonEnabled(True)
self.formLayout.setWidget(2, QFormLayout.ItemRole.FieldRole, self.settings_mail_address)
self.formLayout.setWidget(
2, QFormLayout.ItemRole.FieldRole, self.settings_mail_address
)
Wizard.setPage(2, self.wizardPage3)
self.wizardPage4 = QWizardPage()
self.wizardPage4.setObjectName(u"wizardPage4")
self.wizardPage4.setObjectName("wizardPage4")
self.formLayout_2 = QFormLayout(self.wizardPage4)
self.formLayout_2.setObjectName(u"formLayout_2")
self.formLayout_2.setObjectName("formLayout_2")
self.label_11 = QLabel(self.wizardPage4)
self.label_11.setObjectName(u"label_11")
self.label_11.setObjectName("label_11")
self.formLayout_2.setWidget(0, QFormLayout.ItemRole.LabelRole, self.label_11)
self.settings_zotero_api_key = QLineEdit(self.wizardPage4)
self.settings_zotero_api_key.setObjectName(u"settings_zotero_api_key")
self.settings_zotero_api_key.setObjectName("settings_zotero_api_key")
self.formLayout_2.setWidget(0, QFormLayout.ItemRole.FieldRole, self.settings_zotero_api_key)
self.formLayout_2.setWidget(
0, QFormLayout.ItemRole.FieldRole, self.settings_zotero_api_key
)
self.settings_zotero_library_id = QLineEdit(self.wizardPage4)
self.settings_zotero_library_id.setObjectName(u"settings_zotero_library_id")
self.settings_zotero_library_id.setObjectName("settings_zotero_library_id")
self.formLayout_2.setWidget(1, QFormLayout.ItemRole.FieldRole, self.settings_zotero_library_id)
self.formLayout_2.setWidget(
1, QFormLayout.ItemRole.FieldRole, self.settings_zotero_library_id
)
self.label_12 = QLabel(self.wizardPage4)
self.label_12.setObjectName(u"label_12")
self.label_12.setObjectName("label_12")
self.formLayout_2.setWidget(1, QFormLayout.ItemRole.LabelRole, self.label_12)
self.label_13 = QLabel(self.wizardPage4)
self.label_13.setObjectName(u"label_13")
self.label_13.setObjectName("label_13")
self.formLayout_2.setWidget(2, QFormLayout.ItemRole.LabelRole, self.label_13)
self.settings_zotero_library_type = QLineEdit(self.wizardPage4)
self.settings_zotero_library_type.setObjectName(u"settings_zotero_library_type")
self.settings_zotero_library_type.setObjectName("settings_zotero_library_type")
self.formLayout_2.setWidget(2, QFormLayout.ItemRole.FieldRole, self.settings_zotero_library_type)
self.formLayout_2.setWidget(
2, QFormLayout.ItemRole.FieldRole, self.settings_zotero_library_type
)
Wizard.setPage(3, self.wizardPage4)
self.wizardPage5 = QWizardPage()
self.wizardPage5.setObjectName(u"wizardPage5")
self.wizardPage5.setObjectName("wizardPage5")
self.formLayout_3 = QFormLayout(self.wizardPage5)
self.formLayout_3.setObjectName(u"formLayout_3")
self.formLayout_3.setObjectName("formLayout_3")
self.settings_openai_api_key = QLineEdit(self.wizardPage5)
self.settings_openai_api_key.setObjectName(u"settings_openai_api_key")
self.settings_openai_api_key.setObjectName("settings_openai_api_key")
self.formLayout_3.setWidget(0, QFormLayout.ItemRole.FieldRole, self.settings_openai_api_key)
self.formLayout_3.setWidget(
0, QFormLayout.ItemRole.FieldRole, self.settings_openai_api_key
)
self.label_14 = QLabel(self.wizardPage5)
self.label_14.setObjectName(u"label_14")
self.label_14.setObjectName("label_14")
self.formLayout_3.setWidget(0, QFormLayout.ItemRole.LabelRole, self.label_14)
self.label_15 = QLabel(self.wizardPage5)
self.label_15.setObjectName(u"label_15")
self.label_15.setObjectName("label_15")
self.formLayout_3.setWidget(1, QFormLayout.ItemRole.LabelRole, self.label_15)
@@ -241,54 +279,65 @@ class Ui_Wizard(object):
self.settings_openai_model.addItem("")
self.settings_openai_model.addItem("")
self.settings_openai_model.addItem("")
self.settings_openai_model.setObjectName(u"settings_openai_model")
self.settings_openai_model.setObjectName("settings_openai_model")
self.formLayout_3.setWidget(1, QFormLayout.ItemRole.FieldRole, self.settings_openai_model)
self.formLayout_3.setWidget(
1, QFormLayout.ItemRole.FieldRole, self.settings_openai_model
)
Wizard.setPage(9, self.wizardPage5)
self.wizardPage6 = QWizardPage()
self.wizardPage6.setObjectName(u"wizardPage6")
self.wizardPage6.setObjectName("wizardPage6")
self.formLayout_4 = QFormLayout(self.wizardPage6)
self.formLayout_4.setObjectName(u"formLayout_4")
self.formLayout_4.setObjectName("formLayout_4")
self.label_17 = QLabel(self.wizardPage6)
self.label_17.setObjectName(u"label_17")
self.label_17.setObjectName("label_17")
self.formLayout_4.setWidget(0, QFormLayout.ItemRole.LabelRole, self.label_17)
self.sam_username = QLineEdit(self.wizardPage6)
self.sam_username.setObjectName(u"sam_username")
self.sam_username.setObjectName("sam_username")
self.formLayout_4.setWidget(0, QFormLayout.ItemRole.FieldRole, self.sam_username)
self.formLayout_4.setWidget(
0, QFormLayout.ItemRole.FieldRole, self.sam_username
)
self.label_18 = QLabel(self.wizardPage6)
self.label_18.setObjectName(u"label_18")
self.label_18.setObjectName("label_18")
self.formLayout_4.setWidget(1, QFormLayout.ItemRole.LabelRole, self.label_18)
self.sam_password = QLineEdit(self.wizardPage6)
self.sam_password.setObjectName(u"sam_password")
self.sam_password.setObjectName("sam_password")
self.formLayout_4.setWidget(1, QFormLayout.ItemRole.FieldRole, self.sam_password)
self.formLayout_4.setWidget(
1, QFormLayout.ItemRole.FieldRole, self.sam_password
)
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setObjectName("horizontalLayout")
self.btn_test = QPushButton(self.wizardPage6)
self.btn_test.setObjectName(u"btn_test")
self.btn_test.setObjectName("btn_test")
self.horizontalLayout.addWidget(self.btn_test)
self.btn_create = QPushButton(self.wizardPage6)
self.btn_create.setObjectName(u"btn_create")
self.btn_create.setObjectName("btn_create")
self.btn_create.setFlat(False)
self.horizontalLayout.addWidget(self.btn_create)
self.formLayout_4.setLayout(
2, QFormLayout.ItemRole.FieldRole, self.horizontalLayout
)
self.formLayout_4.setLayout(2, QFormLayout.ItemRole.FieldRole, self.horizontalLayout)
self.verticalSpacer = QSpacerItem(
20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding
)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.formLayout_4.setItem(3, QFormLayout.ItemRole.FieldRole, self.verticalSpacer)
self.formLayout_4.setItem(
3, QFormLayout.ItemRole.FieldRole, self.verticalSpacer
)
Wizard.addPage(self.wizardPage6)
QWidget.setTabOrder(self.settings_database, self.btn_database)
@@ -296,101 +345,196 @@ class Ui_Wizard(object):
QWidget.setTabOrder(self.settings_database_name, self.settings_temp)
QWidget.setTabOrder(self.settings_temp, self.btn_temp)
QWidget.setTabOrder(self.btn_temp, self.settings_mail_smtp_server)
QWidget.setTabOrder(self.settings_mail_smtp_server, self.settings_mail_smtp_port)
QWidget.setTabOrder(
self.settings_mail_smtp_server, self.settings_mail_smtp_port
)
QWidget.setTabOrder(self.settings_mail_smtp_port, self.settings_mail_address)
QWidget.setTabOrder(self.settings_mail_address, self.settings_mail_user_name)
QWidget.setTabOrder(self.settings_mail_user_name, self.settings_mail_password)
QWidget.setTabOrder(self.settings_mail_password, self.settings_mail_signature)
QWidget.setTabOrder(self.settings_mail_signature, self.settings_mail_printer)
QWidget.setTabOrder(self.settings_mail_printer, self.settings_mail_use_user_name)
QWidget.setTabOrder(self.settings_mail_use_user_name, self.settings_zotero_api_key)
QWidget.setTabOrder(self.settings_zotero_api_key, self.settings_zotero_library_id)
QWidget.setTabOrder(self.settings_zotero_library_id, self.settings_zotero_library_type)
QWidget.setTabOrder(self.settings_zotero_library_type, self.settings_openai_api_key)
QWidget.setTabOrder(
self.settings_mail_printer, self.settings_mail_use_user_name
)
QWidget.setTabOrder(
self.settings_mail_use_user_name, self.settings_zotero_api_key
)
QWidget.setTabOrder(
self.settings_zotero_api_key, self.settings_zotero_library_id
)
QWidget.setTabOrder(
self.settings_zotero_library_id, self.settings_zotero_library_type
)
QWidget.setTabOrder(
self.settings_zotero_library_type, self.settings_openai_api_key
)
QWidget.setTabOrder(self.settings_openai_api_key, self.settings_openai_model)
self.retranslateUi(Wizard)
self.btn_create.setDefault(True)
QMetaObject.connectSlotsByName(Wizard)
# setupUi
def retranslateUi(self, Wizard):
Wizard.setWindowTitle(QCoreApplication.translate("Wizard", u"Wizard", None))
self.wizardPage1.setTitle(QCoreApplication.translate("Wizard", u"Willkommen", None))
Wizard.setWindowTitle(QCoreApplication.translate("Wizard", "Wizard", None))
self.wizardPage1.setTitle(
QCoreApplication.translate("Wizard", "Willkommen", None)
)
self.wizardPage1.setSubTitle("")
self.textEdit.setHtml(QCoreApplication.translate("Wizard", u"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"hr { height: 1px; border-width: 0; }\n"
"li.unchecked::marker { content: \"\\2610\"; }\n"
"li.checked::marker { content: \"\\2612\"; }\n"
"</style></head><body style=\" font-family:'Segoe UI'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Es wurde erkannt, dass der SemesterApparatsManager (SAM) zum ersten Mal gestartet wurde. In den Folgenden Seiten werden die grundlegenden Einstellungen festgelegt, anschlie\u00dfend wird SAM ge\u00f6ffnet. Folgende Einstellungen werden \u00fcber diesen Wizard festgelegt:</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent"
":0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- Datenbank</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- eMail</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- Zotero Integration</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- KI Integration</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Anschlie\u00dfend kann ein Nutzeraccount f\u00fcr SAM erstellt werden</p></body></html>", None))
self.wizardPage2.setTitle(QCoreApplication.translate("Wizard", u"Datenbank", None))
self.wizardPage2.setSubTitle(QCoreApplication.translate("Wizard", u"Hier werden die Einstellungen f\u00fcr die Datenbank und tempor\u00e4ren Dateien festgelegt. \u00dcber den [...] Knopf k\u00f6nnen die Speicherordner ausgew\u00e4hlt werden.", None))
self.settings_temp.setPlaceholderText(QCoreApplication.translate("Wizard", u"C:\\Users\\[Nutzer]\\AppData\\Local\\SAM\\SemesterApparatsManager\\Cache", None))
self.label.setText(QCoreApplication.translate("Wizard", u"Datenbankpfad", None))
self.textEdit.setHtml(
QCoreApplication.translate(
"Wizard",
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">\n'
'<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">\n'
"p, li { white-space: pre-wrap; }\n"
"hr { height: 1px; border-width: 0; }\n"
'li.unchecked::marker { content: "\\2610"; }\n'
'li.checked::marker { content: "\\2612"; }\n'
"</style></head><body style=\" font-family:'Segoe UI'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Es wurde erkannt, dass der SemesterApparatsManager (SAM) zum ersten Mal gestartet wurde. In den Folgenden Seiten werden die grundlegenden Einstellungen festgelegt, anschlie\u00dfend wird SAM ge\u00f6ffnet. Folgende Einstellungen werden \u00fcber diesen Wizard festgelegt:</p>\n'
'<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent'
':0; text-indent:0px;"><br /></p>\n'
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Datenbank</p>\n'
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- eMail</p>\n'
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Zotero Integration</p>\n'
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- KI Integration</p>\n'
'<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Anschlie\u00dfend kann ein Nutzeraccount f\u00fcr SAM erstellt werden</p></body></html>',
None,
)
)
self.wizardPage2.setTitle(
QCoreApplication.translate("Wizard", "Datenbank", None)
)
self.wizardPage2.setSubTitle(
QCoreApplication.translate(
"Wizard",
"Hier werden die Einstellungen f\u00fcr die Datenbank und tempor\u00e4ren Dateien festgelegt. \u00dcber den [...] Knopf k\u00f6nnen die Speicherordner ausgew\u00e4hlt werden.",
None,
)
)
self.settings_temp.setPlaceholderText(
QCoreApplication.translate(
"Wizard",
"C:\\Users\\[Nutzer]\\AppData\\Local\\SAM\\SemesterApparatsManager\\Cache",
None,
)
)
self.label.setText(QCoreApplication.translate("Wizard", "Datenbankpfad", None))
self.settings_database.setPlaceholderText("")
self.label_2.setText(QCoreApplication.translate("Wizard", u"Tempor\u00e4re Daten", None))
self.btn_database.setText(QCoreApplication.translate("Wizard", u"...", None))
self.btn_temp.setText(QCoreApplication.translate("Wizard", u"...", None))
self.label_16.setText(QCoreApplication.translate("Wizard", u"Datenbankname", None))
self.settings_database_name.setPlaceholderText(QCoreApplication.translate("Wizard", u"semesterapparate.db", None))
self.wizardPage3.setTitle(QCoreApplication.translate("Wizard", u"Mail", None))
self.wizardPage3.setSubTitle(QCoreApplication.translate("Wizard", u"Hier werden die Einstellungen f\u00fcr die Mailverbindung eingegeben", None))
self.label_3.setText(QCoreApplication.translate("Wizard", u"SMTP Server", None))
#if QT_CONFIG(tooltip)
self.settings_mail_password.setToolTip(QCoreApplication.translate("Wizard", u"Rechtsklick, um passwort anzuzeigen", None))
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(statustip)
self.label_2.setText(
QCoreApplication.translate("Wizard", "Tempor\u00e4re Daten", None)
)
self.btn_database.setText(QCoreApplication.translate("Wizard", "...", None))
self.btn_temp.setText(QCoreApplication.translate("Wizard", "...", None))
self.label_16.setText(
QCoreApplication.translate("Wizard", "Datenbankname", None)
)
self.settings_database_name.setPlaceholderText(
QCoreApplication.translate("Wizard", "semesterapparate.db", None)
)
self.wizardPage3.setTitle(QCoreApplication.translate("Wizard", "Mail", None))
self.wizardPage3.setSubTitle(
QCoreApplication.translate(
"Wizard",
"Hier werden die Einstellungen f\u00fcr die Mailverbindung eingegeben",
None,
)
)
self.label_3.setText(QCoreApplication.translate("Wizard", "SMTP Server", None))
# if QT_CONFIG(tooltip)
self.settings_mail_password.setToolTip(
QCoreApplication.translate(
"Wizard", "Rechtsklick, um passwort anzuzeigen", None
)
)
# endif // QT_CONFIG(tooltip)
# if QT_CONFIG(statustip)
self.settings_mail_password.setStatusTip("")
#endif // QT_CONFIG(statustip)
#if QT_CONFIG(whatsthis)
# endif // QT_CONFIG(statustip)
# if QT_CONFIG(whatsthis)
self.settings_mail_password.setWhatsThis("")
#endif // QT_CONFIG(whatsthis)
self.label_4.setText(QCoreApplication.translate("Wizard", u"Nutzername", None))
self.label_5.setText(QCoreApplication.translate("Wizard", u"SMTP Port", None))
self.label_6.setText(QCoreApplication.translate("Wizard", u"Passwort", None))
self.settings_mail_use_user_name.setText(QCoreApplication.translate("Wizard", u"CheckBox", None))
self.label_8.setText(QCoreApplication.translate("Wizard", u"Druckermail", None))
self.label_9.setText(QCoreApplication.translate("Wizard", u"Nutzername\n"
"f\u00fcr SMTP", None))
self.label_10.setText(QCoreApplication.translate("Wizard", u"Signatur", None))
self.label_7.setText(QCoreApplication.translate("Wizard", u"Mail Adresse", None))
self.wizardPage4.setTitle(QCoreApplication.translate("Wizard", u"Zotero", None))
self.wizardPage4.setSubTitle(QCoreApplication.translate("Wizard", u"Hier werden die Einstellungen f\u00fcr Zotero verwaltet", None))
self.label_11.setText(QCoreApplication.translate("Wizard", u"API-Key", None))
self.label_12.setText(QCoreApplication.translate("Wizard", u"ID", None))
self.label_13.setText(QCoreApplication.translate("Wizard", u"Anwendungstyp", None))
self.settings_zotero_library_type.setText(QCoreApplication.translate("Wizard", u"user", None))
self.wizardPage5.setTitle(QCoreApplication.translate("Wizard", u"KI-Integration", None))
self.wizardPage5.setSubTitle(QCoreApplication.translate("Wizard", u"Hier werden die Einstellungen f\u00fcr die KI Integration eingestellt.", None))
self.label_14.setText(QCoreApplication.translate("Wizard", u"API Key", None))
self.label_15.setText(QCoreApplication.translate("Wizard", u"ChatGPT Modell", None))
self.settings_openai_model.setItemText(0, QCoreApplication.translate("Wizard", u"gpt3.5-turbo", None))
self.settings_openai_model.setItemText(1, QCoreApplication.translate("Wizard", u"gpt-4", None))
self.settings_openai_model.setItemText(2, QCoreApplication.translate("Wizard", u"gpt-4o", None))
self.settings_openai_model.setItemText(3, QCoreApplication.translate("Wizard", u"gpt-4o-mini", None))
self.settings_openai_model.setItemText(4, QCoreApplication.translate("Wizard", u"gpt-4.1", None))
self.settings_openai_model.setItemText(5, QCoreApplication.translate("Wizard", u"gpt-4.1-mini", None))
self.settings_openai_model.setItemText(6, QCoreApplication.translate("Wizard", u"gpt-4.1-nano", None))
# endif // QT_CONFIG(whatsthis)
self.label_4.setText(QCoreApplication.translate("Wizard", "Nutzername", None))
self.label_5.setText(QCoreApplication.translate("Wizard", "SMTP Port", None))
self.label_6.setText(QCoreApplication.translate("Wizard", "Passwort", None))
self.settings_mail_use_user_name.setText(
QCoreApplication.translate("Wizard", "CheckBox", None)
)
self.label_8.setText(QCoreApplication.translate("Wizard", "Druckermail", None))
self.label_9.setText(
QCoreApplication.translate("Wizard", "Nutzername\nf\u00fcr SMTP", None)
)
self.label_10.setText(QCoreApplication.translate("Wizard", "Signatur", None))
self.label_7.setText(QCoreApplication.translate("Wizard", "Mail Adresse", None))
self.wizardPage4.setTitle(QCoreApplication.translate("Wizard", "Zotero", None))
self.wizardPage4.setSubTitle(
QCoreApplication.translate(
"Wizard",
"Hier werden die Einstellungen f\u00fcr Zotero verwaltet",
None,
)
)
self.label_11.setText(QCoreApplication.translate("Wizard", "API-Key", None))
self.label_12.setText(QCoreApplication.translate("Wizard", "ID", None))
self.label_13.setText(
QCoreApplication.translate("Wizard", "Anwendungstyp", None)
)
self.settings_zotero_library_type.setText(
QCoreApplication.translate("Wizard", "user", None)
)
self.wizardPage5.setTitle(
QCoreApplication.translate("Wizard", "KI-Integration", None)
)
self.wizardPage5.setSubTitle(
QCoreApplication.translate(
"Wizard",
"Hier werden die Einstellungen f\u00fcr die KI Integration eingestellt.",
None,
)
)
self.label_14.setText(QCoreApplication.translate("Wizard", "API Key", None))
self.label_15.setText(
QCoreApplication.translate("Wizard", "ChatGPT Modell", None)
)
self.settings_openai_model.setItemText(
0, QCoreApplication.translate("Wizard", "gpt3.5-turbo", None)
)
self.settings_openai_model.setItemText(
1, QCoreApplication.translate("Wizard", "gpt-4", None)
)
self.settings_openai_model.setItemText(
2, QCoreApplication.translate("Wizard", "gpt-4o", None)
)
self.settings_openai_model.setItemText(
3, QCoreApplication.translate("Wizard", "gpt-4o-mini", None)
)
self.settings_openai_model.setItemText(
4, QCoreApplication.translate("Wizard", "gpt-4.1", None)
)
self.settings_openai_model.setItemText(
5, QCoreApplication.translate("Wizard", "gpt-4.1-mini", None)
)
self.settings_openai_model.setItemText(
6, QCoreApplication.translate("Wizard", "gpt-4.1-nano", None)
)
self.settings_openai_model.setCurrentText(
QCoreApplication.translate("Wizard", "gpt3.5-turbo", None)
)
self.wizardPage6.setTitle(
QCoreApplication.translate("Wizard", "SAM Nutzer", None)
)
self.wizardPage6.setSubTitle(
QCoreApplication.translate(
"Wizard", "Hier kann ein Nutzer f\u00fcr SAM erstellt werden", None
)
)
self.label_17.setText(QCoreApplication.translate("Wizard", "Nutzername", None))
self.label_18.setText(QCoreApplication.translate("Wizard", "Passwort", None))
self.btn_test.setText(QCoreApplication.translate("Wizard", "Pr\u00fcfen", None))
self.btn_create.setText(QCoreApplication.translate("Wizard", "Anlegen", None))
self.settings_openai_model.setCurrentText(QCoreApplication.translate("Wizard", u"gpt3.5-turbo", None))
self.wizardPage6.setTitle(QCoreApplication.translate("Wizard", u"SAM Nutzer", None))
self.wizardPage6.setSubTitle(QCoreApplication.translate("Wizard", u"Hier kann ein Nutzer f\u00fcr SAM erstellt werden", None))
self.label_17.setText(QCoreApplication.translate("Wizard", u"Nutzername", None))
self.label_18.setText(QCoreApplication.translate("Wizard", u"Passwort", None))
self.btn_test.setText(QCoreApplication.translate("Wizard", u"Pr\u00fcfen", None))
self.btn_create.setText(QCoreApplication.translate("Wizard", u"Anlegen", None))
# retranslateUi

View File

@@ -8,40 +8,39 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QDialog, QGridLayout, QSizePolicy,
QTabWidget, QWidget)
from PySide6.QtCore import (
QCoreApplication,
QMetaObject,
)
from PySide6.QtWidgets import (
QGridLayout,
QTabWidget,
)
class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.setObjectName("Dialog")
Dialog.resize(800, 600)
self.gridLayout_2 = QGridLayout(Dialog)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.gridLayout_2.setObjectName("gridLayout_2")
self.gridLayout = QGridLayout()
self.gridLayout.setObjectName(u"gridLayout")
self.gridLayout.setObjectName("gridLayout")
self.tabs = QTabWidget(Dialog)
self.tabs.setObjectName(u"tabs")
self.tabs.setObjectName("tabs")
self.gridLayout.addWidget(self.tabs, 0, 0, 1, 1)
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
self.retranslateUi(Dialog)
QMetaObject.connectSlotsByName(Dialog)
# setupUi
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
# retranslateUi
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", "Dialog", None))
# retranslateUi

View File

@@ -2,7 +2,7 @@ import logging
import os
from wsgiref.simple_server import WSGIRequestHandler
from pyramid.config import Configurator
from flask import Flask, send_from_directory
from src import LOG_DIR
@@ -33,12 +33,16 @@ class QuietHandler(WSGIRequestHandler):
def website() -> object:
config = Configurator()
app = Flask(__name__, static_folder=os.path.join(os.getcwd(), "docs", "public"))
# Set up static file serving from the 'site/' directory
config.add_static_view(
name="/", path=os.path.join(os.getcwd(), "site"), cache_max_age=3600
)
# Serve the main index.html at root
@app.route("/")
def index():
return send_from_directory(app.static_folder, "index.html")
app = config.make_wsgi_app()
return app # type: ignore
# Serve all other static files
@app.route("/<path:path>")
def serve_static(path):
return send_from_directory(app.static_folder, path)
return app

View File

@@ -8,7 +8,9 @@ from src.database import Database
from src.shared.logging import log
def recreate_file(name: str, app_id: int, filetype: str, open_file: bool = True) -> Path:
def recreate_file(
name: str, app_id: int, filetype: str, open_file: bool = True
) -> Path:
"""
Recreate a file from the database and optionally open it.

View File

@@ -1,11 +1,13 @@
alphabet = "abcdefghijklmnopqrstuvwxyzäöüß"
alphabet = [c for c in alphabet]
from __future__ import annotations
from string import ascii_lowercase
alphabet = [c for c in ascii_lowercase]
MAX_APP_ID = 180
def name_sort(name: str, index_len: int = 8) -> str:
"""
name_to_index converts a name to an index.
"""
"""name_sort converts a name to an index."""
name = name.lower()
sort_number = []
for i, c in enumerate(name):
@@ -17,14 +19,13 @@ def name_sort(name: str, index_len: int = 8) -> str:
for i in sort_number:
res += str(i)
# get the first 8 characters
res = res[:index_len]
return res
return res[:index_len]
def app_sort(app_id: int) -> str:
if not isinstance(app_id, int):
raise ValueError("app_id must be an integer")
if app_id >= 180:
if app_id >= MAX_APP_ID:
raise ValueError("app_id must be smaller than 180")
length = 4
app_id = str(app_id)

1223
uv.lock generated

File diff suppressed because it is too large Load Diff