41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
from PySide6 import QtWidgets
|
|
|
|
from src.utils.icon import Icon
|
|
|
|
from .dialog_sources.apparat_extend_ui import Ui_Dialog
|
|
|
|
|
|
class ApparatExtendDialog(QtWidgets.QDialog, Ui_Dialog):
|
|
def __init__(
|
|
self,
|
|
):
|
|
super().__init__()
|
|
self.setupUi(self)
|
|
self.setWindowIcon(Icon("edit").icon)
|
|
self.setWindowTitle("Semesterapparat verlängern")
|
|
self.buttonBox.accepted.connect(self.accept)
|
|
self.buttonBox.rejected.connect(self.reject)
|
|
|
|
def get_data(self):
|
|
return {
|
|
"semester": (
|
|
f"SoSe {int(self.sem_year.text()[-2:])}"
|
|
if self.rad_sommer.isChecked()
|
|
else f"WiSe {int(self.sem_year.text()[-2:])}/{int(self.sem_year.text()[-2:]) + 1}"
|
|
),
|
|
"dauerapp": (
|
|
self.dauerapp.isChecked() if self.dauerapp.isChecked() else False
|
|
),
|
|
}
|
|
|
|
|
|
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())
|