set icon, title

This commit is contained in:
WorldTeacher
2024-07-30 09:41:34 +02:00
parent e5fb461394
commit 5cf59e29a2

View File

@@ -1,26 +1,27 @@
from .sources.Ui_dialog_extendLoanDuration import Ui_Dialog from .sources.Ui_dialog_extendLoanDuration import Ui_Dialog
from PyQt6 import QtWidgets, QtCore from PyQt6 import QtWidgets, QtCore
from src.utils import Icon
class ExtendLoan(QtWidgets.QDialog, Ui_Dialog): class ExtendLoan(QtWidgets.QDialog, Ui_Dialog):
def __init__(self, user, media): def __init__(self, user, media):
super(ExtendLoan, self).__init__() super(ExtendLoan, self).__init__()
self.setupUi(self) self.setupUi(self)
self.setWindowTitle("Leihfrist verlängern")
self.setWindowIcon(Icon("loan_extend").icon)
self.user = user self.user = user
self.media = media self.media = media
self.currentDate = QtCore.QDate.currentDate().addDays(1) self.currentDate = QtCore.QDate.currentDate().addDays(1)
self.extendDate = None self.extendDate = ""
self.extenduntil.setMinimumDate(self.currentDate) self.extenduntil.setMinimumDate(self.currentDate)
self.show() self.show()
self.buttonBox.accepted.connect(self.extendLoan) self.buttonBox.accepted.connect(self.extendLoan)
def extendLoan(self): def extendLoan(self):
print("Extend Loan") # print("Extend Loan")
selectedDate = self.extenduntil.selectedDate() selectedDate = self.extenduntil.selectedDate()
print(selectedDate) # print(selectedDate)
self.extendDate = selectedDate self.extendDate = selectedDate
self.close() self.close()
pass
def launch(user, media): def launch(user, media):