move files
This commit is contained in:
@@ -1,202 +0,0 @@
|
|||||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\mail_preview.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt6 UI code generator 6.3.1
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
|
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import subprocess
|
|
||||||
import tempfile
|
|
||||||
|
|
||||||
from omegaconf import OmegaConf
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
|
||||||
|
|
||||||
config = OmegaConf.load("config.yaml")
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_eMailPreview(object):
|
|
||||||
|
|
||||||
def setupUi(
|
|
||||||
self,
|
|
||||||
eMailPreview,
|
|
||||||
# app_id,
|
|
||||||
# app_name,
|
|
||||||
# app_subject,
|
|
||||||
# prof_name,
|
|
||||||
# prof_mail,
|
|
||||||
):
|
|
||||||
eMailPreview.setObjectName("eMailPreview")
|
|
||||||
eMailPreview.resize(676, 676)
|
|
||||||
self.buttonBox = QtWidgets.QDialogButtonBox(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.setObjectName("buttonBox")
|
|
||||||
self.gridLayoutWidget = QtWidgets.QWidget(eMailPreview)
|
|
||||||
self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 10, 661, 621))
|
|
||||||
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
|
|
||||||
self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
|
|
||||||
self.gridLayout.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.gridLayout.setObjectName("gridLayout")
|
|
||||||
self.label_5 = QtWidgets.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_5.setObjectName("label_5")
|
|
||||||
self.gridLayout.addWidget(self.label_5, 0, 0, 1, 1)
|
|
||||||
self.prof_name = QtWidgets.QLineEdit(self.gridLayoutWidget)
|
|
||||||
self.prof_name.setObjectName("prof_name")
|
|
||||||
self.gridLayout.addWidget(self.prof_name, 2, 2, 1, 1)
|
|
||||||
self.label_3 = QtWidgets.QLabel(self.gridLayoutWidget)
|
|
||||||
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(self.gridLayoutWidget)
|
|
||||||
self.mail_name.setObjectName("mail_name")
|
|
||||||
self.gridLayout.addWidget(self.mail_name, 1, 2, 1, 1)
|
|
||||||
self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_2.setObjectName("label_2")
|
|
||||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
|
||||||
self.label_4 = QtWidgets.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_4.setObjectName("label_4")
|
|
||||||
self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
|
|
||||||
self.mail_header = QtWidgets.QLineEdit(self.gridLayoutWidget)
|
|
||||||
self.mail_header.setObjectName("mail_header")
|
|
||||||
self.gridLayout.addWidget(self.mail_header, 3, 2, 1, 1)
|
|
||||||
self.label = QtWidgets.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
|
|
||||||
self.comboBox = QtWidgets.QComboBox(self.gridLayoutWidget)
|
|
||||||
self.comboBox.setObjectName("comboBox")
|
|
||||||
self.gridLayout.addWidget(self.comboBox, 0, 2, 1, 1)
|
|
||||||
self.mail_body = QtWidgets.QTextEdit(self.gridLayoutWidget)
|
|
||||||
self.mail_body.setObjectName("mail_body")
|
|
||||||
self.gridLayout.addWidget(self.mail_body, 5, 2, 1, 1)
|
|
||||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
|
||||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
|
||||||
self.gender_male = QtWidgets.QRadioButton(self.gridLayoutWidget)
|
|
||||||
self.gender_male.setObjectName("gender_male")
|
|
||||||
self.horizontalLayout_3.addWidget(self.gender_male)
|
|
||||||
self.gender_female = QtWidgets.QRadioButton(self.gridLayoutWidget)
|
|
||||||
self.gender_female.setObjectName("gender_female")
|
|
||||||
self.horizontalLayout_3.addWidget(self.gender_female)
|
|
||||||
self.gender_non = QtWidgets.QRadioButton(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,
|
|
||||||
)
|
|
||||||
self.horizontalLayout_3.addItem(spacerItem)
|
|
||||||
self.gridLayout.addLayout(self.horizontalLayout_3, 4, 2, 1, 1)
|
|
||||||
self.label_6 = QtWidgets.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_6.setObjectName("label_6")
|
|
||||||
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
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(eMailPreview)
|
|
||||||
# self._appid = app_id
|
|
||||||
# self._appname = app_name
|
|
||||||
# self._subject = app_subject
|
|
||||||
# self.prof_name.setText(prof_name)
|
|
||||||
# self._mail_data = ""
|
|
||||||
# self._prof_mail = prof_mail
|
|
||||||
# self.load_mail_templates()
|
|
||||||
self.comboBox.addItem("")
|
|
||||||
self.comboBox.setCurrentText("")
|
|
||||||
# self.buttonBox.accepted.connect(self.save_mail)
|
|
||||||
# self.comboBox.currentIndexChanged.connect(self.set_mail)
|
|
||||||
# self.gender_female.clicked.connect(self.set_mail)
|
|
||||||
# self.gender_male.clicked.connect(self.set_mail)
|
|
||||||
# self.gender_non.clicked.connect(self.set_mail)
|
|
||||||
|
|
||||||
def retranslateUi(self, eMailPreview):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
eMailPreview.setWindowTitle(_translate("eMailPreview", "Dialog"))
|
|
||||||
self.label_5.setText(_translate("eMailPreview", "Art"))
|
|
||||||
self.label_3.setText(_translate("eMailPreview", "Mail"))
|
|
||||||
self.label_2.setText(_translate("eMailPreview", "Prof"))
|
|
||||||
self.label_4.setText(_translate("eMailPreview", "Betreff"))
|
|
||||||
self.label.setText(_translate("eMailPreview", "eMail"))
|
|
||||||
self.gender_male.setText(_translate("eMailPreview", "M"))
|
|
||||||
self.gender_female.setText(_translate("eMailPreview", "W"))
|
|
||||||
self.gender_non.setText(_translate("eMailPreview", "Divers"))
|
|
||||||
self.label_6.setText(_translate("eMailPreview", "Geschlecht"))
|
|
||||||
|
|
||||||
# def get_greeting(self):
|
|
||||||
# if self.gender_male.isChecked():
|
|
||||||
# return "Sehr geehrter Herr"
|
|
||||||
# elif self.gender_female.isChecked():
|
|
||||||
# return "Sehr geehrte Frau"
|
|
||||||
# elif self.gender_non.isChecked():
|
|
||||||
# return "Guten Tag"
|
|
||||||
|
|
||||||
# def set_mail(self):
|
|
||||||
# email_template = self.comboBox.currentText()
|
|
||||||
# if email_template == "":
|
|
||||||
# return
|
|
||||||
# with open(f"mail_vorlagen/{email_template}", "r", encoding="utf-8") as f:
|
|
||||||
# mail_template = f.read()
|
|
||||||
# header = re.findall(r"Subject: (.*)", mail_template)
|
|
||||||
# if header:
|
|
||||||
# email_header = header[0]
|
|
||||||
# else:
|
|
||||||
# email_header = email_template.split(".eml")[0]
|
|
||||||
# self.mail_header.setText(email_header)
|
|
||||||
# self.mail_data = mail_template.split("<html>")[0]
|
|
||||||
# mail_html = mail_template.split("<html>")[1]
|
|
||||||
# mail_html = "<html>" + mail_html
|
|
||||||
# mail_html = mail_html.format(
|
|
||||||
# Profname=self.prof_name.text().split(" ")[1],
|
|
||||||
# Appname=self._appname,
|
|
||||||
# AppNr=self._appid,
|
|
||||||
# AppSubject=self._subject,
|
|
||||||
# greeting=self.get_greeting(),
|
|
||||||
# )
|
|
||||||
|
|
||||||
# self.mail_body.setHtml(mail_html)
|
|
||||||
|
|
||||||
# def load_mail_templates(self):
|
|
||||||
# mail_templates = os.listdir("mail_vorlagen")
|
|
||||||
# mail_templates = [f for f in mail_templates if f.endswith(".eml")]
|
|
||||||
# print(mail_templates)
|
|
||||||
# self.comboBox.addItems(mail_templates)
|
|
||||||
|
|
||||||
# def save_mail(self):
|
|
||||||
# # create a temporary file
|
|
||||||
# mail_header = self.mail_header.text()
|
|
||||||
# mail_body = self.mail_body.toHtml()
|
|
||||||
# mail = self.mail_data + mail_body
|
|
||||||
# mail = mail.replace("Subject:", f"Subject: {mail_header}")
|
|
||||||
# directory = config["database"]["tempdir"]
|
|
||||||
# directory = directory.replace("~", str(os.path.expanduser("~")))
|
|
||||||
# with tempfile.NamedTemporaryFile(
|
|
||||||
# mode="w", delete=False, suffix=".eml", encoding="utf-8", dir=directory
|
|
||||||
# ) as f:
|
|
||||||
# f.write(mail)
|
|
||||||
# self.mail_path = f.name
|
|
||||||
# print(self.mail_path)
|
|
||||||
# # open the file using thunderbird
|
|
||||||
# subprocess.Popen([f"{self.mail_path}"])
|
|
||||||
# # delete the file
|
|
||||||
# # os.remove(self.mail_path)
|
|
||||||
|
|
||||||
|
|
||||||
def launch():
|
|
||||||
app = QtWidgets.QApplication([])
|
|
||||||
eMailPreview = QtWidgets.QDialog()
|
|
||||||
ui = Ui_eMailPreview()
|
|
||||||
ui.setupUi(eMailPreview, "1", "Test", "Biologie", "Kirchner, Alexander")
|
|
||||||
eMailPreview.show()
|
|
||||||
app.exec()
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1">
|
|
||||||
</TS>
|
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\Semesterapparate\ui\dialogs\parsed_titles.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt6 UI code generator 6.3.1
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
|
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
|
||||||
|
|
||||||
from src.logic import AutoAdder
|
|
||||||
from src.logic.log import MyLogger
|
|
||||||
|
|
||||||
logger = MyLogger("AutoTitleAdder")
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_Form(object):
|
|
||||||
def setupUi(self, Form):
|
|
||||||
Form.setObjectName("Form")
|
|
||||||
Form.resize(402, 316)
|
|
||||||
self.frame = QtWidgets.QFrame(Form)
|
|
||||||
self.frame.setGeometry(QtCore.QRect(10, 10, 381, 41))
|
|
||||||
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
|
||||||
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
|
||||||
self.frame.setObjectName("frame")
|
|
||||||
self.horizontalLayoutWidget = QtWidgets.QWidget(self.frame)
|
|
||||||
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 381, 41))
|
|
||||||
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
|
|
||||||
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
|
|
||||||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
|
||||||
self.label = QtWidgets.QLabel(self.horizontalLayoutWidget)
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.horizontalLayout.addWidget(self.label)
|
|
||||||
self.count = QtWidgets.QLabel(self.horizontalLayoutWidget)
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setBold(True)
|
|
||||||
font.setWeight(75)
|
|
||||||
self.count.setFont(font)
|
|
||||||
self.count.setTextFormat(QtCore.Qt.TextFormat.PlainText)
|
|
||||||
self.count.setObjectName("count")
|
|
||||||
self.horizontalLayout.addWidget(self.count)
|
|
||||||
self.label_2 = QtWidgets.QLabel(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,
|
|
||||||
)
|
|
||||||
self.horizontalLayout.addItem(spacerItem)
|
|
||||||
self.frame_2 = QtWidgets.QFrame(Form)
|
|
||||||
self.frame_2.setGeometry(QtCore.QRect(10, 80, 381, 201))
|
|
||||||
self.frame_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
|
||||||
self.frame_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
|
||||||
self.frame_2.setObjectName("frame_2")
|
|
||||||
self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.frame_2)
|
|
||||||
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(0, 10, 381, 191))
|
|
||||||
self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2")
|
|
||||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2)
|
|
||||||
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
|
||||||
self.listWidget = QtWidgets.QListWidget(self.horizontalLayoutWidget_2)
|
|
||||||
self.listWidget.setObjectName("listWidget")
|
|
||||||
self.horizontalLayout_2.addWidget(self.listWidget)
|
|
||||||
self.listWidget_done = QtWidgets.QListWidget(self.horizontalLayoutWidget_2)
|
|
||||||
self.listWidget_done.setObjectName("listWidget_done")
|
|
||||||
self.horizontalLayout_2.addWidget(self.listWidget_done)
|
|
||||||
self.progressBar = QtWidgets.QProgressBar(Form)
|
|
||||||
self.progressBar.setGeometry(QtCore.QRect(10, 60, 381, 23))
|
|
||||||
self.progressBar.setProperty("value", 24)
|
|
||||||
self.progressBar.setObjectName("progressBar")
|
|
||||||
self.buttonBox = QtWidgets.QDialogButtonBox(Form)
|
|
||||||
self.buttonBox.setGeometry(QtCore.QRect(230, 290, 156, 23))
|
|
||||||
self.buttonBox.setStandardButtons(
|
|
||||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
|
||||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
|
||||||
)
|
|
||||||
self.buttonBox.setObjectName("buttonBox")
|
|
||||||
self.toolButton = QtWidgets.QToolButton(Form)
|
|
||||||
self.toolButton.setGeometry(QtCore.QRect(20, 290, 25, 19))
|
|
||||||
self.toolButton.setObjectName("toolButton")
|
|
||||||
self.signatures = []
|
|
||||||
self.prof_id = None
|
|
||||||
self.app_id = None
|
|
||||||
self.thread = QtCore.QThread()
|
|
||||||
self.toolButton.hide()
|
|
||||||
self.retranslateUi(Form)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
|
||||||
self.toolButton.clicked.connect(self.start)
|
|
||||||
# if cancel is clicked, terminate the thread
|
|
||||||
self.buttonBox.rejected.connect(self.thread_quit)
|
|
||||||
|
|
||||||
def retranslateUi(self, Form):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
Form.setWindowTitle(_translate("Form", "Form"))
|
|
||||||
self.label.setText(_translate("Form", "Es wurden"))
|
|
||||||
self.count.setText(_translate("Form", "0"))
|
|
||||||
self.label_2.setText(_translate("Form", "Signaturen gefunden."))
|
|
||||||
self.toolButton.setText(_translate("Form", "..."))
|
|
||||||
|
|
||||||
def populate_table(self):
|
|
||||||
for i in range(len(self.signatures)):
|
|
||||||
self.listWidget.addItem(QtWidgets.QListWidgetItem())
|
|
||||||
self.listWidget.item(i).setText(self.signatures[i])
|
|
||||||
self.listWidget.item(i).setToolTip("Daten werden gesammelt")
|
|
||||||
|
|
||||||
def update_progress_bar(self, value: int):
|
|
||||||
self.progressBar.setValue(value)
|
|
||||||
|
|
||||||
def thread_quit(self):
|
|
||||||
print("Terminating thread")
|
|
||||||
self.thread.terminate()
|
|
||||||
self.thread.quit()
|
|
||||||
self.thread.deleteLater()
|
|
||||||
self.thread = None
|
|
||||||
|
|
||||||
def start(self):
|
|
||||||
logger.log_info("Starting AutoAdder")
|
|
||||||
|
|
||||||
self.thread = AutoAdder(
|
|
||||||
data=self.signatures,
|
|
||||||
app_id=self.app_id,
|
|
||||||
prof_id=self.prof_id,
|
|
||||||
)
|
|
||||||
self.thread.finished.connect(self.on_completion)
|
|
||||||
self.thread.updateSignal.connect(self.update_progress_bar)
|
|
||||||
self.thread.setTextSignal.connect(self.update_lists)
|
|
||||||
self.thread.progress.connect(self.determine_progress)
|
|
||||||
self.thread.finished.connect(self.thread.quit)
|
|
||||||
self.thread.finished.connect(self.thread.deleteLater)
|
|
||||||
# self.thread.updateSignal.connect(self.update_progress_label)
|
|
||||||
# worker.finished.connect(worker.deleteLater)
|
|
||||||
|
|
||||||
self.thread.start()
|
|
||||||
|
|
||||||
def on_completion(self):
|
|
||||||
logger.log_info("AutoAdder finished")
|
|
||||||
logger.log_info("Returning data")
|
|
||||||
|
|
||||||
# create a function that closes the dialog
|
|
||||||
|
|
||||||
def determine_progress(self, signal):
|
|
||||||
# check length of listWidget
|
|
||||||
length = self.listWidget.count()
|
|
||||||
print(f"Length of listWidget: {length}")
|
|
||||||
if length == 0:
|
|
||||||
logger.log_info("AutoAdder finished")
|
|
||||||
self.buttonBox.accepted.emit()
|
|
||||||
|
|
||||||
def update_lists(self, signal):
|
|
||||||
# get text of first entry in listWidget
|
|
||||||
text = self.listWidget.item(0).text()
|
|
||||||
# remove first entry
|
|
||||||
self.listWidget.takeItem(0)
|
|
||||||
# add first entry to listWidget_done
|
|
||||||
self.listWidget_done.addItem(text)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1">
|
|
||||||
</TS>
|
|
||||||
@@ -3,14 +3,13 @@ from .ext_app import Ui_Frame as App_Ext_Window
|
|||||||
from .mail import Mail_Dialog
|
from .mail import Mail_Dialog
|
||||||
from .popup_confirm import Ui_extend_confirm as popus_confirm
|
from .popup_confirm import Ui_extend_confirm as popus_confirm
|
||||||
from .settings import Settings
|
from .settings import Settings
|
||||||
from .Ui_edit_bookdata import Ui_Dialog as edit_bookdata_ui
|
from .bookdata import BookDataUI as edit_bookdata_ui
|
||||||
from .Ui_fileparser import Ui_Dialog as fileparser_ui
|
from .fileparser import FileParserDialog as fileparser_ui
|
||||||
from .Ui_login import Ui_Dialog as login_ui
|
from .login import LoginDialog as login_ui
|
||||||
from .Ui_medianadder import Ui_Dialog as medienadder_ui
|
from .medienadder import MedienAdder as medienadder_ui
|
||||||
from .Ui_parsed_titles import Ui_Form as parsed_titles_ui
|
from .parsed_titles import ParsedTitles as parsed_titles_ui
|
||||||
from .Ui_reminder import Ui_Dialog as reminder_ui
|
from .reminder import ReminderDialog as reminder_ui
|
||||||
from .Ui_settings import Ui_Dialog as settings_ui
|
from .settings import Settings as settings_ui
|
||||||
from .Ui_new_subject import Ui_Dialog as new_subject_ui
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"ext_app",
|
"ext_app",
|
||||||
|
|||||||
@@ -116,4 +116,3 @@ if __name__ == "__main__":
|
|||||||
ui.setupUi(Dialog)
|
ui.setupUi(Dialog)
|
||||||
Dialog.show()
|
Dialog.show()
|
||||||
sys.exit(app.exec())
|
sys.exit(app.exec())
|
||||||
|
|
||||||
|
|||||||
@@ -128,5 +128,3 @@ class Ui_Dialog(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# retranslateUi
|
# retranslateUi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
37
src/ui/dialogs/bookdata.py
Normal file
37
src/ui/dialogs/bookdata.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
from .dialog_sources.Ui_edit_bookdata import Ui_Dialog
|
||||||
|
from PyQt6 import QtWidgets, QtCore
|
||||||
|
from src.logic.dataclass import BookData
|
||||||
|
|
||||||
|
class BookDataUI(QtWidgets.QDialog, Ui_Dialog):
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
super().__init__(parent)
|
||||||
|
self.setupUi(self)
|
||||||
|
|
||||||
|
|
||||||
|
def populate_fields(self, data: BookData):
|
||||||
|
self.line_author.setText(data.author)
|
||||||
|
self.line_edition.setText(data.edition)
|
||||||
|
self.line_isbn.setText(", ".join(data.isbn))
|
||||||
|
self.line_lang.setText(data.language)
|
||||||
|
self.line_link.setText(data.link)
|
||||||
|
self.line_pages.setText(data.pages)
|
||||||
|
self.line_ppn.setText(data.ppn)
|
||||||
|
self.line_publisher.setText(data.publisher)
|
||||||
|
self.line_signature.setText(data.signature)
|
||||||
|
self.line_title.setText(data.title)
|
||||||
|
self.line_year.setText(data.year)
|
||||||
|
|
||||||
|
def get_data(self) -> BookData:
|
||||||
|
return BookData(
|
||||||
|
ppn=self.line_ppn.text().strip(),
|
||||||
|
title=self.line_title.text().strip(),
|
||||||
|
signature=self.line_signature.text().strip(),
|
||||||
|
edition=self.line_edition.text().strip(),
|
||||||
|
link=self.line_link.text().strip(),
|
||||||
|
isbn=self.line_isbn.text().split(","),
|
||||||
|
author=self.line_author.text().strip(),
|
||||||
|
language=self.line_lang.text().strip(),
|
||||||
|
publisher=self.line_publisher.text().strip(),
|
||||||
|
year=self.line_year.text().strip(),
|
||||||
|
pages=self.line_pages.text().strip(),
|
||||||
|
)
|
||||||
@@ -79,5 +79,3 @@ class Ui_extend_confirm(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# retranslateUi
|
# retranslateUi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
50
src/ui/dialogs/dialog_sources/Ui_login.py
Normal file
50
src/ui/dialogs/dialog_sources/Ui_login.py
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\login.ui'
|
||||||
|
#
|
||||||
|
# Created by: PyQt6 UI code generator 6.6.1
|
||||||
|
#
|
||||||
|
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||||
|
# run again. Do not edit this file unless you know what you are doing.
|
||||||
|
|
||||||
|
|
||||||
|
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
|
class Ui_Dialog(object):
|
||||||
|
def setupUi(self, Dialog):
|
||||||
|
Dialog.setObjectName("Dialog")
|
||||||
|
Dialog.resize(218, 190)
|
||||||
|
icon = QtGui.QIcon()
|
||||||
|
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))
|
||||||
|
self.label.setObjectName("label")
|
||||||
|
self.lineEdit = QtWidgets.QLineEdit(parent=Dialog)
|
||||||
|
self.lineEdit.setGeometry(QtCore.QRect(80, 40, 113, 21))
|
||||||
|
self.lineEdit.setObjectName("lineEdit")
|
||||||
|
self.label_2 = QtWidgets.QLabel(parent=Dialog)
|
||||||
|
self.label_2.setGeometry(QtCore.QRect(20, 80, 71, 21))
|
||||||
|
self.label_2.setObjectName("label_2")
|
||||||
|
self.lineEdit_2 = QtWidgets.QLineEdit(parent=Dialog)
|
||||||
|
self.lineEdit_2.setGeometry(QtCore.QRect(80, 80, 113, 21))
|
||||||
|
self.lineEdit_2.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhSensitiveData)
|
||||||
|
self.lineEdit_2.setClearButtonEnabled(True)
|
||||||
|
self.lineEdit_2.setObjectName("lineEdit_2")
|
||||||
|
self.login_button = QtWidgets.QPushButton(parent=Dialog)
|
||||||
|
self.login_button.setGeometry(QtCore.QRect(30, 140, 76, 32))
|
||||||
|
self.login_button.setObjectName("login_button")
|
||||||
|
self.cancel_button = QtWidgets.QPushButton(parent=Dialog)
|
||||||
|
self.cancel_button.setGeometry(QtCore.QRect(120, 140, 76, 32))
|
||||||
|
self.cancel_button.setObjectName("cancel_button")
|
||||||
|
|
||||||
|
self.retranslateUi(Dialog)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||||
|
|
||||||
|
|
||||||
|
def retranslateUi(self, Dialog):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
Dialog.setWindowTitle(_translate("Dialog", "Login"))
|
||||||
|
self.label.setText(_translate("Dialog", "Username"))
|
||||||
|
self.label_2.setText(_translate("Dialog", "Password"))
|
||||||
|
self.login_button.setText(_translate("Dialog", "Login"))
|
||||||
|
self.cancel_button.setText(_translate("Dialog", "Cancel"))
|
||||||
99
src/ui/dialogs/dialog_sources/Ui_mail_preview.py
Normal file
99
src/ui/dialogs/dialog_sources/Ui_mail_preview.py
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\mail_preview.ui'
|
||||||
|
#
|
||||||
|
# Created by: PyQt6 UI code generator 6.6.1
|
||||||
|
#
|
||||||
|
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||||
|
# run again. Do not edit this file unless you know what you are doing.
|
||||||
|
|
||||||
|
|
||||||
|
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
|
class Ui_eMailPreview(object):
|
||||||
|
def setupUi(self, eMailPreview):
|
||||||
|
eMailPreview.setObjectName("eMailPreview")
|
||||||
|
eMailPreview.resize(676, 676)
|
||||||
|
icon = QtGui.QIcon()
|
||||||
|
icon.addPixmap(QtGui.QPixmap("icons/email.svg"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
|
eMailPreview.setWindowIcon(icon)
|
||||||
|
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)
|
||||||
|
self.buttonBox.setObjectName("buttonBox")
|
||||||
|
self.gridLayoutWidget = QtWidgets.QWidget(parent=eMailPreview)
|
||||||
|
self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 10, 661, 621))
|
||||||
|
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
|
||||||
|
self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
|
||||||
|
self.gridLayout.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.gridLayout.setObjectName("gridLayout")
|
||||||
|
self.label_5 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
|
||||||
|
self.label_5.setObjectName("label_5")
|
||||||
|
self.gridLayout.addWidget(self.label_5, 0, 0, 1, 1)
|
||||||
|
self.prof_name = QtWidgets.QLineEdit(parent=self.gridLayoutWidget)
|
||||||
|
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.setObjectName("label_3")
|
||||||
|
self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
|
||||||
|
self.mail_name = QtWidgets.QLineEdit(parent=self.gridLayoutWidget)
|
||||||
|
self.mail_name.setObjectName("mail_name")
|
||||||
|
self.gridLayout.addWidget(self.mail_name, 1, 2, 1, 1)
|
||||||
|
self.label_2 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
|
||||||
|
self.label_2.setObjectName("label_2")
|
||||||
|
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
||||||
|
self.label_4 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
|
||||||
|
self.label_4.setObjectName("label_4")
|
||||||
|
self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
|
||||||
|
self.mail_header = QtWidgets.QLineEdit(parent=self.gridLayoutWidget)
|
||||||
|
self.mail_header.setObjectName("mail_header")
|
||||||
|
self.gridLayout.addWidget(self.mail_header, 3, 2, 1, 1)
|
||||||
|
self.label = QtWidgets.QLabel(parent=self.gridLayoutWidget)
|
||||||
|
self.label.setObjectName("label")
|
||||||
|
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
|
||||||
|
self.comboBox = QtWidgets.QComboBox(parent=self.gridLayoutWidget)
|
||||||
|
self.comboBox.setObjectName("comboBox")
|
||||||
|
self.gridLayout.addWidget(self.comboBox, 0, 2, 1, 1)
|
||||||
|
self.mail_body = QtWidgets.QTextEdit(parent=self.gridLayoutWidget)
|
||||||
|
self.mail_body.setObjectName("mail_body")
|
||||||
|
self.gridLayout.addWidget(self.mail_body, 5, 2, 1, 1)
|
||||||
|
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
||||||
|
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||||
|
self.gender_male = QtWidgets.QRadioButton(parent=self.gridLayoutWidget)
|
||||||
|
self.gender_male.setObjectName("gender_male")
|
||||||
|
self.horizontalLayout_3.addWidget(self.gender_male)
|
||||||
|
self.gender_female = QtWidgets.QRadioButton(parent=self.gridLayoutWidget)
|
||||||
|
self.gender_female.setObjectName("gender_female")
|
||||||
|
self.horizontalLayout_3.addWidget(self.gender_female)
|
||||||
|
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)
|
||||||
|
self.horizontalLayout_3.addItem(spacerItem)
|
||||||
|
self.gridLayout.addLayout(self.horizontalLayout_3, 4, 2, 1, 1)
|
||||||
|
self.label_6 = QtWidgets.QLabel(parent=self.gridLayoutWidget)
|
||||||
|
self.label_6.setObjectName("label_6")
|
||||||
|
self.gridLayout.addWidget(self.label_6, 4, 0, 1, 1)
|
||||||
|
self.btn_okay = QtWidgets.QPushButton(parent=eMailPreview)
|
||||||
|
self.btn_okay.setGeometry(QtCore.QRect(487, 634, 75, 24))
|
||||||
|
self.btn_okay.setObjectName("btn_okay")
|
||||||
|
|
||||||
|
self.retranslateUi(eMailPreview)
|
||||||
|
self.buttonBox.accepted.connect(eMailPreview.accept) # type: ignore
|
||||||
|
self.buttonBox.rejected.connect(eMailPreview.reject) # type: ignore
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(eMailPreview)
|
||||||
|
|
||||||
|
def retranslateUi(self, eMailPreview):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
eMailPreview.setWindowTitle(_translate("eMailPreview", "eMail Voransicht"))
|
||||||
|
self.label_5.setText(_translate("eMailPreview", "Art"))
|
||||||
|
self.label_3.setText(_translate("eMailPreview", "Mail"))
|
||||||
|
self.label_2.setText(_translate("eMailPreview", "Prof"))
|
||||||
|
self.label_4.setText(_translate("eMailPreview", "Betreff"))
|
||||||
|
self.label.setText(_translate("eMailPreview", "eMail"))
|
||||||
|
self.gender_male.setText(_translate("eMailPreview", "M"))
|
||||||
|
self.gender_female.setText(_translate("eMailPreview", "W"))
|
||||||
|
self.gender_non.setText(_translate("eMailPreview", "Divers"))
|
||||||
|
self.label_6.setText(_translate("eMailPreview", "Geschlecht"))
|
||||||
|
self.btn_okay.setText(_translate("eMailPreview", "Senden"))
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\Semesterapparate\ui\dialogs\medianadder.ui'
|
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\medianadder.ui'
|
||||||
#
|
#
|
||||||
# Created by: PyQt6 UI code generator 6.3.1
|
# Created by: PyQt6 UI code generator 6.6.1
|
||||||
#
|
#
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
# run again. Do not edit this file unless you know what you are doing.
|
||||||
@@ -13,50 +13,44 @@ class Ui_Dialog(object):
|
|||||||
def setupUi(self, Dialog):
|
def setupUi(self, Dialog):
|
||||||
Dialog.setObjectName("Dialog")
|
Dialog.setObjectName("Dialog")
|
||||||
Dialog.resize(637, 491)
|
Dialog.resize(637, 491)
|
||||||
self.label = QtWidgets.QLabel(Dialog)
|
icon = QtGui.QIcon()
|
||||||
|
icon.addPixmap(QtGui.QPixmap("c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\dialogs\\../../../../../Desktop/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))
|
self.label.setGeometry(QtCore.QRect(20, 10, 47, 21))
|
||||||
self.label.setObjectName("label")
|
self.label.setObjectName("label")
|
||||||
self.label_2 = QtWidgets.QLabel(Dialog)
|
self.label_2 = QtWidgets.QLabel(parent=Dialog)
|
||||||
self.label_2.setGeometry(QtCore.QRect(20, 40, 47, 21))
|
self.label_2.setGeometry(QtCore.QRect(20, 40, 47, 21))
|
||||||
self.label_2.setObjectName("label_2")
|
self.label_2.setObjectName("label_2")
|
||||||
self.comboBox = QtWidgets.QComboBox(Dialog)
|
self.comboBox = QtWidgets.QComboBox(parent=Dialog)
|
||||||
self.comboBox.setGeometry(QtCore.QRect(70, 40, 69, 22))
|
self.comboBox.setGeometry(QtCore.QRect(70, 40, 69, 22))
|
||||||
self.comboBox.setObjectName("comboBox")
|
self.comboBox.setObjectName("comboBox")
|
||||||
self.comboBox.addItem("")
|
self.comboBox.addItem("")
|
||||||
self.comboBox.addItem("")
|
self.comboBox.addItem("")
|
||||||
self.comboBox.addItem("")
|
self.comboBox.addItem("")
|
||||||
self.comboBox.addItem("")
|
self.comboBox.addItem("")
|
||||||
self.lineEdit = QtWidgets.QLineEdit(Dialog)
|
self.lineEdit = QtWidgets.QLineEdit(parent=Dialog)
|
||||||
self.lineEdit.setGeometry(QtCore.QRect(70, 10, 113, 20))
|
self.lineEdit.setGeometry(QtCore.QRect(70, 10, 113, 20))
|
||||||
self.lineEdit.setObjectName("lineEdit")
|
self.lineEdit.setObjectName("lineEdit")
|
||||||
self.label_3 = QtWidgets.QLabel(Dialog)
|
self.label_3 = QtWidgets.QLabel(parent=Dialog)
|
||||||
self.label_3.setGeometry(QtCore.QRect(20, 70, 47, 21))
|
self.label_3.setGeometry(QtCore.QRect(20, 70, 47, 21))
|
||||||
self.label_3.setObjectName("label_3")
|
self.label_3.setObjectName("label_3")
|
||||||
self.widget = QtWidgets.QWidget(Dialog)
|
self.widget = QtWidgets.QWidget(parent=Dialog)
|
||||||
self.widget.setGeometry(QtCore.QRect(330, 90, 301, 341))
|
self.widget.setGeometry(QtCore.QRect(330, 90, 301, 341))
|
||||||
self.widget.setObjectName("widget")
|
self.widget.setObjectName("widget")
|
||||||
self.treeWidget = QtWidgets.QTreeWidget(self.widget)
|
self.treeWidget = QtWidgets.QTreeWidget(parent=self.widget)
|
||||||
self.treeWidget.setEnabled(True)
|
self.treeWidget.setEnabled(True)
|
||||||
self.treeWidget.setGeometry(QtCore.QRect(0, 0, 301, 341))
|
self.treeWidget.setGeometry(QtCore.QRect(0, 0, 301, 341))
|
||||||
|
self.treeWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.treeWidget.setAutoFillBackground(False)
|
self.treeWidget.setAutoFillBackground(False)
|
||||||
self.treeWidget.setLineWidth(0)
|
self.treeWidget.setLineWidth(0)
|
||||||
self.treeWidget.setMidLineWidth(0)
|
self.treeWidget.setMidLineWidth(0)
|
||||||
self.treeWidget.setVerticalScrollBarPolicy(
|
self.treeWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
||||||
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
|
self.treeWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
||||||
)
|
self.treeWidget.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
||||||
self.treeWidget.setHorizontalScrollBarPolicy(
|
self.treeWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||||
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
|
|
||||||
)
|
|
||||||
self.treeWidget.setSizeAdjustPolicy(
|
|
||||||
QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents
|
|
||||||
)
|
|
||||||
self.treeWidget.setEditTriggers(
|
|
||||||
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
|
|
||||||
)
|
|
||||||
self.treeWidget.setAlternatingRowColors(True)
|
self.treeWidget.setAlternatingRowColors(True)
|
||||||
self.treeWidget.setSelectionMode(
|
self.treeWidget.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.NoSelection)
|
||||||
QtWidgets.QAbstractItemView.SelectionMode.NoSelection
|
|
||||||
)
|
|
||||||
self.treeWidget.setTextElideMode(QtCore.Qt.TextElideMode.ElideMiddle)
|
self.treeWidget.setTextElideMode(QtCore.Qt.TextElideMode.ElideMiddle)
|
||||||
self.treeWidget.setUniformRowHeights(True)
|
self.treeWidget.setUniformRowHeights(True)
|
||||||
self.treeWidget.setItemsExpandable(False)
|
self.treeWidget.setItemsExpandable(False)
|
||||||
@@ -83,46 +77,50 @@ class Ui_Dialog(object):
|
|||||||
item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget)
|
item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget)
|
||||||
item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget)
|
item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget)
|
||||||
self.treeWidget.header().setCascadingSectionResizes(False)
|
self.treeWidget.header().setCascadingSectionResizes(False)
|
||||||
self.treeWidget.header().setDefaultSectionSize(60)
|
self.treeWidget.header().setDefaultSectionSize(96)
|
||||||
self.treeWidget.header().setHighlightSections(False)
|
self.treeWidget.header().setHighlightSections(False)
|
||||||
self.treeWidget.header().setMinimumSectionSize(20)
|
self.treeWidget.header().setMinimumSectionSize(20)
|
||||||
self.listWidget = QtWidgets.QListWidget(Dialog)
|
self.treeWidget.header().setStretchLastSection(False)
|
||||||
|
self.listWidget = QtWidgets.QListWidget(parent=Dialog)
|
||||||
self.listWidget.setGeometry(QtCore.QRect(10, 90, 281, 341))
|
self.listWidget.setGeometry(QtCore.QRect(10, 90, 281, 341))
|
||||||
self.listWidget.setContextMenuPolicy(
|
self.listWidget.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
||||||
QtCore.Qt.ContextMenuPolicy.CustomContextMenu
|
|
||||||
)
|
|
||||||
self.listWidget.setObjectName("listWidget")
|
self.listWidget.setObjectName("listWidget")
|
||||||
self.label_4 = QtWidgets.QLabel(Dialog)
|
self.label_4 = QtWidgets.QLabel(parent=Dialog)
|
||||||
self.label_4.setGeometry(QtCore.QRect(330, 50, 181, 21))
|
self.label_4.setGeometry(QtCore.QRect(330, 50, 181, 21))
|
||||||
self.label_4.setObjectName("label_4")
|
self.label_4.setObjectName("label_4")
|
||||||
self.label_5 = QtWidgets.QLabel(Dialog)
|
self.label_5 = QtWidgets.QLabel(parent=Dialog)
|
||||||
self.label_5.setGeometry(QtCore.QRect(200, 70, 41, 21))
|
self.label_5.setGeometry(QtCore.QRect(200, 70, 41, 21))
|
||||||
self.label_5.setObjectName("label_5")
|
self.label_5.setObjectName("label_5")
|
||||||
self.list_amount = QtWidgets.QLabel(Dialog)
|
self.list_amount = QtWidgets.QLabel(parent=Dialog)
|
||||||
self.list_amount.setGeometry(QtCore.QRect(240, 70, 47, 21))
|
self.list_amount.setGeometry(QtCore.QRect(240, 70, 47, 21))
|
||||||
self.list_amount.setObjectName("list_amount")
|
self.list_amount.setObjectName("list_amount")
|
||||||
self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
|
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
|
||||||
self.buttonBox.setGeometry(QtCore.QRect(10, 450, 156, 23))
|
self.buttonBox.setGeometry(QtCore.QRect(10, 450, 156, 23))
|
||||||
self.buttonBox.setStandardButtons(
|
self.buttonBox.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
|
||||||
)
|
|
||||||
self.buttonBox.setCenterButtons(False)
|
self.buttonBox.setCenterButtons(False)
|
||||||
self.buttonBox.setObjectName("buttonBox")
|
self.buttonBox.setObjectName("buttonBox")
|
||||||
self.buttonBox.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
|
self.l_add = QtWidgets.QPushButton(parent=Dialog)
|
||||||
# self.buttonBox.accepted.disconnect()
|
self.l_add.setGeometry(QtCore.QRect(190, 10, 21, 23))
|
||||||
# set the activation action for the buttonBox to be shift enter
|
self.l_add.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
|
||||||
self.buttonBox.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
self.l_add.setText("")
|
||||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
icon1 = QtGui.QIcon()
|
||||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
icon1.addPixmap(QtGui.QPixmap(":/information/icons/information.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
|
self.l_add.setIcon(icon1)
|
||||||
|
self.l_add.setAutoDefault(False)
|
||||||
|
self.l_add.setObjectName("l_add")
|
||||||
|
|
||||||
self.lineEdit.returnPressed.connect(self.add_to_list)
|
|
||||||
self.retranslateUi(Dialog)
|
self.retranslateUi(Dialog)
|
||||||
|
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||||
|
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||||
|
Dialog.setTabOrder(self.lineEdit, self.comboBox)
|
||||||
|
Dialog.setTabOrder(self.comboBox, self.listWidget)
|
||||||
|
Dialog.setTabOrder(self.listWidget, self.treeWidget)
|
||||||
|
|
||||||
def retranslateUi(self, Dialog):
|
def retranslateUi(self, Dialog):
|
||||||
_translate = QtCore.QCoreApplication.translate
|
_translate = QtCore.QCoreApplication.translate
|
||||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
Dialog.setWindowTitle(_translate("Dialog", "Medien"))
|
||||||
self.label.setText(_translate("Dialog", "Signatur"))
|
self.label.setText(_translate("Dialog", "Signatur"))
|
||||||
self.label_2.setText(_translate("Dialog", "Modus"))
|
self.label_2.setText(_translate("Dialog", "Modus"))
|
||||||
self.comboBox.setItemText(0, _translate("Dialog", "ARRAY"))
|
self.comboBox.setItemText(0, _translate("Dialog", "ARRAY"))
|
||||||
@@ -131,9 +129,7 @@ class Ui_Dialog(object):
|
|||||||
self.comboBox.setItemText(3, _translate("Dialog", "RIS"))
|
self.comboBox.setItemText(3, _translate("Dialog", "RIS"))
|
||||||
self.lineEdit.setPlaceholderText(_translate("Dialog", "Signatur / ISBN"))
|
self.lineEdit.setPlaceholderText(_translate("Dialog", "Signatur / ISBN"))
|
||||||
self.label_3.setText(_translate("Dialog", "Queue"))
|
self.label_3.setText(_translate("Dialog", "Queue"))
|
||||||
self.treeWidget.headerItem().setText(
|
self.treeWidget.headerItem().setText(0, _translate("Dialog", "Datensatz\\Metadata"))
|
||||||
0, _translate("Dialog", "Datensatz\\Metadata")
|
|
||||||
)
|
|
||||||
self.treeWidget.headerItem().setText(1, _translate("Dialog", "Array"))
|
self.treeWidget.headerItem().setText(1, _translate("Dialog", "Array"))
|
||||||
self.treeWidget.headerItem().setText(2, _translate("Dialog", "BibTeX"))
|
self.treeWidget.headerItem().setText(2, _translate("Dialog", "BibTeX"))
|
||||||
self.treeWidget.headerItem().setText(3, _translate("Dialog", "COinS"))
|
self.treeWidget.headerItem().setText(3, _translate("Dialog", "COinS"))
|
||||||
@@ -199,42 +195,5 @@ class Ui_Dialog(object):
|
|||||||
self.label_4.setText(_translate("Dialog", "Belegbare Felder per Anbieter"))
|
self.label_4.setText(_translate("Dialog", "Belegbare Felder per Anbieter"))
|
||||||
self.label_5.setText(_translate("Dialog", "Anzahl:"))
|
self.label_5.setText(_translate("Dialog", "Anzahl:"))
|
||||||
self.list_amount.setText(_translate("Dialog", "0"))
|
self.list_amount.setText(_translate("Dialog", "0"))
|
||||||
self.recolorize()
|
self.l_add.setToolTip(_translate("Dialog", "Clicken oder Shift Enter drücken um den Eintrag hinzuzufügen"))
|
||||||
self.listWidget.customContextMenuRequested.connect(self.custom_context_menu)
|
self.l_add.setShortcut(_translate("Dialog", "Shift+Return"))
|
||||||
|
|
||||||
def add_to_list(self):
|
|
||||||
text = self.lineEdit.text().strip()
|
|
||||||
if text == "":
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
self.listWidget.addItem(text)
|
|
||||||
self.list_amount.setText(str(self.listWidget.count()))
|
|
||||||
self.lineEdit.clear()
|
|
||||||
|
|
||||||
def recolorize(self):
|
|
||||||
# set the color of the cells of the treeWidget to red if the field is not supported by the provider
|
|
||||||
# else set it to green
|
|
||||||
for i in range(self.treeWidget.topLevelItemCount()):
|
|
||||||
for j in range(1, self.treeWidget.columnCount()):
|
|
||||||
if self.treeWidget.topLevelItem(i).text(j) == "0":
|
|
||||||
self.treeWidget.topLevelItem(i).setBackground(
|
|
||||||
j, QtGui.QColor(255, 0, 0)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.treeWidget.topLevelItem(i).setBackground(
|
|
||||||
j, QtGui.QColor(0, 255, 0)
|
|
||||||
)
|
|
||||||
# remove the text from the cells
|
|
||||||
self.treeWidget.topLevelItem(i).setText(j, "")
|
|
||||||
|
|
||||||
def custom_context_menu(self):
|
|
||||||
menu = QtWidgets.QMenu()
|
|
||||||
menu.addAction("Remove")
|
|
||||||
|
|
||||||
action = menu.exec(QtGui.QCursor.pos())
|
|
||||||
if action.text() == "Remove":
|
|
||||||
self.remove_from_list()
|
|
||||||
|
|
||||||
def remove_from_list(self):
|
|
||||||
self.listWidget.takeItem(self.listWidget.currentRow())
|
|
||||||
self.list_amount.setText(str(self.listWidget.count()))
|
|
||||||
81
src/ui/dialogs/dialog_sources/Ui_parsed_titles.py
Normal file
81
src/ui/dialogs/dialog_sources/Ui_parsed_titles.py
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\parsed_titles.ui'
|
||||||
|
#
|
||||||
|
# Created by: PyQt6 UI code generator 6.6.1
|
||||||
|
#
|
||||||
|
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||||
|
# run again. Do not edit this file unless you know what you are doing.
|
||||||
|
|
||||||
|
|
||||||
|
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
|
class Ui_Form(object):
|
||||||
|
def setupUi(self, Form):
|
||||||
|
Form.setObjectName("Form")
|
||||||
|
Form.resize(402, 316)
|
||||||
|
self.frame = QtWidgets.QFrame(parent=Form)
|
||||||
|
self.frame.setGeometry(QtCore.QRect(10, 10, 381, 41))
|
||||||
|
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||||
|
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||||
|
self.frame.setObjectName("frame")
|
||||||
|
self.horizontalLayoutWidget = QtWidgets.QWidget(parent=self.frame)
|
||||||
|
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 381, 41))
|
||||||
|
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
|
||||||
|
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
|
||||||
|
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||||
|
self.label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget)
|
||||||
|
self.label.setObjectName("label")
|
||||||
|
self.horizontalLayout.addWidget(self.label)
|
||||||
|
self.count = QtWidgets.QLabel(parent=self.horizontalLayoutWidget)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.count.setFont(font)
|
||||||
|
self.count.setTextFormat(QtCore.Qt.TextFormat.PlainText)
|
||||||
|
self.count.setObjectName("count")
|
||||||
|
self.horizontalLayout.addWidget(self.count)
|
||||||
|
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)
|
||||||
|
self.horizontalLayout.addItem(spacerItem)
|
||||||
|
self.frame_2 = QtWidgets.QFrame(parent=Form)
|
||||||
|
self.frame_2.setGeometry(QtCore.QRect(10, 80, 381, 201))
|
||||||
|
self.frame_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||||
|
self.frame_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||||
|
self.frame_2.setObjectName("frame_2")
|
||||||
|
self.horizontalLayoutWidget_2 = QtWidgets.QWidget(parent=self.frame_2)
|
||||||
|
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(0, 10, 381, 191))
|
||||||
|
self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2")
|
||||||
|
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2)
|
||||||
|
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||||
|
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.setObjectName("listWidget_done")
|
||||||
|
self.horizontalLayout_2.addWidget(self.listWidget_done)
|
||||||
|
self.progressBar = QtWidgets.QProgressBar(parent=Form)
|
||||||
|
self.progressBar.setGeometry(QtCore.QRect(10, 60, 381, 23))
|
||||||
|
self.progressBar.setProperty("value", 24)
|
||||||
|
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.setObjectName("buttonBox")
|
||||||
|
self.toolButton = QtWidgets.QToolButton(parent=Form)
|
||||||
|
self.toolButton.setGeometry(QtCore.QRect(20, 290, 25, 19))
|
||||||
|
self.toolButton.setObjectName("toolButton")
|
||||||
|
|
||||||
|
self.retranslateUi(Form)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||||
|
|
||||||
|
def retranslateUi(self, Form):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
Form.setWindowTitle(_translate("Form", "Form"))
|
||||||
|
self.label.setText(_translate("Form", "Es wurden"))
|
||||||
|
self.count.setText(_translate("Form", "0"))
|
||||||
|
self.label_2.setText(_translate("Form", "Signaturen gefunden."))
|
||||||
|
self.toolButton.setText(_translate("Form", "..."))
|
||||||
0
src/ui/dialogs/dialog_sources/__init__.py
Normal file
0
src/ui/dialogs/dialog_sources/__init__.py
Normal file
@@ -11,24 +11,12 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Login</string>
|
||||||
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset resource="../../../../resources.qrc">
|
||||||
|
<normaloff>:/icons/resources/1f510.svg</normaloff>:/icons/resources/1f510.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>30</x>
|
|
||||||
<y>140</y>
|
|
||||||
<width>161</width>
|
|
||||||
<height>32</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
@@ -81,40 +69,35 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="login_button">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>140</y>
|
||||||
|
<width>76</width>
|
||||||
|
<height>32</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Login</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="cancel_button">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>120</x>
|
||||||
|
<y>140</y>
|
||||||
|
<width>76</width>
|
||||||
|
<height>32</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Cancel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources>
|
||||||
<connections>
|
<include location="../../../../resources.qrc"/>
|
||||||
<connection>
|
</resources>
|
||||||
<sender>buttonBox</sender>
|
<connections/>
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>Dialog</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>248</x>
|
|
||||||
<y>254</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>Dialog</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>316</x>
|
|
||||||
<y>260</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>286</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
</ui>
|
||||||
@@ -11,7 +11,11 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>eMail Voransicht</string>
|
||||||
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>../../icons/email.svg</normaloff>../../icons/email.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
@@ -26,7 +30,7 @@
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::Cancel</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="gridLayoutWidget">
|
<widget class="QWidget" name="gridLayoutWidget">
|
||||||
@@ -139,8 +143,23 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="btn_okay">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>487</x>
|
||||||
|
<y>634</y>
|
||||||
|
<width>75</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Senden</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../../../../resources.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>buttonBox</sender>
|
<sender>buttonBox</sender>
|
||||||
@@ -11,7 +11,11 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Medien</string>
|
||||||
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset resource="../../../resources.qrc">
|
||||||
|
<normaloff>:/icons/resources/2795.svg</normaloff>:/icons/resources/2795.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
@@ -161,15 +165,15 @@
|
|||||||
<attribute name="headerCascadingSectionResizes">
|
<attribute name="headerCascadingSectionResizes">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="headerMinimumSectionSize">
|
||||||
|
<number>20</number>
|
||||||
|
</attribute>
|
||||||
<attribute name="headerDefaultSectionSize">
|
<attribute name="headerDefaultSectionSize">
|
||||||
<number>96</number>
|
<number>96</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="headerHighlightSections">
|
<attribute name="headerHighlightSections">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="headerMinimumSectionSize">
|
|
||||||
<number>20</number>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="headerStretchLastSection">
|
<attribute name="headerStretchLastSection">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
@@ -500,7 +504,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../resources.qrc">
|
<iconset>
|
||||||
<normaloff>:/information/icons/information.png</normaloff>:/information/icons/information.png</iconset>
|
<normaloff>:/information/icons/information.png</normaloff>:/information/icons/information.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
@@ -518,7 +522,7 @@
|
|||||||
<tabstop>treeWidget</tabstop>
|
<tabstop>treeWidget</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../resources.qrc"/>
|
<include location="../../../resources.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
@@ -55,4 +55,3 @@ if __name__ == "__main__":
|
|||||||
ui.setupUi(Frame)
|
ui.setupUi(Frame)
|
||||||
Frame.show()
|
Frame.show()
|
||||||
sys.exit(app.exec())
|
sys.exit(app.exec())
|
||||||
|
|
||||||
|
|||||||
46
src/ui/dialogs/fileparser.py
Normal file
46
src/ui/dialogs/fileparser.py
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
from PyQt6.QtCore import Qt
|
||||||
|
from .dialog_sources.Ui_fileparser import Ui_Dialog
|
||||||
|
from PyQt6 import QtWidgets
|
||||||
|
from src.logic.webrequest import BibTextTransformer, WebRequest
|
||||||
|
|
||||||
|
class FileParserDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||||
|
def __init__(self, parent: None) -> None:
|
||||||
|
super().__init__(parent)
|
||||||
|
self.setupUi(self)
|
||||||
|
self.signatures = []
|
||||||
|
self.returned = []
|
||||||
|
def moveToThread(self, thread):
|
||||||
|
self.progressBar.moveToThread(thread)
|
||||||
|
self.frame.moveToThread(thread)
|
||||||
|
self.horizontalLayoutWidget.moveToThread(thread)
|
||||||
|
self.horizontalLayout.moveToThread(thread)
|
||||||
|
self.label.moveToThread(thread)
|
||||||
|
self.count.moveToThread(thread)
|
||||||
|
self.label_2.moveToThread(thread)
|
||||||
|
self.frame_2.moveToThread(thread)
|
||||||
|
self.listWidget.moveToThread(thread)
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
for signature in self.signatures:
|
||||||
|
self.count.setText(str(self.signatures.index(signature) + 1))
|
||||||
|
self.listWidget.addItem(signature)
|
||||||
|
webdata = WebRequest().get_ppn(signature).get_data()
|
||||||
|
bookdata = BibTextTransformer("ARRAY").get_data(webdata).return_data()
|
||||||
|
self.returned.append(bookdata)
|
||||||
|
self.progressBar.setValue(self.signatures.index(signature) + 1)
|
||||||
|
# self.data_gathering_complete.emit()
|
||||||
|
|
||||||
|
def deleteLater(self):
|
||||||
|
self.progressBar.deleteLater()
|
||||||
|
self.frame.deleteLater()
|
||||||
|
self.horizontalLayoutWidget.deleteLater()
|
||||||
|
self.horizontalLayout.deleteLater()
|
||||||
|
self.label.deleteLater()
|
||||||
|
self.count.deleteLater()
|
||||||
|
self.label_2.deleteLater()
|
||||||
|
self.frame_2.deleteLater()
|
||||||
|
self.listWidget.deleteLater()
|
||||||
|
self.signatures = []
|
||||||
|
self.returned = []
|
||||||
|
self.retranslateUi.deleteLater()
|
||||||
|
super().deleteLater()
|
||||||
@@ -1,24 +1,17 @@
|
|||||||
# Form implementation generated from reading ui file '/home/alexander/GitHub/Semesterapparate/ui/dialogs/login.ui'
|
from .dialog_sources.Ui_login import Ui_Dialog
|
||||||
#
|
|
||||||
# Created by: PyQt6 UI code generator 6.5.3
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
|
|
||||||
|
|
||||||
import hashlib
|
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtWidgets
|
|
||||||
|
|
||||||
from src.backend.admin_console import AdminCommands
|
from src.backend.admin_console import AdminCommands
|
||||||
from src.backend.database import Database
|
from src.backend.database import Database
|
||||||
|
import hashlib
|
||||||
|
from PyQt6 import QtCore, QtWidgets, QtGui
|
||||||
|
|
||||||
|
class LoginDialog(Ui_Dialog):
|
||||||
class Ui_Dialog(object):
|
|
||||||
def setupUi(self, Dialog):
|
def setupUi(self, Dialog):
|
||||||
Dialog.setObjectName("Dialog")
|
Dialog.setObjectName("Dialog")
|
||||||
Dialog.resize(218, 190)
|
Dialog.resize(218, 190)
|
||||||
self.dialog = Dialog
|
self.dialog = Dialog
|
||||||
|
icon = QtGui.QIcon()
|
||||||
|
icon.addPixmap(QtGui.QPixmap("icons/locked.svg"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
|
Dialog.setWindowIcon(icon)
|
||||||
self.login_button = QtWidgets.QPushButton(parent=Dialog)
|
self.login_button = QtWidgets.QPushButton(parent=Dialog)
|
||||||
self.login_button.setGeometry(QtCore.QRect(30, 140, 76, 32))
|
self.login_button.setGeometry(QtCore.QRect(30, 140, 76, 32))
|
||||||
self.login_button.setObjectName("login_button")
|
self.login_button.setObjectName("login_button")
|
||||||
@@ -55,7 +48,7 @@ class Ui_Dialog(object):
|
|||||||
self.lresult = -1
|
self.lresult = -1
|
||||||
self.lusername = ""
|
self.lusername = ""
|
||||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||||
|
Dialog.setWindowTitle("Login")
|
||||||
def retranslateUi(self, Dialog):
|
def retranslateUi(self, Dialog):
|
||||||
_translate = QtCore.QCoreApplication.translate
|
_translate = QtCore.QCoreApplication.translate
|
||||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||||
@@ -98,16 +91,3 @@ class Ui_Dialog(object):
|
|||||||
|
|
||||||
def cancel_buttonfn(self):
|
def cancel_buttonfn(self):
|
||||||
self.dialog.reject()
|
self.dialog.reject()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
import sys
|
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
|
||||||
Dialog = QtWidgets.QDialog()
|
|
||||||
ui = Ui_Dialog()
|
|
||||||
ui.setupUi(Dialog)
|
|
||||||
Dialog.show()
|
|
||||||
sys.exit(app.exec())
|
|
||||||
|
|
||||||
|
|
||||||
@@ -4,7 +4,7 @@ import sys
|
|||||||
from omegaconf import OmegaConf
|
from omegaconf import OmegaConf
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from src.ui.dialogs.Ui_mail_preview import Ui_eMailPreview as Ui_Dialog
|
from .dialog_sources.Ui_mail_preview import Ui_eMailPreview as Ui_Dialog
|
||||||
|
|
||||||
config = OmegaConf.load("config.yaml")
|
config = OmegaConf.load("config.yaml")
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ class Mail_Dialog(QtWidgets.QDialog, Ui_Dialog):
|
|||||||
prof_name,
|
prof_name,
|
||||||
prof_mail,
|
prof_mail,
|
||||||
parent=None,
|
parent=None,
|
||||||
default_mail="Information zum Semesterapparat {AppNr} - {AppName}.eml",
|
default_mail="Information zum Semesterapparat",
|
||||||
):
|
):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.setupUi(
|
self.setupUi(
|
||||||
@@ -39,14 +39,7 @@ class Mail_Dialog(QtWidgets.QDialog, Ui_Dialog):
|
|||||||
self.mail_name.setText(self.prof_mail)
|
self.mail_name.setText(self.prof_mail)
|
||||||
self.load_mail_templates()
|
self.load_mail_templates()
|
||||||
# if none of the radio buttons is checked, disable the accept button of the dialog
|
# if none of the radio buttons is checked, disable the accept button of the dialog
|
||||||
if (
|
self.btn_okay.setEnabled(False)
|
||||||
self.gender_female.isChecked()
|
|
||||||
or self.gender_male.isChecked()
|
|
||||||
or self.gender_male.isChecked()
|
|
||||||
):
|
|
||||||
self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True)
|
|
||||||
else:
|
|
||||||
self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(False)
|
|
||||||
|
|
||||||
if default_mail is not None:
|
if default_mail is not None:
|
||||||
# get the nearest match to the default mail
|
# get the nearest match to the default mail
|
||||||
@@ -78,10 +71,13 @@ class Mail_Dialog(QtWidgets.QDialog, Ui_Dialog):
|
|||||||
def get_greeting(self):
|
def get_greeting(self):
|
||||||
prof = self.profname
|
prof = self.profname
|
||||||
if self.gender_male.isChecked():
|
if self.gender_male.isChecked():
|
||||||
|
self.btn_okay.setEnabled(True)
|
||||||
return f"Sehr geehrter Herr {prof.split(' ')[-1]},"
|
return f"Sehr geehrter Herr {prof.split(' ')[-1]},"
|
||||||
elif self.gender_female.isChecked():
|
elif self.gender_female.isChecked():
|
||||||
|
self.btn_okay.setEnabled(True)
|
||||||
return f"Sehr geehrte Frau {prof.split(' ')[-1]},"
|
return f"Sehr geehrte Frau {prof.split(' ')[-1]},"
|
||||||
elif self.gender_non.isChecked():
|
elif self.gender_non.isChecked():
|
||||||
|
self.btn_okay.setEnabled(True)
|
||||||
return f"Guten Tag {prof},"
|
return f"Guten Tag {prof},"
|
||||||
|
|
||||||
def set_mail(self):
|
def set_mail(self):
|
||||||
@@ -108,7 +104,6 @@ class Mail_Dialog(QtWidgets.QDialog, Ui_Dialog):
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.mail_body.setHtml(mail_html)
|
self.mail_body.setHtml(mail_html)
|
||||||
self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True)
|
|
||||||
|
|
||||||
def createAndSendMail(self):
|
def createAndSendMail(self):
|
||||||
import smtplib
|
import smtplib
|
||||||
@@ -184,14 +179,3 @@ if __name__ == "__main__":
|
|||||||
ui.setupUi(Dialog)
|
ui.setupUi(Dialog)
|
||||||
Dialog.show()
|
Dialog.show()
|
||||||
sys.exit(app.exec())
|
sys.exit(app.exec())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1">
|
|
||||||
<context>
|
|
||||||
<name>Dialog</name>
|
|
||||||
<message>
|
|
||||||
<location filename="medianadder_ui.py" line="60"/>
|
|
||||||
<source>Dialog</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="medianadder_ui.py" line="61"/>
|
|
||||||
<source>Signatur</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="medianadder_ui.py" line="62"/>
|
|
||||||
<source>Modus</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="medianadder_ui.py" line="63"/>
|
|
||||||
<source>ARRAY</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="medianadder_ui.py" line="64"/>
|
|
||||||
<source>BibTeX</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="medianadder_ui.py" line="65"/>
|
|
||||||
<source>COinS</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="medianadder_ui.py" line="66"/>
|
|
||||||
<source>RIS</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="medianadder_ui.py" line="68"/>
|
|
||||||
<source>Queue</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
||||||
@@ -1,82 +1,8 @@
|
|||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from .Ui_medianadder import Ui_Dialog
|
from .dialog_sources.Ui_medianadder import Ui_Dialog
|
||||||
|
|
||||||
|
|
||||||
class MedienAdder(QtWidgets.QDialog):
|
class MedienAdder(QtWidgets.QDialog, Ui_Dialog):
|
||||||
def __init__(self):
|
def __init__(self, parent=None):
|
||||||
super().__init__()
|
super().__init__(parent)
|
||||||
self.ui = Ui_Dialog()
|
|
||||||
self.ui.setupUi(self)
|
|
||||||
|
|
||||||
# Connect signals and slots for your custom functionality
|
|
||||||
self.ui.buttonBox.accepted.connect(self.accept)
|
|
||||||
self.ui.buttonBox.rejected.connect(self.reject)
|
|
||||||
self.ui.l_add.clicked.connect(self.add_to_list)
|
|
||||||
self.ui.l_add.setShortcut("Shift+Return")
|
|
||||||
# Initialize data variables to store the results
|
|
||||||
self.result_data = []
|
|
||||||
|
|
||||||
self.recolorize()
|
|
||||||
|
|
||||||
def add_to_list(self):
|
|
||||||
text = self.ui.lineEdit.text().strip()
|
|
||||||
if text == "":
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
self.ui.listWidget.addItem(text)
|
|
||||||
self.ui.list_amount.setText(str(self.ui.listWidget.count()))
|
|
||||||
self.ui.lineEdit.clear()
|
|
||||||
|
|
||||||
def recolorize(self):
|
|
||||||
# set the color of the cells of the treeWidget to red if the field is not supported by the provider
|
|
||||||
# else set it to green
|
|
||||||
for i in range(self.ui.treeWidget.topLevelItemCount()):
|
|
||||||
for j in range(1, self.ui.treeWidget.columnCount()):
|
|
||||||
if self.ui.treeWidget.topLevelItem(i).text(j) == "0":
|
|
||||||
self.ui.treeWidget.topLevelItem(i).setBackground(
|
|
||||||
j, QtGui.QColor(255, 0, 0)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.ui.treeWidget.topLevelItem(i).setBackground(
|
|
||||||
j, QtGui.QColor(0, 255, 0)
|
|
||||||
)
|
|
||||||
# remove the text from the cells
|
|
||||||
self.ui.treeWidget.topLevelItem(i).setText(j, "")
|
|
||||||
|
|
||||||
def custom_context_menu(self):
|
|
||||||
menu = QtWidgets.QMenu()
|
|
||||||
menu.addAction("Remove")
|
|
||||||
|
|
||||||
action = menu.exec(QtGui.QCursor.pos())
|
|
||||||
if action.text() == "Remove":
|
|
||||||
self.remove_from_list()
|
|
||||||
|
|
||||||
def remove_from_list(self):
|
|
||||||
self.ui.listWidget.takeItem(self.ui.listWidget.currentRow())
|
|
||||||
self.ui.list_amount.setText(str(self.ui.listWidget.count()))
|
|
||||||
|
|
||||||
def add_to_list(self):
|
|
||||||
text = self.ui.lineEdit.text().strip()
|
|
||||||
if text:
|
|
||||||
self.ui.listWidget.addItem(text)
|
|
||||||
self.ui.list_amount.setText(str(self.ui.listWidget.count()))
|
|
||||||
self.ui.lineEdit.clear()
|
|
||||||
|
|
||||||
def accept(self):
|
|
||||||
# Gather and store the data you want to return
|
|
||||||
self.result_data = [
|
|
||||||
self.ui.listWidget.item(i).text() for i in range(self.ui.listWidget.count())
|
|
||||||
]
|
|
||||||
super().accept()
|
|
||||||
|
|
||||||
def keyPressEvent(self, event):
|
|
||||||
if (
|
|
||||||
event.key() == QtCore.Qt.Key.Key_Return
|
|
||||||
or event.key() == QtCore.Qt.Key.Key_Enter
|
|
||||||
):
|
|
||||||
# Handle the Return key press as needed (e.g., add to list)
|
|
||||||
self.add_to_list()
|
|
||||||
event.accept()
|
|
||||||
else:
|
|
||||||
super().keyPressEvent(event)
|
|
||||||
|
|||||||
@@ -70,4 +70,3 @@ class Ui_Dialog(object):
|
|||||||
)
|
)
|
||||||
self.checkBox.setText(_translate("Dialog", "Ja"))
|
self.checkBox.setText(_translate("Dialog", "Ja"))
|
||||||
self.label_2.setText(_translate("Dialog", "Name des Neuen Faches:"))
|
self.label_2.setText(_translate("Dialog", "Name des Neuen Faches:"))
|
||||||
|
|
||||||
|
|||||||
74
src/ui/dialogs/parsed_titles.py
Normal file
74
src/ui/dialogs/parsed_titles.py
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
from .dialog_sources.Ui_parsed_titles import Ui_Form
|
||||||
|
|
||||||
|
from PyQt6 import QtWidgets, QtCore
|
||||||
|
from src.logic import AutoAdder
|
||||||
|
from src.logic.log import MyLogger
|
||||||
|
|
||||||
|
logger = MyLogger("AutoTitleAdder")
|
||||||
|
|
||||||
|
class ParsedTitles(QtWidgets.QWidget, Ui_Form):
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
super().__init__(parent)
|
||||||
|
self.setupUi(self)
|
||||||
|
self.signatures = []
|
||||||
|
self.returned = []
|
||||||
|
self.prof_id = None
|
||||||
|
self.app_id = None
|
||||||
|
self.worker = None
|
||||||
|
|
||||||
|
def populate_table(self):
|
||||||
|
for i in range(len(self.signatures)):
|
||||||
|
self.listWidget.addItem(QtWidgets.QListWidgetItem())
|
||||||
|
self.listWidget.item(i).setText(self.signatures[i])
|
||||||
|
self.listWidget.item(i).setToolTip("Daten werden gesammelt")
|
||||||
|
|
||||||
|
def update_progress_bar(self, value: int):
|
||||||
|
self.progressBar.setValue(value)
|
||||||
|
|
||||||
|
def worker_quit(self):
|
||||||
|
print("Terminating worker")
|
||||||
|
self.worker.terminate()
|
||||||
|
self.worker.quit()
|
||||||
|
self.worker.deleteLater()
|
||||||
|
self.worker = None
|
||||||
|
|
||||||
|
def start(self):
|
||||||
|
logger.log_info("Starting AutoAdder")
|
||||||
|
|
||||||
|
self.worker = AutoAdder(
|
||||||
|
data=self.signatures,
|
||||||
|
app_id=self.app_id,
|
||||||
|
prof_id=self.prof_id,
|
||||||
|
)
|
||||||
|
self.worker.finished.connect(self.on_completion)
|
||||||
|
self.worker.updateSignal.connect(self.update_progress_bar)
|
||||||
|
self.worker.setTextSignal.connect(self.update_lists)
|
||||||
|
self.worker.progress.connect(self.determine_progress)
|
||||||
|
self.worker.finished.connect(self.worker.quit)
|
||||||
|
self.worker.finished.connect(self.worker.deleteLater)
|
||||||
|
# self.worker.updateSignal.connect(self.update_progress_label)
|
||||||
|
# worker.finished.connect(worker.deleteLater)
|
||||||
|
|
||||||
|
self.worker.start()
|
||||||
|
|
||||||
|
def on_completion(self):
|
||||||
|
logger.log_info("AutoAdder finished")
|
||||||
|
logger.log_info("Returning data")
|
||||||
|
|
||||||
|
# create a function that closes the dialog
|
||||||
|
|
||||||
|
def determine_progress(self, signal):
|
||||||
|
# check length of listWidget
|
||||||
|
length = self.listWidget.count()
|
||||||
|
print(f"Length of listWidget: {length}")
|
||||||
|
if length == 0:
|
||||||
|
logger.log_info("AutoAdder finished")
|
||||||
|
self.buttonBox.accepted.emit()
|
||||||
|
|
||||||
|
def update_lists(self, signal):
|
||||||
|
# get text of first entry in listWidget
|
||||||
|
text = self.listWidget.item(0).text()
|
||||||
|
# remove first entry
|
||||||
|
self.listWidget.takeItem(0)
|
||||||
|
# add first entry to listWidget_done
|
||||||
|
self.listWidget_done.addItem(text)
|
||||||
@@ -89,4 +89,3 @@ class Ui_Form(object):
|
|||||||
self.count.setText(_translate("Form", "0"))
|
self.count.setText(_translate("Form", "0"))
|
||||||
self.label_2.setText(_translate("Form", "Signaturen gefunden."))
|
self.label_2.setText(_translate("Form", "Signaturen gefunden."))
|
||||||
self.toolButton.setText(_translate("Form", "..."))
|
self.toolButton.setText(_translate("Form", "..."))
|
||||||
|
|
||||||
|
|||||||
11
src/ui/dialogs/reminder.py
Normal file
11
src/ui/dialogs/reminder.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
from .dialog_sources.Ui_reminder import Ui_Dialog
|
||||||
|
from PyQt6 import QtWidgets
|
||||||
|
class ReminderDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
super().__init__(parent)
|
||||||
|
self.setupUi(self)
|
||||||
|
def return_message(self) -> dict:
|
||||||
|
return {
|
||||||
|
"message": self.message_box.toPlainText(),
|
||||||
|
"remind_at": self.dateEdit.date().toString("yyyy-MM-dd"),
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
from omegaconf import OmegaConf
|
from omegaconf import OmegaConf
|
||||||
from PyQt6 import QtWidgets
|
from PyQt6 import QtWidgets
|
||||||
|
|
||||||
from src.ui.dialogs.Ui_settings import Ui_Dialog as _settings
|
from .dialog_sources.Ui_settings import Ui_Dialog as _settings
|
||||||
|
|
||||||
config = OmegaConf.load("config.yaml")
|
config = OmegaConf.load("config.yaml")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user