fix some bugs, add mail template emit signal to update list
This commit is contained in:
@@ -15,9 +15,7 @@ class Ui_MainWindow(object):
|
|||||||
MainWindow.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
|
MainWindow.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
|
||||||
MainWindow.setEnabled(True)
|
MainWindow.setEnabled(True)
|
||||||
MainWindow.resize(1590, 800)
|
MainWindow.resize(1590, 800)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
||||||
@@ -26,24 +24,14 @@ class Ui_MainWindow(object):
|
|||||||
MainWindow.setMaximumSize(QtCore.QSize(1590, 800))
|
MainWindow.setMaximumSize(QtCore.QSize(1590, 800))
|
||||||
MainWindow.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.NoContextMenu)
|
MainWindow.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.NoContextMenu)
|
||||||
icon = QtGui.QIcon()
|
icon = QtGui.QIcon()
|
||||||
icon.addPixmap(
|
icon.addPixmap(QtGui.QPixmap("c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\../../../../../../icons/logo.ico"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
QtGui.QPixmap(
|
|
||||||
"c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\../../../../../../icons/logo.ico"
|
|
||||||
),
|
|
||||||
QtGui.QIcon.Mode.Normal,
|
|
||||||
QtGui.QIcon.State.Off,
|
|
||||||
)
|
|
||||||
MainWindow.setWindowIcon(icon)
|
MainWindow.setWindowIcon(icon)
|
||||||
MainWindow.setStatusTip("")
|
MainWindow.setStatusTip("")
|
||||||
self.centralwidget = QtWidgets.QWidget(parent=MainWindow)
|
self.centralwidget = QtWidgets.QWidget(parent=MainWindow)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(
|
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
|
||||||
self.centralwidget.sizePolicy().hasHeightForWidth()
|
|
||||||
)
|
|
||||||
self.centralwidget.setSizePolicy(sizePolicy)
|
self.centralwidget.setSizePolicy(sizePolicy)
|
||||||
self.centralwidget.setObjectName("centralwidget")
|
self.centralwidget.setObjectName("centralwidget")
|
||||||
self.verticalLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget)
|
self.verticalLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget)
|
||||||
@@ -60,15 +48,10 @@ class Ui_MainWindow(object):
|
|||||||
self.tabWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.tabWidget.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.tabWidget.setObjectName("tabWidget")
|
self.tabWidget.setObjectName("tabWidget")
|
||||||
self.createApparat = QtWidgets.QWidget()
|
self.createApparat = QtWidgets.QWidget()
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred)
|
||||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Preferred,
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(
|
sizePolicy.setHeightForWidth(self.createApparat.sizePolicy().hasHeightForWidth())
|
||||||
self.createApparat.sizePolicy().hasHeightForWidth()
|
|
||||||
)
|
|
||||||
self.createApparat.setSizePolicy(sizePolicy)
|
self.createApparat.setSizePolicy(sizePolicy)
|
||||||
self.createApparat.setObjectName("createApparat")
|
self.createApparat.setObjectName("createApparat")
|
||||||
self.horizontalLayoutWidget_2 = QtWidgets.QWidget(parent=self.createApparat)
|
self.horizontalLayoutWidget_2 = QtWidgets.QWidget(parent=self.createApparat)
|
||||||
@@ -81,52 +64,28 @@ class Ui_MainWindow(object):
|
|||||||
self.formLayout.setObjectName("formLayout")
|
self.formLayout.setObjectName("formLayout")
|
||||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
|
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
|
||||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||||
spacerItem = QtWidgets.QSpacerItem(
|
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||||
20,
|
|
||||||
40,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
self.verticalLayout_2.addItem(spacerItem)
|
self.verticalLayout_2.addItem(spacerItem)
|
||||||
self.create_document = QtWidgets.QPushButton(
|
self.create_document = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_2)
|
||||||
parent=self.horizontalLayoutWidget_2
|
|
||||||
)
|
|
||||||
self.create_document.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.create_document.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.create_document.setObjectName("create_document")
|
self.create_document.setObjectName("create_document")
|
||||||
self.verticalLayout_2.addWidget(self.create_document)
|
self.verticalLayout_2.addWidget(self.create_document)
|
||||||
self.create_new_app = QtWidgets.QPushButton(
|
self.create_new_app = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_2)
|
||||||
parent=self.horizontalLayoutWidget_2
|
|
||||||
)
|
|
||||||
self.create_new_app.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.create_new_app.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.create_new_app.setObjectName("create_new_app")
|
self.create_new_app.setObjectName("create_new_app")
|
||||||
self.verticalLayout_2.addWidget(self.create_new_app)
|
self.verticalLayout_2.addWidget(self.create_new_app)
|
||||||
self.cancel_active_selection = QtWidgets.QPushButton(
|
self.cancel_active_selection = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_2)
|
||||||
parent=self.horizontalLayoutWidget_2
|
|
||||||
)
|
|
||||||
self.cancel_active_selection.setEnabled(False)
|
self.cancel_active_selection.setEnabled(False)
|
||||||
self.cancel_active_selection.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.cancel_active_selection.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.cancel_active_selection.setObjectName("cancel_active_selection")
|
self.cancel_active_selection.setObjectName("cancel_active_selection")
|
||||||
self.verticalLayout_2.addWidget(self.cancel_active_selection)
|
self.verticalLayout_2.addWidget(self.cancel_active_selection)
|
||||||
spacerItem1 = QtWidgets.QSpacerItem(
|
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||||
20,
|
|
||||||
40,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
self.verticalLayout_2.addItem(spacerItem1)
|
self.verticalLayout_2.addItem(spacerItem1)
|
||||||
self.formLayout.setLayout(
|
self.formLayout.setLayout(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.verticalLayout_2)
|
||||||
1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.verticalLayout_2
|
self.tableWidget_apparate = QtWidgets.QTableWidget(parent=self.horizontalLayoutWidget_2)
|
||||||
)
|
|
||||||
self.tableWidget_apparate = QtWidgets.QTableWidget(
|
|
||||||
parent=self.horizontalLayoutWidget_2
|
|
||||||
)
|
|
||||||
self.tableWidget_apparate.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.tableWidget_apparate.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.tableWidget_apparate.setSizeAdjustPolicy(
|
self.tableWidget_apparate.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
||||||
QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents
|
self.tableWidget_apparate.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||||
)
|
|
||||||
self.tableWidget_apparate.setEditTriggers(
|
|
||||||
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
|
|
||||||
)
|
|
||||||
self.tableWidget_apparate.setAlternatingRowColors(True)
|
self.tableWidget_apparate.setAlternatingRowColors(True)
|
||||||
self.tableWidget_apparate.setTextElideMode(QtCore.Qt.TextElideMode.ElideMiddle)
|
self.tableWidget_apparate.setTextElideMode(QtCore.Qt.TextElideMode.ElideMiddle)
|
||||||
self.tableWidget_apparate.setObjectName("tableWidget_apparate")
|
self.tableWidget_apparate.setObjectName("tableWidget_apparate")
|
||||||
@@ -145,9 +104,7 @@ class Ui_MainWindow(object):
|
|||||||
item = QtWidgets.QTableWidgetItem()
|
item = QtWidgets.QTableWidgetItem()
|
||||||
self.tableWidget_apparate.setHorizontalHeaderItem(5, item)
|
self.tableWidget_apparate.setHorizontalHeaderItem(5, item)
|
||||||
self.tableWidget_apparate.horizontalHeader().setCascadingSectionResizes(True)
|
self.tableWidget_apparate.horizontalHeader().setCascadingSectionResizes(True)
|
||||||
self.formLayout.setWidget(
|
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.tableWidget_apparate)
|
||||||
1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.tableWidget_apparate
|
|
||||||
)
|
|
||||||
self.horizontalLayout_2.addLayout(self.formLayout)
|
self.horizontalLayout_2.addLayout(self.formLayout)
|
||||||
self.line = QtWidgets.QFrame(parent=self.createApparat)
|
self.line = QtWidgets.QFrame(parent=self.createApparat)
|
||||||
self.line.setGeometry(QtCore.QRect(0, 160, 1261, 21))
|
self.line.setGeometry(QtCore.QRect(0, 160, 1261, 21))
|
||||||
@@ -163,22 +120,12 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||||
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
||||||
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
||||||
spacerItem2 = QtWidgets.QSpacerItem(
|
spacerItem2 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||||
20,
|
|
||||||
20,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
)
|
|
||||||
self.horizontalLayout_5.addItem(spacerItem2)
|
self.horizontalLayout_5.addItem(spacerItem2)
|
||||||
self.chkbx_show_del_media = QtWidgets.QCheckBox(parent=self.gridLayoutWidget_2)
|
self.chkbx_show_del_media = QtWidgets.QCheckBox(parent=self.gridLayoutWidget_2)
|
||||||
self.chkbx_show_del_media.setObjectName("chkbx_show_del_media")
|
self.chkbx_show_del_media.setObjectName("chkbx_show_del_media")
|
||||||
self.horizontalLayout_5.addWidget(self.chkbx_show_del_media)
|
self.horizontalLayout_5.addWidget(self.chkbx_show_del_media)
|
||||||
spacerItem3 = QtWidgets.QSpacerItem(
|
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||||
40,
|
|
||||||
20,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
)
|
|
||||||
self.horizontalLayout_5.addItem(spacerItem3)
|
self.horizontalLayout_5.addItem(spacerItem3)
|
||||||
self.btn_reserve = QtWidgets.QPushButton(parent=self.gridLayoutWidget_2)
|
self.btn_reserve = QtWidgets.QPushButton(parent=self.gridLayoutWidget_2)
|
||||||
self.btn_reserve.setObjectName("btn_reserve")
|
self.btn_reserve.setObjectName("btn_reserve")
|
||||||
@@ -197,12 +144,7 @@ class Ui_MainWindow(object):
|
|||||||
self.progress_label.setObjectName("progress_label")
|
self.progress_label.setObjectName("progress_label")
|
||||||
self.add_layout.addWidget(self.progress_label)
|
self.add_layout.addWidget(self.progress_label)
|
||||||
self.horizontalLayout_5.addLayout(self.add_layout)
|
self.horizontalLayout_5.addLayout(self.add_layout)
|
||||||
spacerItem4 = QtWidgets.QSpacerItem(
|
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||||
40,
|
|
||||||
20,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
)
|
|
||||||
self.horizontalLayout_5.addItem(spacerItem4)
|
self.horizontalLayout_5.addItem(spacerItem4)
|
||||||
self.avail_layout = QtWidgets.QHBoxLayout()
|
self.avail_layout = QtWidgets.QHBoxLayout()
|
||||||
self.avail_layout.setObjectName("avail_layout")
|
self.avail_layout.setObjectName("avail_layout")
|
||||||
@@ -218,48 +160,25 @@ class Ui_MainWindow(object):
|
|||||||
self.avail_status = QtWidgets.QLabel(parent=self.gridLayoutWidget_2)
|
self.avail_status = QtWidgets.QLabel(parent=self.gridLayoutWidget_2)
|
||||||
self.avail_status.setObjectName("avail_status")
|
self.avail_status.setObjectName("avail_status")
|
||||||
self.horizontalLayout_5.addWidget(self.avail_status)
|
self.horizontalLayout_5.addWidget(self.avail_status)
|
||||||
self.automation_add_selected_books = QtWidgets.QPushButton(
|
self.automation_add_selected_books = QtWidgets.QPushButton(parent=self.gridLayoutWidget_2)
|
||||||
parent=self.gridLayoutWidget_2
|
self.automation_add_selected_books.setObjectName("automation_add_selected_books")
|
||||||
)
|
|
||||||
self.automation_add_selected_books.setObjectName(
|
|
||||||
"automation_add_selected_books"
|
|
||||||
)
|
|
||||||
self.horizontalLayout_5.addWidget(self.automation_add_selected_books)
|
self.horizontalLayout_5.addWidget(self.automation_add_selected_books)
|
||||||
spacerItem5 = QtWidgets.QSpacerItem(
|
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||||
40,
|
|
||||||
20,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
)
|
|
||||||
self.horizontalLayout_5.addItem(spacerItem5)
|
self.horizontalLayout_5.addItem(spacerItem5)
|
||||||
self.gridLayout_2.addLayout(self.horizontalLayout_5, 4, 0, 1, 1)
|
self.gridLayout_2.addLayout(self.horizontalLayout_5, 4, 0, 1, 1)
|
||||||
self.tableWidget_apparat_media = QtWidgets.QTableWidget(
|
self.tableWidget_apparat_media = QtWidgets.QTableWidget(parent=self.gridLayoutWidget_2)
|
||||||
parent=self.gridLayoutWidget_2
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||||
)
|
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
|
||||||
QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Expanding
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(
|
sizePolicy.setHeightForWidth(self.tableWidget_apparat_media.sizePolicy().hasHeightForWidth())
|
||||||
self.tableWidget_apparat_media.sizePolicy().hasHeightForWidth()
|
|
||||||
)
|
|
||||||
self.tableWidget_apparat_media.setSizePolicy(sizePolicy)
|
self.tableWidget_apparat_media.setSizePolicy(sizePolicy)
|
||||||
self.tableWidget_apparat_media.setMinimumSize(QtCore.QSize(1259, 0))
|
self.tableWidget_apparat_media.setMinimumSize(QtCore.QSize(1259, 0))
|
||||||
self.tableWidget_apparat_media.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.tableWidget_apparat_media.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.tableWidget_apparat_media.setContextMenuPolicy(
|
self.tableWidget_apparat_media.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
||||||
QtCore.Qt.ContextMenuPolicy.CustomContextMenu
|
self.tableWidget_apparat_media.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
||||||
)
|
self.tableWidget_apparat_media.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||||
self.tableWidget_apparat_media.setSizeAdjustPolicy(
|
|
||||||
QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents
|
|
||||||
)
|
|
||||||
self.tableWidget_apparat_media.setEditTriggers(
|
|
||||||
QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers
|
|
||||||
)
|
|
||||||
self.tableWidget_apparat_media.setAlternatingRowColors(True)
|
self.tableWidget_apparat_media.setAlternatingRowColors(True)
|
||||||
self.tableWidget_apparat_media.setSelectionBehavior(
|
self.tableWidget_apparat_media.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
|
||||||
QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows
|
|
||||||
)
|
|
||||||
self.tableWidget_apparat_media.setObjectName("tableWidget_apparat_media")
|
self.tableWidget_apparat_media.setObjectName("tableWidget_apparat_media")
|
||||||
self.tableWidget_apparat_media.setColumnCount(7)
|
self.tableWidget_apparat_media.setColumnCount(7)
|
||||||
self.tableWidget_apparat_media.setRowCount(0)
|
self.tableWidget_apparat_media.setRowCount(0)
|
||||||
@@ -277,9 +196,7 @@ class Ui_MainWindow(object):
|
|||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(5, item)
|
self.tableWidget_apparat_media.setHorizontalHeaderItem(5, item)
|
||||||
item = QtWidgets.QTableWidgetItem()
|
item = QtWidgets.QTableWidgetItem()
|
||||||
self.tableWidget_apparat_media.setHorizontalHeaderItem(6, item)
|
self.tableWidget_apparat_media.setHorizontalHeaderItem(6, item)
|
||||||
self.tableWidget_apparat_media.horizontalHeader().setCascadingSectionResizes(
|
self.tableWidget_apparat_media.horizontalHeader().setCascadingSectionResizes(True)
|
||||||
True
|
|
||||||
)
|
|
||||||
self.gridLayout_2.addWidget(self.tableWidget_apparat_media, 9, 0, 1, 1)
|
self.gridLayout_2.addWidget(self.tableWidget_apparat_media, 9, 0, 1, 1)
|
||||||
self.label = QtWidgets.QLabel(parent=self.gridLayoutWidget_2)
|
self.label = QtWidgets.QLabel(parent=self.gridLayoutWidget_2)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
@@ -290,14 +207,10 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout_2.addWidget(self.label, 2, 0, 1, 1)
|
self.gridLayout_2.addWidget(self.label, 2, 0, 1, 1)
|
||||||
self.app_group_box = QtWidgets.QGroupBox(parent=self.gridLayoutWidget_2)
|
self.app_group_box = QtWidgets.QGroupBox(parent=self.gridLayoutWidget_2)
|
||||||
self.app_group_box.setEnabled(True)
|
self.app_group_box.setEnabled(True)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||||
QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(
|
sizePolicy.setHeightForWidth(self.app_group_box.sizePolicy().hasHeightForWidth())
|
||||||
self.app_group_box.sizePolicy().hasHeightForWidth()
|
|
||||||
)
|
|
||||||
self.app_group_box.setSizePolicy(sizePolicy)
|
self.app_group_box.setSizePolicy(sizePolicy)
|
||||||
self.app_group_box.setMinimumSize(QtCore.QSize(0, 210))
|
self.app_group_box.setMinimumSize(QtCore.QSize(0, 210))
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
@@ -305,60 +218,48 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(True)
|
font.setBold(True)
|
||||||
self.app_group_box.setFont(font)
|
self.app_group_box.setFont(font)
|
||||||
self.app_group_box.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.app_group_box.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.app_group_box.setAlignment(
|
self.app_group_box.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter)
|
||||||
QtCore.Qt.AlignmentFlag.AlignLeading
|
|
||||||
| QtCore.Qt.AlignmentFlag.AlignLeft
|
|
||||||
| QtCore.Qt.AlignmentFlag.AlignVCenter
|
|
||||||
)
|
|
||||||
self.app_group_box.setCheckable(False)
|
self.app_group_box.setCheckable(False)
|
||||||
self.app_group_box.setObjectName("app_group_box")
|
self.app_group_box.setObjectName("app_group_box")
|
||||||
self.dokument_list = QtWidgets.QTableWidget(parent=self.app_group_box)
|
self.document_list = QtWidgets.QTableWidget(parent=self.app_group_box)
|
||||||
self.dokument_list.setGeometry(QtCore.QRect(780, 20, 321, 181))
|
self.document_list.setGeometry(QtCore.QRect(780, 20, 321, 181))
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(10)
|
font.setPointSize(10)
|
||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setKerning(False)
|
font.setKerning(False)
|
||||||
self.dokument_list.setFont(font)
|
self.document_list.setFont(font)
|
||||||
self.dokument_list.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.document_list.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.dokument_list.setAcceptDrops(True)
|
self.document_list.setAcceptDrops(True)
|
||||||
self.dokument_list.setHorizontalScrollBarPolicy(
|
self.document_list.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
||||||
QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
|
self.document_list.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
|
||||||
)
|
self.document_list.setDragEnabled(True)
|
||||||
self.dokument_list.setSizeAdjustPolicy(
|
self.document_list.setDragDropMode(QtWidgets.QAbstractItemView.DragDropMode.DragOnly)
|
||||||
QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents
|
self.document_list.setDefaultDropAction(QtCore.Qt.DropAction.LinkAction)
|
||||||
)
|
self.document_list.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
|
||||||
self.dokument_list.setDragEnabled(True)
|
self.document_list.setObjectName("document_list")
|
||||||
self.dokument_list.setDragDropMode(
|
self.document_list.setColumnCount(4)
|
||||||
QtWidgets.QAbstractItemView.DragDropMode.DragOnly
|
self.document_list.setRowCount(0)
|
||||||
)
|
|
||||||
self.dokument_list.setDefaultDropAction(QtCore.Qt.DropAction.LinkAction)
|
|
||||||
self.dokument_list.setSelectionMode(
|
|
||||||
QtWidgets.QAbstractItemView.SelectionMode.SingleSelection
|
|
||||||
)
|
|
||||||
self.dokument_list.setObjectName("dokument_list")
|
|
||||||
self.dokument_list.setColumnCount(4)
|
|
||||||
self.dokument_list.setRowCount(0)
|
|
||||||
item = QtWidgets.QTableWidgetItem()
|
item = QtWidgets.QTableWidgetItem()
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setFamily("Arial")
|
font.setFamily("Arial")
|
||||||
font.setPointSize(8)
|
font.setPointSize(8)
|
||||||
item.setFont(font)
|
item.setFont(font)
|
||||||
self.dokument_list.setHorizontalHeaderItem(0, item)
|
self.document_list.setHorizontalHeaderItem(0, item)
|
||||||
item = QtWidgets.QTableWidgetItem()
|
item = QtWidgets.QTableWidgetItem()
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setFamily("Arial")
|
font.setFamily("Arial")
|
||||||
font.setPointSize(8)
|
font.setPointSize(8)
|
||||||
item.setFont(font)
|
item.setFont(font)
|
||||||
self.dokument_list.setHorizontalHeaderItem(1, item)
|
self.document_list.setHorizontalHeaderItem(1, item)
|
||||||
item = QtWidgets.QTableWidgetItem()
|
item = QtWidgets.QTableWidgetItem()
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setFamily("Arial")
|
font.setFamily("Arial")
|
||||||
font.setPointSize(8)
|
font.setPointSize(8)
|
||||||
item.setFont(font)
|
item.setFont(font)
|
||||||
self.dokument_list.setHorizontalHeaderItem(2, item)
|
self.document_list.setHorizontalHeaderItem(2, item)
|
||||||
item = QtWidgets.QTableWidgetItem()
|
item = QtWidgets.QTableWidgetItem()
|
||||||
self.dokument_list.setHorizontalHeaderItem(3, item)
|
self.document_list.setHorizontalHeaderItem(3, item)
|
||||||
self.dokument_list.horizontalHeader().setDefaultSectionSize(107)
|
self.document_list.horizontalHeader().setDefaultSectionSize(107)
|
||||||
self.check_file = QtWidgets.QPushButton(parent=self.app_group_box)
|
self.check_file = QtWidgets.QPushButton(parent=self.app_group_box)
|
||||||
self.check_file.setGeometry(QtCore.QRect(1110, 120, 131, 51))
|
self.check_file.setGeometry(QtCore.QRect(1110, 120, 131, 51))
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
@@ -439,16 +340,9 @@ class Ui_MainWindow(object):
|
|||||||
self.app_fach.setEditable(True)
|
self.app_fach.setEditable(True)
|
||||||
self.app_fach.setObjectName("app_fach")
|
self.app_fach.setObjectName("app_fach")
|
||||||
self.gridLayout_6.addWidget(self.app_fach, 0, 1, 1, 1)
|
self.gridLayout_6.addWidget(self.app_fach, 0, 1, 1, 1)
|
||||||
spacerItem6 = QtWidgets.QSpacerItem(
|
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||||
40,
|
|
||||||
20,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
|
||||||
)
|
|
||||||
self.gridLayout_6.addItem(spacerItem6, 0, 3, 1, 1)
|
self.gridLayout_6.addItem(spacerItem6, 0, 3, 1, 1)
|
||||||
self.valid_check_app_fach = QtWidgets.QToolButton(
|
self.valid_check_app_fach = QtWidgets.QToolButton(parent=self.gridLayoutWidget_5)
|
||||||
parent=self.gridLayoutWidget_5
|
|
||||||
)
|
|
||||||
self.valid_check_app_fach.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.valid_check_app_fach.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.valid_check_app_fach.setText("")
|
self.valid_check_app_fach.setText("")
|
||||||
self.valid_check_app_fach.setAutoRaise(True)
|
self.valid_check_app_fach.setAutoRaise(True)
|
||||||
@@ -496,9 +390,7 @@ class Ui_MainWindow(object):
|
|||||||
self.drpdwn_prof_name.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
self.drpdwn_prof_name.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||||
self.drpdwn_prof_name.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhNone)
|
self.drpdwn_prof_name.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhNone)
|
||||||
self.drpdwn_prof_name.setEditable(True)
|
self.drpdwn_prof_name.setEditable(True)
|
||||||
self.drpdwn_prof_name.setInsertPolicy(
|
self.drpdwn_prof_name.setInsertPolicy(QtWidgets.QComboBox.InsertPolicy.InsertAlphabetically)
|
||||||
QtWidgets.QComboBox.InsertPolicy.InsertAlphabetically
|
|
||||||
)
|
|
||||||
self.drpdwn_prof_name.setPlaceholderText("")
|
self.drpdwn_prof_name.setPlaceholderText("")
|
||||||
self.drpdwn_prof_name.setFrame(True)
|
self.drpdwn_prof_name.setFrame(True)
|
||||||
self.drpdwn_prof_name.setObjectName("drpdwn_prof_name")
|
self.drpdwn_prof_name.setObjectName("drpdwn_prof_name")
|
||||||
@@ -543,9 +435,7 @@ class Ui_MainWindow(object):
|
|||||||
font.setPointSize(9)
|
font.setPointSize(9)
|
||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
self.prof_mail.setFont(font)
|
self.prof_mail.setFont(font)
|
||||||
self.prof_mail.setInputMethodHints(
|
self.prof_mail.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhEmailCharactersOnly)
|
||||||
QtCore.Qt.InputMethodHint.ImhEmailCharactersOnly
|
|
||||||
)
|
|
||||||
self.prof_mail.setMaxLength(200)
|
self.prof_mail.setMaxLength(200)
|
||||||
self.prof_mail.setPlaceholderText("")
|
self.prof_mail.setPlaceholderText("")
|
||||||
self.prof_mail.setObjectName("prof_mail")
|
self.prof_mail.setObjectName("prof_mail")
|
||||||
@@ -561,43 +451,31 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
self.label_12.setFont(font)
|
self.label_12.setFont(font)
|
||||||
self.label_12.setObjectName("label_12")
|
self.label_12.setObjectName("label_12")
|
||||||
self.formLayout_3.setWidget(
|
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_12)
|
||||||
0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_12
|
|
||||||
)
|
|
||||||
self.prof_id_adis = QtWidgets.QLineEdit(parent=self.formLayoutWidget_2)
|
self.prof_id_adis = QtWidgets.QLineEdit(parent=self.formLayoutWidget_2)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(9)
|
font.setPointSize(9)
|
||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
self.prof_id_adis.setFont(font)
|
self.prof_id_adis.setFont(font)
|
||||||
self.prof_id_adis.setInputMethodHints(
|
self.prof_id_adis.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhPreferNumbers)
|
||||||
QtCore.Qt.InputMethodHint.ImhPreferNumbers
|
|
||||||
)
|
|
||||||
self.prof_id_adis.setText("")
|
self.prof_id_adis.setText("")
|
||||||
self.prof_id_adis.setObjectName("prof_id_adis")
|
self.prof_id_adis.setObjectName("prof_id_adis")
|
||||||
self.formLayout_3.setWidget(
|
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.prof_id_adis)
|
||||||
0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.prof_id_adis
|
|
||||||
)
|
|
||||||
self.label_13 = QtWidgets.QLabel(parent=self.formLayoutWidget_2)
|
self.label_13 = QtWidgets.QLabel(parent=self.formLayoutWidget_2)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(9)
|
font.setPointSize(9)
|
||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
self.label_13.setFont(font)
|
self.label_13.setFont(font)
|
||||||
self.label_13.setObjectName("label_13")
|
self.label_13.setObjectName("label_13")
|
||||||
self.formLayout_3.setWidget(
|
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_13)
|
||||||
1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_13
|
|
||||||
)
|
|
||||||
self.apparat_id_adis = QtWidgets.QLineEdit(parent=self.formLayoutWidget_2)
|
self.apparat_id_adis = QtWidgets.QLineEdit(parent=self.formLayoutWidget_2)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(9)
|
font.setPointSize(9)
|
||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
self.apparat_id_adis.setFont(font)
|
self.apparat_id_adis.setFont(font)
|
||||||
self.apparat_id_adis.setInputMethodHints(
|
self.apparat_id_adis.setInputMethodHints(QtCore.Qt.InputMethodHint.ImhPreferNumbers)
|
||||||
QtCore.Qt.InputMethodHint.ImhPreferNumbers
|
|
||||||
)
|
|
||||||
self.apparat_id_adis.setObjectName("apparat_id_adis")
|
self.apparat_id_adis.setObjectName("apparat_id_adis")
|
||||||
self.formLayout_3.setWidget(
|
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.apparat_id_adis)
|
||||||
1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.apparat_id_adis
|
|
||||||
)
|
|
||||||
self.sem_year = QtWidgets.QLineEdit(parent=self.app_group_box)
|
self.sem_year = QtWidgets.QLineEdit(parent=self.app_group_box)
|
||||||
self.sem_year.setGeometry(QtCore.QRect(410, 90, 113, 20))
|
self.sem_year.setGeometry(QtCore.QRect(410, 90, 113, 20))
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
@@ -749,14 +627,28 @@ class Ui_MainWindow(object):
|
|||||||
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)
|
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)
|
||||||
self.horizontalLayout.addLayout(self.gridLayout)
|
self.horizontalLayout.addLayout(self.gridLayout)
|
||||||
self.mainLayout.addLayout(self.horizontalLayout)
|
self.mainLayout.addLayout(self.horizontalLayout)
|
||||||
self.horizontalLayoutWidget = QtWidgets.QWidget(parent=self.centralwidget)
|
self.verticalLayoutWidget_2 = QtWidgets.QWidget(parent=self.centralwidget)
|
||||||
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(1280, 370, 301, 381))
|
self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(1280, 0, 306, 751))
|
||||||
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
|
self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2")
|
||||||
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.horizontalLayoutWidget)
|
self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2)
|
||||||
self.verticalLayout_5.setContentsMargins(0, 0, 0, 0)
|
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||||
self.verticalLayout_5.setSpacing(0)
|
self.verticalLayout.setObjectName("verticalLayout")
|
||||||
self.verticalLayout_5.setObjectName("verticalLayout_5")
|
self.calendar_frame = QtWidgets.QFrame(parent=self.verticalLayoutWidget_2)
|
||||||
self.steps = QtWidgets.QFrame(parent=self.horizontalLayoutWidget)
|
self.calendar_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||||
|
self.calendar_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||||
|
self.calendar_frame.setObjectName("calendar_frame")
|
||||||
|
self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.calendar_frame)
|
||||||
|
self.verticalLayout_7.setObjectName("verticalLayout_7")
|
||||||
|
self.calendarlayout = QtWidgets.QVBoxLayout()
|
||||||
|
self.calendarlayout.setObjectName("calendarlayout")
|
||||||
|
self.verticalLayout_7.addLayout(self.calendarlayout)
|
||||||
|
self.verticalLayout.addWidget(self.calendar_frame)
|
||||||
|
self.frame_creation_progress = QtWidgets.QFrame(parent=self.verticalLayoutWidget_2)
|
||||||
|
self.frame_creation_progress.setObjectName("frame_creation_progress")
|
||||||
|
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.frame_creation_progress)
|
||||||
|
self.verticalLayout_4.setSpacing(6)
|
||||||
|
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||||
|
self.steps = QtWidgets.QFrame(parent=self.frame_creation_progress)
|
||||||
self.steps.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.steps.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||||
self.steps.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.steps.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||||
self.steps.setObjectName("steps")
|
self.steps.setObjectName("steps")
|
||||||
@@ -765,10 +657,7 @@ class Ui_MainWindow(object):
|
|||||||
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
||||||
self.groupBox_2 = QtWidgets.QGroupBox(parent=self.steps)
|
self.groupBox_2 = QtWidgets.QGroupBox(parent=self.steps)
|
||||||
self.groupBox_2.setEnabled(True)
|
self.groupBox_2.setEnabled(True)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
|
||||||
@@ -806,10 +695,7 @@ class Ui_MainWindow(object):
|
|||||||
self.verticalLayout_6.addWidget(self.ids_check)
|
self.verticalLayout_6.addWidget(self.ids_check)
|
||||||
self.verticalLayout_3.addWidget(self.groupBox_2)
|
self.verticalLayout_3.addWidget(self.groupBox_2)
|
||||||
self.groupBox = QtWidgets.QGroupBox(parent=self.steps)
|
self.groupBox = QtWidgets.QGroupBox(parent=self.steps)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
|
||||||
)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
|
||||||
@@ -819,8 +705,8 @@ class Ui_MainWindow(object):
|
|||||||
font.setBold(True)
|
font.setBold(True)
|
||||||
self.groupBox.setFont(font)
|
self.groupBox.setFont(font)
|
||||||
self.groupBox.setObjectName("groupBox")
|
self.groupBox.setObjectName("groupBox")
|
||||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox)
|
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.groupBox)
|
||||||
self.verticalLayout.setObjectName("verticalLayout")
|
self.verticalLayout_5.setObjectName("verticalLayout_5")
|
||||||
self.media_checked = QtWidgets.QCheckBox(parent=self.groupBox)
|
self.media_checked = QtWidgets.QCheckBox(parent=self.groupBox)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(8)
|
font.setPointSize(8)
|
||||||
@@ -832,7 +718,7 @@ class Ui_MainWindow(object):
|
|||||||
self.media_checked.setFont(font)
|
self.media_checked.setFont(font)
|
||||||
self.media_checked.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.media_checked.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.media_checked.setObjectName("media_checked")
|
self.media_checked.setObjectName("media_checked")
|
||||||
self.verticalLayout.addWidget(self.media_checked)
|
self.verticalLayout_5.addWidget(self.media_checked)
|
||||||
self.media_edited_check = QtWidgets.QCheckBox(parent=self.groupBox)
|
self.media_edited_check = QtWidgets.QCheckBox(parent=self.groupBox)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(8)
|
font.setPointSize(8)
|
||||||
@@ -844,7 +730,7 @@ class Ui_MainWindow(object):
|
|||||||
self.media_edited_check.setFont(font)
|
self.media_edited_check.setFont(font)
|
||||||
self.media_edited_check.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.media_edited_check.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.media_edited_check.setObjectName("media_edited_check")
|
self.media_edited_check.setObjectName("media_edited_check")
|
||||||
self.verticalLayout.addWidget(self.media_edited_check)
|
self.verticalLayout_5.addWidget(self.media_edited_check)
|
||||||
self.app_created = QtWidgets.QCheckBox(parent=self.groupBox)
|
self.app_created = QtWidgets.QCheckBox(parent=self.groupBox)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(8)
|
font.setPointSize(8)
|
||||||
@@ -856,7 +742,7 @@ class Ui_MainWindow(object):
|
|||||||
self.app_created.setFont(font)
|
self.app_created.setFont(font)
|
||||||
self.app_created.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
self.app_created.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||||
self.app_created.setObjectName("app_created")
|
self.app_created.setObjectName("app_created")
|
||||||
self.verticalLayout.addWidget(self.app_created)
|
self.verticalLayout_5.addWidget(self.app_created)
|
||||||
self.btn_copy_adis_command = QtWidgets.QPushButton(parent=self.groupBox)
|
self.btn_copy_adis_command = QtWidgets.QPushButton(parent=self.groupBox)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(8)
|
font.setPointSize(8)
|
||||||
@@ -871,37 +757,16 @@ class Ui_MainWindow(object):
|
|||||||
self.btn_copy_adis_command.setAccessibleDescription("")
|
self.btn_copy_adis_command.setAccessibleDescription("")
|
||||||
self.btn_copy_adis_command.setAutoFillBackground(False)
|
self.btn_copy_adis_command.setAutoFillBackground(False)
|
||||||
icon1 = QtGui.QIcon()
|
icon1 = QtGui.QIcon()
|
||||||
icon1.addPixmap(
|
icon1.addPixmap(QtGui.QPixmap("c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\../../../../../../.designer/backup/icons/information.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
QtGui.QPixmap(
|
|
||||||
"c:\\Users\\aky547\\GitHub\\SemesterapparatsManager\\src\\ui\\../../../../../../.designer/backup/icons/information.png"
|
|
||||||
),
|
|
||||||
QtGui.QIcon.Mode.Normal,
|
|
||||||
QtGui.QIcon.State.Off,
|
|
||||||
)
|
|
||||||
self.btn_copy_adis_command.setIcon(icon1)
|
self.btn_copy_adis_command.setIcon(icon1)
|
||||||
self.btn_copy_adis_command.setCheckable(False)
|
self.btn_copy_adis_command.setCheckable(False)
|
||||||
self.btn_copy_adis_command.setChecked(False)
|
self.btn_copy_adis_command.setChecked(False)
|
||||||
self.btn_copy_adis_command.setAutoDefault(False)
|
self.btn_copy_adis_command.setAutoDefault(False)
|
||||||
self.btn_copy_adis_command.setObjectName("btn_copy_adis_command")
|
self.btn_copy_adis_command.setObjectName("btn_copy_adis_command")
|
||||||
self.verticalLayout.addWidget(self.btn_copy_adis_command)
|
self.verticalLayout_5.addWidget(self.btn_copy_adis_command)
|
||||||
self.verticalLayout_3.addWidget(self.groupBox)
|
self.verticalLayout_3.addWidget(self.groupBox)
|
||||||
self.verticalLayout_5.addWidget(self.steps)
|
self.verticalLayout_4.addWidget(self.steps)
|
||||||
self.frame_2 = QtWidgets.QFrame(parent=self.centralwidget)
|
self.verticalLayout.addWidget(self.frame_creation_progress)
|
||||||
self.frame_2.setGeometry(QtCore.QRect(1280, 20, 301, 331))
|
|
||||||
self.frame_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
|
||||||
self.frame_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
|
||||||
self.frame_2.setObjectName("frame_2")
|
|
||||||
self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.frame_2)
|
|
||||||
self.verticalLayout_7.setObjectName("verticalLayout_7")
|
|
||||||
self.calendarlayout = QtWidgets.QVBoxLayout()
|
|
||||||
self.calendarlayout.setObjectName("calendarlayout")
|
|
||||||
self.frame_creation_progress = QtWidgets.QFrame(parent=self.frame_2)
|
|
||||||
self.frame_creation_progress.setObjectName("frame_creation_progress")
|
|
||||||
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.frame_creation_progress)
|
|
||||||
self.verticalLayout_4.setSpacing(6)
|
|
||||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
|
||||||
self.calendarlayout.addWidget(self.frame_creation_progress)
|
|
||||||
self.verticalLayout_7.addLayout(self.calendarlayout)
|
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
MainWindow.setCentralWidget(self.centralwidget)
|
||||||
self.menubar = QtWidgets.QMenuBar(parent=MainWindow)
|
self.menubar = QtWidgets.QMenuBar(parent=MainWindow)
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1590, 22))
|
self.menubar.setGeometry(QtCore.QRect(0, 0, 1590, 22))
|
||||||
@@ -924,9 +789,7 @@ class Ui_MainWindow(object):
|
|||||||
self.actionEinstellungen.setShortcutVisibleInContextMenu(True)
|
self.actionEinstellungen.setShortcutVisibleInContextMenu(True)
|
||||||
self.actionEinstellungen.setObjectName("actionEinstellungen")
|
self.actionEinstellungen.setObjectName("actionEinstellungen")
|
||||||
self.actionDokumentation = QtGui.QAction(parent=MainWindow)
|
self.actionDokumentation = QtGui.QAction(parent=MainWindow)
|
||||||
self.actionDokumentation.setShortcutContext(
|
self.actionDokumentation.setShortcutContext(QtCore.Qt.ShortcutContext.ApplicationShortcut)
|
||||||
QtCore.Qt.ShortcutContext.ApplicationShortcut
|
|
||||||
)
|
|
||||||
self.actionDokumentation.setObjectName("actionDokumentation")
|
self.actionDokumentation.setObjectName("actionDokumentation")
|
||||||
self.actionAbout = QtGui.QAction(parent=MainWindow)
|
self.actionAbout = QtGui.QAction(parent=MainWindow)
|
||||||
self.actionAbout.setMenuRole(QtGui.QAction.MenuRole.AboutRole)
|
self.actionAbout.setMenuRole(QtGui.QAction.MenuRole.AboutRole)
|
||||||
@@ -936,7 +799,6 @@ class Ui_MainWindow(object):
|
|||||||
self.menuDatei.addAction(self.actionBeenden)
|
self.menuDatei.addAction(self.actionBeenden)
|
||||||
self.menuEinstellungen.addAction(self.actionEinstellungen)
|
self.menuEinstellungen.addAction(self.actionEinstellungen)
|
||||||
self.menuHelp.addAction(self.actionDokumentation_lokal)
|
self.menuHelp.addAction(self.actionDokumentation_lokal)
|
||||||
self.menuHelp.addAction(self.actionDokumentation)
|
|
||||||
self.menuHelp.addAction(self.actionAbout)
|
self.menuHelp.addAction(self.actionAbout)
|
||||||
self.menubar.addAction(self.menuDatei.menuAction())
|
self.menubar.addAction(self.menuDatei.menuAction())
|
||||||
self.menubar.addAction(self.menuEinstellungen.menuAction())
|
self.menubar.addAction(self.menuEinstellungen.menuAction())
|
||||||
@@ -980,20 +842,11 @@ class Ui_MainWindow(object):
|
|||||||
|
|
||||||
def retranslateUi(self, MainWindow):
|
def retranslateUi(self, MainWindow):
|
||||||
_translate = QtCore.QCoreApplication.translate
|
_translate = QtCore.QCoreApplication.translate
|
||||||
MainWindow.setWindowTitle(
|
MainWindow.setWindowTitle(_translate("MainWindow", "Semesterapparatsmanagement"))
|
||||||
_translate("MainWindow", "Semesterapparatsmanagement")
|
self.create_document.setToolTip(_translate("MainWindow", "Erstellt die Übersicht, welche am Regal ausgehängt werden kann"))
|
||||||
)
|
|
||||||
self.create_document.setToolTip(
|
|
||||||
_translate(
|
|
||||||
"MainWindow",
|
|
||||||
"Erstellt die Übersicht, welche am Regal ausgehängt werden kann",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.create_document.setText(_translate("MainWindow", "Übersicht erstellen"))
|
self.create_document.setText(_translate("MainWindow", "Übersicht erstellen"))
|
||||||
self.create_new_app.setText(_translate("MainWindow", "neu. App anlegen"))
|
self.create_new_app.setText(_translate("MainWindow", "neu. App anlegen"))
|
||||||
self.cancel_active_selection.setText(
|
self.cancel_active_selection.setText(_translate("MainWindow", "Auswahl abbrechen"))
|
||||||
_translate("MainWindow", "Auswahl abbrechen")
|
|
||||||
)
|
|
||||||
self.tableWidget_apparate.setSortingEnabled(False)
|
self.tableWidget_apparate.setSortingEnabled(False)
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(0)
|
item = self.tableWidget_apparate.horizontalHeaderItem(0)
|
||||||
item.setText(_translate("MainWindow", "AppNr"))
|
item.setText(_translate("MainWindow", "AppNr"))
|
||||||
@@ -1007,26 +860,17 @@ class Ui_MainWindow(object):
|
|||||||
item.setText(_translate("MainWindow", "Dauerapparat"))
|
item.setText(_translate("MainWindow", "Dauerapparat"))
|
||||||
item = self.tableWidget_apparate.horizontalHeaderItem(5)
|
item = self.tableWidget_apparate.horizontalHeaderItem(5)
|
||||||
item.setText(_translate("MainWindow", "KontoNr"))
|
item.setText(_translate("MainWindow", "KontoNr"))
|
||||||
self.chkbx_show_del_media.setText(
|
self.chkbx_show_del_media.setText(_translate("MainWindow", "gel. Medien anzeigen"))
|
||||||
_translate("MainWindow", "gel. Medien anzeigen")
|
|
||||||
)
|
|
||||||
self.btn_reserve.setText(_translate("MainWindow", "im Apparat?"))
|
self.btn_reserve.setText(_translate("MainWindow", "im Apparat?"))
|
||||||
self.label_info.setText(_translate("MainWindow", "Medien werden hinzugefügt"))
|
self.label_info.setText(_translate("MainWindow", "Medien werden hinzugefügt"))
|
||||||
self.progress_label.setText(_translate("MainWindow", "Medium x/y"))
|
self.progress_label.setText(_translate("MainWindow", "Medium x/y"))
|
||||||
self.label_20.setText(_translate("MainWindow", "Medien werden geprüft"))
|
self.label_20.setText(_translate("MainWindow", "Medien werden geprüft"))
|
||||||
self.avail_status.setText(_translate("MainWindow", "TextLabel"))
|
self.avail_status.setText(_translate("MainWindow", "TextLabel"))
|
||||||
self.automation_add_selected_books.setText(
|
self.automation_add_selected_books.setText(_translate("MainWindow", "Ausgewählte als verfügbar markieren"))
|
||||||
_translate("MainWindow", "Ausgewählte als verfügbar markieren")
|
|
||||||
)
|
|
||||||
self.tableWidget_apparat_media.setSortingEnabled(True)
|
self.tableWidget_apparat_media.setSortingEnabled(True)
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(0)
|
item = self.tableWidget_apparat_media.horizontalHeaderItem(0)
|
||||||
item.setText(_translate("MainWindow", "Buchtitel"))
|
item.setText(_translate("MainWindow", "Buchtitel"))
|
||||||
item.setToolTip(
|
item.setToolTip(_translate("MainWindow", "Es kann sein, dass der Buchtitel leer ist, dies kommt vor, wenn der Titel nicht passend formatiert ist"))
|
||||||
_translate(
|
|
||||||
"MainWindow",
|
|
||||||
"Es kann sein, dass der Buchtitel leer ist, dies kommt vor, wenn der Titel nicht passend formatiert ist",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(1)
|
item = self.tableWidget_apparat_media.horizontalHeaderItem(1)
|
||||||
item.setText(_translate("MainWindow", "Signatur"))
|
item.setText(_translate("MainWindow", "Signatur"))
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(2)
|
item = self.tableWidget_apparat_media.horizontalHeaderItem(2)
|
||||||
@@ -1035,35 +879,24 @@ class Ui_MainWindow(object):
|
|||||||
item.setText(_translate("MainWindow", "Autor"))
|
item.setText(_translate("MainWindow", "Autor"))
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(4)
|
item = self.tableWidget_apparat_media.horizontalHeaderItem(4)
|
||||||
item.setText(_translate("MainWindow", "im Apparat?"))
|
item.setText(_translate("MainWindow", "im Apparat?"))
|
||||||
item.setToolTip(
|
item.setToolTip(_translate("MainWindow", "Diese Angabe ist nicht zuverlässig. Ist das ❌ vorhanden, kann das Medium im Apparat sein, aber aufgrund eines Bugs nicht gefunden worden"))
|
||||||
_translate(
|
|
||||||
"MainWindow",
|
|
||||||
"Diese Angabe ist nicht zuverlässig. Ist das ❌ vorhanden, kann das Medium im Apparat sein, aber aufgrund eines Bugs nicht gefunden worden",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(5)
|
item = self.tableWidget_apparat_media.horizontalHeaderItem(5)
|
||||||
item.setText(_translate("MainWindow", "Vorgemerkt"))
|
item.setText(_translate("MainWindow", "Vorgemerkt"))
|
||||||
item = self.tableWidget_apparat_media.horizontalHeaderItem(6)
|
item = self.tableWidget_apparat_media.horizontalHeaderItem(6)
|
||||||
item.setText(_translate("MainWindow", "Link"))
|
item.setText(_translate("MainWindow", "Link"))
|
||||||
self.label.setText(_translate("MainWindow", " Medienliste"))
|
self.label.setText(_translate("MainWindow", " Medienliste"))
|
||||||
self.app_group_box.setTitle(_translate("MainWindow", "Apparatsdetails"))
|
self.app_group_box.setTitle(_translate("MainWindow", "Apparatsdetails"))
|
||||||
item = self.dokument_list.horizontalHeaderItem(0)
|
item = self.document_list.horizontalHeaderItem(0)
|
||||||
item.setText(_translate("MainWindow", "Dokumentname"))
|
item.setText(_translate("MainWindow", "Dokumentname"))
|
||||||
item = self.dokument_list.horizontalHeaderItem(1)
|
item = self.document_list.horizontalHeaderItem(1)
|
||||||
item.setText(_translate("MainWindow", "Dateityp"))
|
item.setText(_translate("MainWindow", "Dateityp"))
|
||||||
item = self.dokument_list.horizontalHeaderItem(2)
|
item = self.document_list.horizontalHeaderItem(2)
|
||||||
item.setText(_translate("MainWindow", "Neu?"))
|
item.setText(_translate("MainWindow", "Neu?"))
|
||||||
item = self.dokument_list.horizontalHeaderItem(3)
|
item = self.document_list.horizontalHeaderItem(3)
|
||||||
item.setText(_translate("MainWindow", "path"))
|
item.setText(_translate("MainWindow", "path"))
|
||||||
self.check_file.setToolTip(
|
self.check_file.setToolTip(_translate("MainWindow", "Abhängig von der Anzahl der Medien kann die Suche sehr lange dauern"))
|
||||||
_translate(
|
self.check_file.setText(_translate("MainWindow", "Medien aus Dokument\n"
|
||||||
"MainWindow",
|
" hinzufügen"))
|
||||||
"Abhängig von der Anzahl der Medien kann die Suche sehr lange dauern",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.check_file.setText(
|
|
||||||
_translate("MainWindow", "Medien aus Dokument\n hinzufügen")
|
|
||||||
)
|
|
||||||
self.btn_open_document.setText(_translate("MainWindow", "Dokument öffnen"))
|
self.btn_open_document.setText(_translate("MainWindow", "Dokument öffnen"))
|
||||||
self.btn_add_document.setText(_translate("MainWindow", "Dokument hinzufügen"))
|
self.btn_add_document.setText(_translate("MainWindow", "Dokument hinzufügen"))
|
||||||
self.appname_mand.setText(_translate("MainWindow", "*"))
|
self.appname_mand.setText(_translate("MainWindow", "*"))
|
||||||
@@ -1091,60 +924,29 @@ class Ui_MainWindow(object):
|
|||||||
self.btn_apparat_save.setText(_translate("MainWindow", "Speichern"))
|
self.btn_apparat_save.setText(_translate("MainWindow", "Speichern"))
|
||||||
self.label_5.setText(_translate("MainWindow", "Apparatsname"))
|
self.label_5.setText(_translate("MainWindow", "Apparatsname"))
|
||||||
self.label_6.setText(_translate("MainWindow", "Semester"))
|
self.label_6.setText(_translate("MainWindow", "Semester"))
|
||||||
self.valid_check_profname.setStatusTip(
|
self.valid_check_profname.setStatusTip(_translate("MainWindow", "Format: Nachname, Vorname"))
|
||||||
_translate("MainWindow", "Format: Nachname, Vorname")
|
self.valid_check_mail.setStatusTip(_translate("MainWindow", "mail@irgendwas.wasanderes"))
|
||||||
)
|
|
||||||
self.valid_check_mail.setStatusTip(
|
|
||||||
_translate("MainWindow", "mail@irgendwas.wasanderes")
|
|
||||||
)
|
|
||||||
self.saveandcreate.setText(_translate("MainWindow", "Speichern und anlegen"))
|
self.saveandcreate.setText(_translate("MainWindow", "Speichern und anlegen"))
|
||||||
self.add_medium.setText(_translate("MainWindow", "Medien hinzufügen"))
|
self.add_medium.setText(_translate("MainWindow", "Medien hinzufügen"))
|
||||||
self.tabWidget.setTabText(
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.createApparat), _translate("MainWindow", "Anlegen"))
|
||||||
self.tabWidget.indexOf(self.createApparat),
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.search_statistics), _translate("MainWindow", "Suchen / Statistik"))
|
||||||
_translate("MainWindow", "Anlegen"),
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.elsatab), _translate("MainWindow", "ELSA"))
|
||||||
)
|
|
||||||
self.tabWidget.setTabText(
|
|
||||||
self.tabWidget.indexOf(self.search_statistics),
|
|
||||||
_translate("MainWindow", "Suchen / Statistik"),
|
|
||||||
)
|
|
||||||
self.tabWidget.setTabText(
|
|
||||||
self.tabWidget.indexOf(self.elsatab), _translate("MainWindow", "ELSA")
|
|
||||||
)
|
|
||||||
self.label_21.setText(_translate("MainWindow", "Aktion:"))
|
self.label_21.setText(_translate("MainWindow", "Aktion:"))
|
||||||
self.select_action_box.setItemText(
|
self.select_action_box.setItemText(0, _translate("MainWindow", "Nutzer anlegen"))
|
||||||
0, _translate("MainWindow", "Nutzer anlegen")
|
self.select_action_box.setItemText(1, _translate("MainWindow", "Nutzer bearbeiten"))
|
||||||
)
|
self.select_action_box.setItemText(2, _translate("MainWindow", "Lehrperson bearbeiten"))
|
||||||
self.select_action_box.setItemText(
|
|
||||||
1, _translate("MainWindow", "Nutzer bearbeiten")
|
|
||||||
)
|
|
||||||
self.select_action_box.setItemText(
|
|
||||||
2, _translate("MainWindow", "Lehrperson bearbeiten")
|
|
||||||
)
|
|
||||||
self.admin_action.setTitle(_translate("MainWindow", "GroupBox"))
|
self.admin_action.setTitle(_translate("MainWindow", "GroupBox"))
|
||||||
self.tabWidget.setTabText(
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.admin), _translate("MainWindow", "Admin"))
|
||||||
self.tabWidget.indexOf(self.admin), _translate("MainWindow", "Admin")
|
|
||||||
)
|
|
||||||
self.groupBox_2.setTitle(_translate("MainWindow", "Software"))
|
self.groupBox_2.setTitle(_translate("MainWindow", "Software"))
|
||||||
self.appdata_check.setText(_translate("MainWindow", "Apparatsdaten eingegeben"))
|
self.appdata_check.setText(_translate("MainWindow", "Apparatsdaten eingegeben"))
|
||||||
self.media_check.setText(
|
self.media_check.setText(_translate("MainWindow", "Medien hinzugefügt / importiert"))
|
||||||
_translate("MainWindow", "Medien hinzugefügt / importiert")
|
self.ids_check.setText(_translate("MainWindow", "Prof-ID und Apparat-ID eingetragen"))
|
||||||
)
|
|
||||||
self.ids_check.setText(
|
|
||||||
_translate("MainWindow", "Prof-ID und Apparat-ID eingetragen")
|
|
||||||
)
|
|
||||||
self.groupBox.setTitle(_translate("MainWindow", "aDIS"))
|
self.groupBox.setTitle(_translate("MainWindow", "aDIS"))
|
||||||
self.media_checked.setText(_translate("MainWindow", "Medien geprüft"))
|
self.media_checked.setText(_translate("MainWindow", "Medien geprüft"))
|
||||||
self.media_edited_check.setText(_translate("MainWindow", "Medien bearbeitet"))
|
self.media_edited_check.setText(_translate("MainWindow", "Medien bearbeitet"))
|
||||||
self.app_created.setText(_translate("MainWindow", "Apparat angelegt"))
|
self.app_created.setText(_translate("MainWindow", "Apparat angelegt"))
|
||||||
self.btn_copy_adis_command.setToolTip(
|
self.btn_copy_adis_command.setToolTip(_translate("MainWindow", "Hier klicken, um die aDIS Abfrage in die Zwischenablage zu kopieren"))
|
||||||
_translate(
|
self.btn_copy_adis_command.setText(_translate("MainWindow", " aDIS Abfrage in Zwischenablage kopieren"))
|
||||||
"MainWindow",
|
|
||||||
"Hier klicken, um die aDIS Abfrage in die Zwischenablage zu kopieren",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.btn_copy_adis_command.setText(
|
|
||||||
_translate("MainWindow", " aDIS Abfrage in Zwischenablage kopieren")
|
|
||||||
)
|
|
||||||
self.menuDatei.setTitle(_translate("MainWindow", "Datei"))
|
self.menuDatei.setTitle(_translate("MainWindow", "Datei"))
|
||||||
self.menuEinstellungen.setTitle(_translate("MainWindow", "Bearbeiten"))
|
self.menuEinstellungen.setTitle(_translate("MainWindow", "Bearbeiten"))
|
||||||
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
|
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
|
||||||
@@ -1152,11 +954,8 @@ class Ui_MainWindow(object):
|
|||||||
self.actionBeenden.setShortcut(_translate("MainWindow", "Ctrl+Q"))
|
self.actionBeenden.setShortcut(_translate("MainWindow", "Ctrl+Q"))
|
||||||
self.actionEinstellungen.setText(_translate("MainWindow", "Einstellungen"))
|
self.actionEinstellungen.setText(_translate("MainWindow", "Einstellungen"))
|
||||||
self.actionEinstellungen.setShortcut(_translate("MainWindow", "Alt+S"))
|
self.actionEinstellungen.setShortcut(_translate("MainWindow", "Alt+S"))
|
||||||
self.actionDokumentation.setText(
|
self.actionDokumentation.setText(_translate("MainWindow", "Dokumentation (online)"))
|
||||||
_translate("MainWindow", "Dokumentation (online)")
|
|
||||||
)
|
|
||||||
self.actionDokumentation.setShortcut(_translate("MainWindow", "F1"))
|
self.actionDokumentation.setShortcut(_translate("MainWindow", "F1"))
|
||||||
self.actionAbout.setText(_translate("MainWindow", "About"))
|
self.actionAbout.setText(_translate("MainWindow", "About"))
|
||||||
self.actionDokumentation_lokal.setText(
|
self.actionDokumentation_lokal.setText(_translate("MainWindow", "Dokumentation (lokal)"))
|
||||||
_translate("MainWindow", "Dokumentation (lokal)")
|
self.actionDokumentation_lokal.setShortcut(_translate("MainWindow", "F1"))
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
from PyQt6 import QtWidgets
|
||||||
|
|
||||||
from src import Icon, settings as config
|
from src import Icon, settings as config, logger
|
||||||
|
|
||||||
|
|
||||||
from .dialog_sources.Ui_mail_preview import Ui_eMailPreview as MailPreviewDialog
|
from .dialog_sources.Ui_mail_preview import Ui_eMailPreview as MailPreviewDialog
|
||||||
@@ -43,13 +43,7 @@ class Mail_Dialog(QtWidgets.QDialog, MailPreviewDialog):
|
|||||||
default_mail="Information zum Semesterapparat",
|
default_mail="Information zum Semesterapparat",
|
||||||
):
|
):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.setupUi(
|
self.setupUi(self)
|
||||||
self,
|
|
||||||
# app_id,
|
|
||||||
# app_name,
|
|
||||||
# app_subject,
|
|
||||||
# prof_name,
|
|
||||||
)
|
|
||||||
|
|
||||||
logger.info("Setting up mail dialog")
|
logger.info("Setting up mail dialog")
|
||||||
self.appid = app_id
|
self.appid = app_id
|
||||||
@@ -86,7 +80,9 @@ class Mail_Dialog(QtWidgets.QDialog, MailPreviewDialog):
|
|||||||
logger.info("Opening new template dialog")
|
logger.info("Opening new template dialog")
|
||||||
# TODO: implement new mail template dialog
|
# TODO: implement new mail template dialog
|
||||||
dialog = MailTemplateDialog()
|
dialog = MailTemplateDialog()
|
||||||
|
dialog.updateSignal.connect(self.load_mail_templates)
|
||||||
dialog.exec()
|
dialog.exec()
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def determine_signature(self):
|
def determine_signature(self):
|
||||||
@@ -103,6 +99,7 @@ Tel.: 0761/682-778 | 07617682-545"""
|
|||||||
logger.info("Loading mail templates")
|
logger.info("Loading mail templates")
|
||||||
mail_templates = os.listdir("mail_vorlagen")
|
mail_templates = os.listdir("mail_vorlagen")
|
||||||
logger.info(f"Mail templates: {mail_templates}")
|
logger.info(f"Mail templates: {mail_templates}")
|
||||||
|
self.comboBox.clear()
|
||||||
for template in mail_templates:
|
for template in mail_templates:
|
||||||
self.comboBox.addItem(template)
|
self.comboBox.addItem(template)
|
||||||
|
|
||||||
@@ -146,12 +143,10 @@ Tel.: 0761/682-778 | 07617682-545"""
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.mail_body.setHtml(mail_html)
|
self.mail_body.setHtml(mail_html)
|
||||||
logger.info(f"Mail template set to {email_template}")
|
|
||||||
|
|
||||||
def createAndSendMail(self):
|
def createAndSendMail(self):
|
||||||
logger.info("Sending mail")
|
logger.info("Sending mail")
|
||||||
import smtplib
|
import smtplib
|
||||||
import ssl
|
|
||||||
from email.mime.multipart import MIMEMultipart
|
from email.mime.multipart import MIMEMultipart
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
|
|
||||||
@@ -193,7 +188,13 @@ Tel.: 0761/682-778 | 07617682-545"""
|
|||||||
self.accept()
|
self.accept()
|
||||||
|
|
||||||
|
|
||||||
def launch_gui(app_id="", app_name="", app_subject="", prof_name="", prof_mail=""):
|
def launch_gui(
|
||||||
|
app_id="1",
|
||||||
|
app_name="Test",
|
||||||
|
app_subject="Test",
|
||||||
|
prof_name="Tester, 001",
|
||||||
|
prof_mail="alexander.kirchner@ph-freiburg.de",
|
||||||
|
):
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
dialog = Mail_Dialog(
|
dialog = Mail_Dialog(
|
||||||
app_id=app_id,
|
app_id=app_id,
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
from PyQt6 import QtGui, QtWidgets, QtCore
|
||||||
from PyQt6.QtGui import QFont
|
|
||||||
|
|
||||||
from src import Icon
|
from src import Icon
|
||||||
|
|
||||||
from .dialog_sources import NewMailTemplateDesignerDialog
|
from .dialog_sources import NewMailTemplateDesignerDialog
|
||||||
|
from src import logger
|
||||||
|
|
||||||
class MailTemplateDialog(QtWidgets.QDialog, NewMailTemplateDesignerDialog):
|
class MailTemplateDialog(QtWidgets.QDialog, NewMailTemplateDesignerDialog):
|
||||||
|
updateSignal = QtCore.pyqtSignal()
|
||||||
def __init__(self, parent=None) -> None:
|
def __init__(self, parent=None) -> None:
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
@@ -37,7 +37,7 @@ class MailTemplateDialog(QtWidgets.QDialog, NewMailTemplateDesignerDialog):
|
|||||||
self.buttonBox.button(
|
self.buttonBox.button(
|
||||||
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||||
).clicked.connect(self.closeNow)
|
).clicked.connect(self.closeNow)
|
||||||
|
logger.info("Mail template dialog setup complete")
|
||||||
def save_template(self):
|
def save_template(self):
|
||||||
# print("save triggered")
|
# print("save triggered")
|
||||||
# create a dialog to ask for the name of the template
|
# create a dialog to ask for the name of the template
|
||||||
@@ -50,9 +50,11 @@ class MailTemplateDialog(QtWidgets.QDialog, NewMailTemplateDesignerDialog):
|
|||||||
dialog.setWindowIcon(Icon("save").icon)
|
dialog.setWindowIcon(Icon("save").icon)
|
||||||
save = dialog.exec()
|
save = dialog.exec()
|
||||||
template_name = dialog.textValue()
|
template_name = dialog.textValue()
|
||||||
|
logger.info("Saving template")
|
||||||
if template_name != "" and save == 1:
|
if template_name != "" and save == 1:
|
||||||
template = template_name + ".eml"
|
template = template_name + ".eml"
|
||||||
if template in os.listdir("mail_vorlagen"):
|
if template in os.listdir("mail_vorlagen"):
|
||||||
|
logger.error("Template already exists")
|
||||||
# warning dialog
|
# warning dialog
|
||||||
dialog = QtWidgets.QMessageBox()
|
dialog = QtWidgets.QMessageBox()
|
||||||
dialog.setIcon(QtWidgets.QMessageBox.Icon.Warning)
|
dialog.setIcon(QtWidgets.QMessageBox.Icon.Warning)
|
||||||
@@ -69,28 +71,30 @@ class MailTemplateDialog(QtWidgets.QDialog, NewMailTemplateDesignerDialog):
|
|||||||
ret = dialog.exec()
|
ret = dialog.exec()
|
||||||
if ret == QtWidgets.QMessageBox.StandardButton.No:
|
if ret == QtWidgets.QMessageBox.StandardButton.No:
|
||||||
return
|
return
|
||||||
mail = f"""Subject: {self.subject.text()}
|
mail = f"""Subject: {self.subject.text()}
|
||||||
MIME-Version: 1.0
|
MIME-Version: 1.0
|
||||||
Content-Type: text/html; charset="UTF-8"
|
Content-Type: text/html; charset="UTF-8"
|
||||||
Content-Transfer-Encoding: 8bit
|
Content-Transfer-Encoding: 8bit
|
||||||
{self.templateEdit.toHtml()}"""
|
{self.templateEdit.toHtml()}"""
|
||||||
html_head = """<html>
|
html_head = """<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
</head>
|
</head>
|
||||||
"""
|
"""
|
||||||
mail_base = mail.split("<html>")[0]
|
mail_base = mail.split("<html>")[0]
|
||||||
mail_body = mail.split("</head>")[1]
|
mail_body = mail.split("</head>")[1]
|
||||||
mail = mail_base + html_head + mail_body
|
mail = mail_base + html_head + mail_body
|
||||||
mail = (
|
mail = (
|
||||||
mail.replace("<", "<")
|
mail.replace("<", "<")
|
||||||
.replace(">", ">")
|
.replace(">", ">")
|
||||||
.replace(""", '"')
|
.replace(""", '"')
|
||||||
.replace("&", "&")
|
.replace("&", "&")
|
||||||
)
|
)
|
||||||
with open(f"mail_vorlagen/{template}", "w") as f:
|
with open(f"mail_vorlagen/{template}", "w", encoding="utf-8") as f:
|
||||||
f.write(mail)
|
f.write(mail)
|
||||||
self.close()
|
self.updateSignal.emit()
|
||||||
|
self.close()
|
||||||
|
logger.success(f"Template {template} saved successfully")
|
||||||
else:
|
else:
|
||||||
# warning dialog
|
# warning dialog
|
||||||
dialog = QtWidgets.QMessageBox()
|
dialog = QtWidgets.QMessageBox()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# 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.
|
||||||
|
|
||||||
|
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
from PyQt6 import QtCore, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
class Ui_Dialog(object):
|
class Ui_Dialog(object):
|
||||||
|
|||||||
@@ -513,7 +513,7 @@
|
|||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QTableWidget" name="dokument_list">
|
<widget class="QTableWidget" name="document_list">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>780</x>
|
<x>780</x>
|
||||||
@@ -1612,224 +1612,245 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
<widget class="QWidget" name="verticalLayoutWidget_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>1280</x>
|
<x>1280</x>
|
||||||
<y>370</y>
|
<y>0</y>
|
||||||
<width>301</width>
|
<width>306</width>
|
||||||
<height>381</height>
|
<height>751</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="steps">
|
<widget class="QFrame" name="calendar_frame">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::StyledPanel</enum>
|
<enum>QFrame::StyledPanel</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="calendarlayout"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_creation_progress">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QFrame" name="steps">
|
||||||
<property name="enabled">
|
<property name="frameShape">
|
||||||
<bool>true</bool>
|
<enum>QFrame::StyledPanel</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="frameShadow">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<enum>QFrame::Raised</enum>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<font>
|
<property name="spacing">
|
||||||
<pointsize>11</pointsize>
|
<number>0</number>
|
||||||
<bold>true</bold>
|
</property>
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Software</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="appdata_check">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>8</pointsize>
|
<pointsize>11</pointsize>
|
||||||
<bold>false</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="title">
|
||||||
<enum>Qt::NoFocus</enum>
|
<string>Software</string>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Apparatsdaten eingegeben</string>
|
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="appdata_check">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Apparatsdaten eingegeben</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="media_check">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Medien hinzugefügt / importiert</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="ids_check">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Prof-ID und Apparat-ID eingetragen</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="media_check">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>8</pointsize>
|
<pointsize>11</pointsize>
|
||||||
<bold>false</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="title">
|
||||||
<enum>Qt::NoFocus</enum>
|
<string>aDIS</string>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Medien hinzugefügt / importiert</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="ids_check">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Prof-ID und Apparat-ID eingetragen</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>aDIS</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="media_checked">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
<underline>false</underline>
|
|
||||||
<stylestrategy>PreferDefault</stylestrategy>
|
|
||||||
<kerning>true</kerning>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Medien geprüft</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="media_edited_check">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
<underline>false</underline>
|
|
||||||
<stylestrategy>PreferDefault</stylestrategy>
|
|
||||||
<kerning>true</kerning>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Medien bearbeitet</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="app_created">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
<underline>false</underline>
|
|
||||||
<stylestrategy>PreferDefault</stylestrategy>
|
|
||||||
<kerning>true</kerning>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Apparat angelegt</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btn_copy_adis_command">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
<underline>false</underline>
|
|
||||||
<stylestrategy>PreferDefault</stylestrategy>
|
|
||||||
<kerning>true</kerning>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Hier klicken, um die aDIS Abfrage in die Zwischenablage zu kopieren</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="accessibleDescription">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> aDIS Abfrage in Zwischenablage kopieren</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>../../../../../../.designer/backup/icons/information.png</normaloff>../../../../../../.designer/backup/icons/information.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="media_checked">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
<stylestrategy>PreferDefault</stylestrategy>
|
||||||
|
<kerning>true</kerning>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Medien geprüft</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="media_edited_check">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
<stylestrategy>PreferDefault</stylestrategy>
|
||||||
|
<kerning>true</kerning>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Medien bearbeitet</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="app_created">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
<stylestrategy>PreferDefault</stylestrategy>
|
||||||
|
<kerning>true</kerning>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Apparat angelegt</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btn_copy_adis_command">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
<stylestrategy>PreferDefault</stylestrategy>
|
||||||
|
<kerning>true</kerning>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Hier klicken, um die aDIS Abfrage in die Zwischenablage zu kopieren</string>
|
||||||
|
</property>
|
||||||
|
<property name="statusTip">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleDescription">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string> aDIS Abfrage in Zwischenablage kopieren</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>../../../../../../.designer/backup/icons/information.png</normaloff>../../../../../../.designer/backup/icons/information.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -1840,37 +1861,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QFrame" name="frame_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>1280</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>301</width>
|
|
||||||
<height>331</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="calendarlayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="frame_creation_progress">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menubar">
|
<widget class="QMenuBar" name="menubar">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
@@ -1898,7 +1888,6 @@
|
|||||||
<string>Help</string>
|
<string>Help</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionDokumentation_lokal"/>
|
<addaction name="actionDokumentation_lokal"/>
|
||||||
<addaction name="actionDokumentation"/>
|
|
||||||
<addaction name="actionAbout"/>
|
<addaction name="actionAbout"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuDatei"/>
|
<addaction name="menuDatei"/>
|
||||||
@@ -1954,6 +1943,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Dokumentation (lokal)</string>
|
<string>Dokumentation (lokal)</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>F1</string>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from PyQt6.QtCore import QThread
|
|||||||
from PyQt6.QtGui import QRegularExpressionValidator
|
from PyQt6.QtGui import QRegularExpressionValidator
|
||||||
|
|
||||||
from src import Icon, logger
|
from src import Icon, logger
|
||||||
from src.backend import Database, BookGrabber, AvailChecker
|
from src.backend import Database, BookGrabber, AvailChecker, DocumentationThread
|
||||||
from src.backend.semester import Semester
|
from src.backend.semester import Semester
|
||||||
from src.backend.create_file import recreateFile
|
from src.backend.create_file import recreateFile
|
||||||
from src.backend.delete_temp_contents import delete_temp_contents as tempdelete
|
from src.backend.delete_temp_contents import delete_temp_contents as tempdelete
|
||||||
@@ -79,7 +79,8 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.add_medium.clicked.connect(self.btn_add_medium)
|
self.add_medium.clicked.connect(self.btn_add_medium)
|
||||||
self.btn_copy_adis_command.clicked.connect(self.text_to_clipboard)
|
self.btn_copy_adis_command.clicked.connect(self.text_to_clipboard)
|
||||||
self.btn_reserve.clicked.connect(self.check_availability)
|
self.btn_reserve.clicked.connect(self.check_availability)
|
||||||
self.calendarWidget = MessageCalendar(self.frame_2)
|
self.create_document.clicked.connect(self.create_doc)
|
||||||
|
self.calendarWidget = MessageCalendar(self.calendar_frame)
|
||||||
self.calendarWidget.setGridVisible(True)
|
self.calendarWidget.setGridVisible(True)
|
||||||
self.calendarWidget.setVerticalHeaderFormat(
|
self.calendarWidget.setVerticalHeaderFormat(
|
||||||
QtWidgets.QCalendarWidget.VerticalHeaderFormat.NoVerticalHeader
|
QtWidgets.QCalendarWidget.VerticalHeaderFormat.NoVerticalHeader
|
||||||
@@ -100,7 +101,7 @@ class Ui(Ui_Semesterapparat):
|
|||||||
# Actions
|
# Actions
|
||||||
self.actionEinstellungen.triggered.connect(self.open_settings)
|
self.actionEinstellungen.triggered.connect(self.open_settings)
|
||||||
Icon("settings", self.actionEinstellungen)
|
Icon("settings", self.actionEinstellungen)
|
||||||
self.actionDokumentation.triggered.connect(self.open_documentation)
|
self.actionDokumentation_lokal.triggered.connect(self.open_documentation)
|
||||||
Icon("offAction", self.actionBeenden)
|
Icon("offAction", self.actionBeenden)
|
||||||
self.actionBeenden.triggered.connect(self.quit)
|
self.actionBeenden.triggered.connect(self.quit)
|
||||||
self.actionAbout.triggered.connect(self.open_about)
|
self.actionAbout.triggered.connect(self.open_about)
|
||||||
@@ -184,9 +185,9 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.validate_thread.started.connect(self.thread_check)
|
self.validate_thread.started.connect(self.thread_check)
|
||||||
self.validate_thread.start()
|
self.validate_thread.start()
|
||||||
self.add_medium.setEnabled(False)
|
self.add_medium.setEnabled(False)
|
||||||
self.docuthread = QThread()
|
self.docu = DocumentationThread()
|
||||||
self.docuthread.started.connect(self.create_doc)
|
self.docu.start()
|
||||||
self.create_document.clicked.connect(self.docuthread.start)
|
self.actionDokumentation_lokal.triggered.connect(self.open_documentation)
|
||||||
|
|
||||||
# get all current apparats and cache them in a list
|
# get all current apparats and cache them in a list
|
||||||
self.apparats = self.get_apparats()
|
self.apparats = self.get_apparats()
|
||||||
@@ -224,14 +225,21 @@ class Ui(Ui_Semesterapparat):
|
|||||||
|
|
||||||
self.elsatab.setLayout(QtWidgets.QVBoxLayout())
|
self.elsatab.setLayout(QtWidgets.QVBoxLayout())
|
||||||
self.search_statistics.setLayout(QtWidgets.QVBoxLayout())
|
self.search_statistics.setLayout(QtWidgets.QVBoxLayout())
|
||||||
# once inputSignal emits, check state
|
|
||||||
|
# add splitter
|
||||||
|
self.splitter = QtWidgets.QSplitter(QtCore.Qt.Orientation.Vertical)
|
||||||
|
self.splitter.addWidget(self.calendar_frame)
|
||||||
|
self.splitter.addWidget(self.frame_creation_progress)
|
||||||
|
self.verticalLayout.removeWidget(self.calendar_frame)
|
||||||
|
self.verticalLayout.removeWidget(self.frame_creation_progress)
|
||||||
|
self.verticalLayout.addWidget(self.splitter)
|
||||||
|
|
||||||
self.steps.hide()
|
self.steps.hide()
|
||||||
|
|
||||||
def create_doc(self):
|
def create_doc(self):
|
||||||
result = self.confirm_popup(
|
result = self.confirm_popup(
|
||||||
"Mit dem Klick auf Okay wird eine Übersicht aller aktiven Semesterapparate erstellt und an den FollowME Drucker gesendet. Es kann bis zu 10 Minuten dauern, bis das Dokument im Drucker angezeigt wird",
|
"Mit dem Klick auf Okay wird eine Übersicht aller aktiven Semesterapparate erstellt und an den FollowME Drucker gesendet. Es kann bis zu 10 Minuten dauern, bis das document im Drucker angezeigt wird",
|
||||||
"Dokument erstellen?",
|
"document erstellen?",
|
||||||
)
|
)
|
||||||
if result == QtWidgets.QDialog.DialogCode.Accepted:
|
if result == QtWidgets.QDialog.DialogCode.Accepted:
|
||||||
# print("Creating document")
|
# print("Creating document")
|
||||||
@@ -321,11 +329,12 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.app_fach.addItems([subject[1] for subject in self.db.getSubjects()])
|
self.app_fach.addItems([subject[1] for subject in self.db.getSubjects()])
|
||||||
|
|
||||||
def open_documentation(self):
|
def open_documentation(self):
|
||||||
raise NotImplementedError("Documentation not implemented yet")
|
logger.info("Opening Documentation")
|
||||||
# open the documentation in the default browser
|
webbrowser.open("http://localhost:8000")
|
||||||
webbrowser.open("file:///" + os.path.abspath("docs/index.html"))
|
|
||||||
# documentation = documentationview.DocumentationViewer()
|
def update_calendar(self, data):
|
||||||
# documentation.show()
|
self.calendarWidget.setMessages([data])
|
||||||
|
self.calendarWidget.updateCells()
|
||||||
|
|
||||||
def tabW1_changed(self):
|
def tabW1_changed(self):
|
||||||
if self.tabWidget.currentIndex() == 1: # Statistics
|
if self.tabWidget.currentIndex() == 1: # Statistics
|
||||||
@@ -340,7 +349,7 @@ class Ui(Ui_Semesterapparat):
|
|||||||
statistics = SearchStatisticPage()
|
statistics = SearchStatisticPage()
|
||||||
statistics.apparat_open.connect(self.open_apparat)
|
statistics.apparat_open.connect(self.open_apparat)
|
||||||
statistics.refreshSignal.connect(self.update_apparat_list)
|
statistics.refreshSignal.connect(self.update_apparat_list)
|
||||||
|
statistics.updateCalendar.connect(self.update_calendar)
|
||||||
stats_layout.addWidget(statistics)
|
stats_layout.addWidget(statistics)
|
||||||
|
|
||||||
# #print("searchpage")
|
# #print("searchpage")
|
||||||
@@ -618,7 +627,7 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.sem_sommer.setEnabled(False)
|
self.sem_sommer.setEnabled(False)
|
||||||
self.sem_winter.setEnabled(False)
|
self.sem_winter.setEnabled(False)
|
||||||
self.sem_year.setEnabled(False)
|
self.sem_year.setEnabled(False)
|
||||||
self.dokument_list.setRowCount(0)
|
self.document_list.setRowCount(0)
|
||||||
self.chkbx_show_del_media.setEnabled(True)
|
self.chkbx_show_del_media.setEnabled(True)
|
||||||
appdata = self.db.getApparatData(appnr, appname)
|
appdata = self.db.getApparatData(appnr, appname)
|
||||||
self.populate_frame(appdata)
|
self.populate_frame(appdata)
|
||||||
@@ -628,22 +637,22 @@ class Ui(Ui_Semesterapparat):
|
|||||||
|
|
||||||
self.drpdwn_app_nr.setDisabled(True)
|
self.drpdwn_app_nr.setDisabled(True)
|
||||||
self.update_app_media_list()
|
self.update_app_media_list()
|
||||||
self.update_documemt_list()
|
self.update_document_list()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def update_documemt_list(self):
|
def update_document_list(self):
|
||||||
app_id = self.active_apparat
|
app_id = self.active_apparat
|
||||||
prof_id = self.db.getProfByName(
|
prof_id = self.db.getProfByName(
|
||||||
self.drpdwn_prof_name.currentText().replace(",", "")
|
self.drpdwn_prof_name.currentText().replace(",", "")
|
||||||
).id
|
).id
|
||||||
files = self.db.getFiles(app_id, prof_id)
|
files = self.db.getFiles(app_id, prof_id)
|
||||||
for file in files:
|
for file in files:
|
||||||
self.dokument_list.insertRow(0)
|
self.document_list.insertRow(0)
|
||||||
self.dokument_list.setItem(0, 0, QtWidgets.QTableWidgetItem(file[0]))
|
self.document_list.setItem(0, 0, QtWidgets.QTableWidgetItem(file[0]))
|
||||||
self.dokument_list.setItem(0, 1, QtWidgets.QTableWidgetItem(file[1]))
|
self.document_list.setItem(0, 1, QtWidgets.QTableWidgetItem(file[1]))
|
||||||
self.dokument_list.setItem(0, 2, QtWidgets.QTableWidgetItem(""))
|
self.document_list.setItem(0, 2, QtWidgets.QTableWidgetItem(""))
|
||||||
self.dokument_list.setItem(0, 3, QtWidgets.QTableWidgetItem("Database"))
|
self.document_list.setItem(0, 3, QtWidgets.QTableWidgetItem("Database"))
|
||||||
self.dokument_list.item(0, 0).setToolTip(file[0])
|
self.document_list.item(0, 0).setToolTip(file[0])
|
||||||
|
|
||||||
def btn_create_new_apparat(self):
|
def btn_create_new_apparat(self):
|
||||||
global valid_input
|
global valid_input
|
||||||
@@ -652,9 +661,9 @@ class Ui(Ui_Semesterapparat):
|
|||||||
child.show()
|
child.show()
|
||||||
# *create a new apparat
|
# *create a new apparat
|
||||||
self.btn_apparat_save.show() if self.btn_apparat_save.isHidden() else None
|
self.btn_apparat_save.show() if self.btn_apparat_save.isHidden() else None
|
||||||
# clear dokumemt_list
|
# clear document_list
|
||||||
self.__clear_fields()
|
self.__clear_fields()
|
||||||
self.dokument_list.setRowCount(0)
|
self.document_list.setRowCount(0)
|
||||||
self.cancel_active_selection.setEnabled(True)
|
self.cancel_active_selection.setEnabled(True)
|
||||||
self.app_group_box.setEnabled(True)
|
self.app_group_box.setEnabled(True)
|
||||||
self.add_medium.setEnabled(True)
|
self.add_medium.setEnabled(True)
|
||||||
@@ -749,7 +758,6 @@ class Ui(Ui_Semesterapparat):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def check_availability(self):
|
def check_availability(self):
|
||||||
# self.threadeds.clear()
|
|
||||||
|
|
||||||
def _update_progress(current, all_titles):
|
def _update_progress(current, all_titles):
|
||||||
self.avail_status.setText("{}/{}".format(current, all_titles))
|
self.avail_status.setText("{}/{}".format(current, all_titles))
|
||||||
@@ -798,14 +806,13 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.availChecker.start()
|
self.availChecker.start()
|
||||||
# kill availcheck after completion
|
# kill availcheck after completion
|
||||||
|
|
||||||
# self.threadeds.append(thread)
|
|
||||||
# self.grabbers.append(availcheck)
|
# self.grabbers.append(availcheck)
|
||||||
|
|
||||||
def btn_cancel_active_selection(self):
|
def btn_cancel_active_selection(self):
|
||||||
self.steps.hide()
|
self.steps.hide()
|
||||||
# clear the rows of the table
|
# clear the rows of the table
|
||||||
self.tableWidget_apparat_media.setRowCount(0)
|
self.tableWidget_apparat_media.setRowCount(0)
|
||||||
self.dokument_list.setRowCount(0)
|
self.document_list.setRowCount(0)
|
||||||
self.app_group_box.setEnabled(False)
|
self.app_group_box.setEnabled(False)
|
||||||
self.app_fach.setCurrentText("")
|
self.app_fach.setCurrentText("")
|
||||||
self.chkbx_show_del_media.hide()
|
self.chkbx_show_del_media.hide()
|
||||||
@@ -945,30 +952,30 @@ class Ui(Ui_Semesterapparat):
|
|||||||
# #print(file)
|
# #print(file)
|
||||||
filename = file.split("/")[-1]
|
filename = file.split("/")[-1]
|
||||||
filetype = filename.split(".")[-1]
|
filetype = filename.split(".")[-1]
|
||||||
self.dokument_list.insertRow(0)
|
self.document_list.insertRow(0)
|
||||||
self.dokument_list.setItem(0, 0, QtWidgets.QTableWidgetItem(filename))
|
self.document_list.setItem(0, 0, QtWidgets.QTableWidgetItem(filename))
|
||||||
self.dokument_list.setItem(0, 1, QtWidgets.QTableWidgetItem(filetype))
|
self.document_list.setItem(0, 1, QtWidgets.QTableWidgetItem(filetype))
|
||||||
self.dokument_list.setItem(0, 2, QtWidgets.QTableWidgetItem("*"))
|
self.document_list.setItem(0, 2, QtWidgets.QTableWidgetItem("*"))
|
||||||
self.dokument_list.setItem(0, 3, QtWidgets.QTableWidgetItem(file))
|
self.document_list.setItem(0, 3, QtWidgets.QTableWidgetItem(file))
|
||||||
# set tooltip of row 3 to the file path for each row
|
# set tooltip of row 3 to the file path for each row
|
||||||
self.dokument_list.item(0, 3).setToolTip(file)
|
self.document_list.item(0, 3).setToolTip(file)
|
||||||
self.dokument_list.item(0, 0).setToolTip(filename)
|
self.document_list.item(0, 0).setToolTip(filename)
|
||||||
|
|
||||||
def open_document(self):
|
def open_document(self):
|
||||||
_selected_doc_name = ""
|
_selected_doc_name = ""
|
||||||
_selected_doc_filetype = ""
|
_selected_doc_filetype = ""
|
||||||
try:
|
try:
|
||||||
_selected_doc_name = self.dokument_list.item(
|
_selected_doc_name = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 0
|
self.document_list.currentRow(), 0
|
||||||
).text()
|
).text()
|
||||||
_selected_doc_location = self.dokument_list.item(
|
_selected_doc_location = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 3
|
self.document_list.currentRow(), 3
|
||||||
).text()
|
).text()
|
||||||
_selected_doc_filetype = self.dokument_list.item(
|
_selected_doc_filetype = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 1
|
self.document_list.currentRow(), 1
|
||||||
).text()
|
).text()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
self.confirm_popup("Bitte erst ein Dokument auswählen!", title="Fehler")
|
self.confirm_popup("Bitte erst ein document auswählen!", title="Fehler")
|
||||||
return
|
return
|
||||||
if not _selected_doc_location == "Database":
|
if not _selected_doc_location == "Database":
|
||||||
path = Path(_selected_doc_location + "/" + _selected_doc_name)
|
path = Path(_selected_doc_location + "/" + _selected_doc_name)
|
||||||
@@ -1009,24 +1016,24 @@ class Ui(Ui_Semesterapparat):
|
|||||||
# get
|
# get
|
||||||
|
|
||||||
# if files are in the table, and are selected, check for books in the file
|
# if files are in the table, and are selected, check for books in the file
|
||||||
if self.dokument_list.rowCount() == 0:
|
if self.document_list.rowCount() == 0:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
# if file is selected, check for books in the file
|
# if file is selected, check for books in the file
|
||||||
if self.dokument_list.currentRow() != -1:
|
if self.document_list.currentRow() != -1:
|
||||||
# #print("File selected")
|
# #print("File selected")
|
||||||
file = self.dokument_list.item(
|
file = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 3
|
self.document_list.currentRow(), 3
|
||||||
).text()
|
).text()
|
||||||
|
|
||||||
file_type = self.dokument_list.item(
|
file_type = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 1
|
self.document_list.currentRow(), 1
|
||||||
).text()
|
).text()
|
||||||
file_location = self.dokument_list.item(
|
file_location = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 3
|
self.document_list.currentRow(), 3
|
||||||
).text()
|
).text()
|
||||||
file_name = self.dokument_list.item(
|
file_name = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 0
|
self.document_list.currentRow(), 0
|
||||||
).text()
|
).text()
|
||||||
if file_location == "Database":
|
if file_location == "Database":
|
||||||
# create a temporaty file to use, delete it after use
|
# create a temporaty file to use, delete it after use
|
||||||
@@ -1041,7 +1048,7 @@ class Ui(Ui_Semesterapparat):
|
|||||||
if file_type == "pdf":
|
if file_type == "pdf":
|
||||||
# Todo: implement parser here
|
# Todo: implement parser here
|
||||||
self.confirm_popup(
|
self.confirm_popup(
|
||||||
"PDF Dateien werden nochnicht unterstützt!", title="Fehler"
|
"PDF Dateien werden noch nicht unterstützt!", title="Fehler"
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
if file_type == "csv":
|
if file_type == "csv":
|
||||||
@@ -1096,7 +1103,7 @@ class Ui(Ui_Semesterapparat):
|
|||||||
if not self.btn_save_apparat(False):
|
if not self.btn_save_apparat(False):
|
||||||
return
|
return
|
||||||
created = True
|
created = True
|
||||||
if self.dokument_list.rowCount() == 0:
|
if self.document_list.rowCount() == 0:
|
||||||
# #print("No file selected")
|
# #print("No file selected")
|
||||||
self.tableWidget_apparate.setEnabled(True)
|
self.tableWidget_apparate.setEnabled(True)
|
||||||
self.tableWidget_apparate.setToolTip("")
|
self.tableWidget_apparate.setToolTip("")
|
||||||
@@ -1104,16 +1111,16 @@ class Ui(Ui_Semesterapparat):
|
|||||||
else:
|
else:
|
||||||
# if file is selected, check for books in the file
|
# if file is selected, check for books in the file
|
||||||
# #print("File selected")
|
# #print("File selected")
|
||||||
file = self.dokument_list.item(self.dokument_list.currentRow(), 3).text()
|
file = self.document_list.item(self.document_list.currentRow(), 3).text()
|
||||||
|
|
||||||
file_type = self.dokument_list.item(
|
file_type = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 1
|
self.document_list.currentRow(), 1
|
||||||
).text()
|
).text()
|
||||||
file_location = self.dokument_list.item(
|
file_location = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 3
|
self.document_list.currentRow(), 3
|
||||||
).text()
|
).text()
|
||||||
file_name = self.dokument_list.item(
|
file_name = self.document_list.item(
|
||||||
self.dokument_list.currentRow(), 0
|
self.document_list.currentRow(), 0
|
||||||
).text()
|
).text()
|
||||||
if file_location == "Database":
|
if file_location == "Database":
|
||||||
file = recreateFile(file_name, app_id, file_type, open=False)
|
file = recreateFile(file_name, app_id, file_type, open=False)
|
||||||
@@ -1182,7 +1189,7 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.app_fach.setCurrentText("")
|
self.app_fach.setCurrentText("")
|
||||||
self.app_name.clear()
|
self.app_name.clear()
|
||||||
self.sem_year.clear()
|
self.sem_year.clear()
|
||||||
self.dokument_list.setRowCount(0)
|
self.document_list.setRowCount(0)
|
||||||
self.sem_winter.setChecked(False)
|
self.sem_winter.setChecked(False)
|
||||||
self.sem_sommer.setChecked(False)
|
self.sem_sommer.setChecked(False)
|
||||||
self.check_eternal_app.setChecked(False)
|
self.check_eternal_app.setChecked(False)
|
||||||
@@ -1224,7 +1231,7 @@ class Ui(Ui_Semesterapparat):
|
|||||||
if error:
|
if error:
|
||||||
self.confirm_popup(error.__str__(), title="Fehler")
|
self.confirm_popup(error.__str__(), title="Fehler")
|
||||||
return False
|
return False
|
||||||
if self.dokument_list.rowCount() > 0:
|
if self.document_list.rowCount() > 0:
|
||||||
self.add_files()
|
self.add_files()
|
||||||
if error is not None:
|
if error is not None:
|
||||||
self.confirm_popup(error.__str__(), title="Fehler")
|
self.confirm_popup(error.__str__(), title="Fehler")
|
||||||
@@ -1268,16 +1275,16 @@ class Ui(Ui_Semesterapparat):
|
|||||||
|
|
||||||
def add_files(self, prof_id=None):
|
def add_files(self, prof_id=None):
|
||||||
files = []
|
files = []
|
||||||
for i in range(self.dokument_list.rowCount()):
|
for i in range(self.document_list.rowCount()):
|
||||||
files.append(
|
files.append(
|
||||||
{
|
{
|
||||||
"name": self.dokument_list.item(i, 0).text(),
|
"name": self.document_list.item(i, 0).text(),
|
||||||
"type": self.dokument_list.item(i, 1).text(),
|
"type": self.document_list.item(i, 1).text(),
|
||||||
"date": self.dokument_list.item(i, 2).text(),
|
"date": self.document_list.item(i, 2).text(),
|
||||||
"path": self.dokument_list.item(i, 3).text(),
|
"path": self.document_list.item(i, 3).text(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
self.dokument_list.item(i, 2).setText("")
|
self.document_list.item(i, 2).setText("")
|
||||||
|
|
||||||
self.db.insertFile(
|
self.db.insertFile(
|
||||||
files,
|
files,
|
||||||
@@ -1339,22 +1346,22 @@ class Ui(Ui_Semesterapparat):
|
|||||||
remind_action = menu.addAction("Erinnerung")
|
remind_action = menu.addAction("Erinnerung")
|
||||||
menu.addAction(extend_action)
|
menu.addAction(extend_action)
|
||||||
menu.addActions([contact_action, delete_action, remind_action])
|
menu.addActions([contact_action, delete_action, remind_action])
|
||||||
|
extend_action.triggered.connect(self.extend_apparat)
|
||||||
|
remind_action.triggered.connect(self.reminder)
|
||||||
# convert point to row and column
|
# convert point to row and column
|
||||||
row = self.tableWidget_apparate.rowAt(position.y())
|
row = self.tableWidget_apparate.rowAt(position.y())
|
||||||
column = self.tableWidget_apparate.columnAt(position.x())
|
column = self.tableWidget_apparate.columnAt(position.x())
|
||||||
pos = (str(row), str(column))
|
pos = (str(row), str(column))
|
||||||
if len(self.tableWidget_apparate.selectedItems()) == 0:
|
if len(self.tableWidget_apparate.selectedItems()) == 0:
|
||||||
return
|
return
|
||||||
pid = self.__get_table_data_field(self.tableWidget_apparate, pos[0], 2)
|
app_id = self.tableWidget_apparate.item(row, 0).text()
|
||||||
app_id = self.__get_table_data_field(self.tableWidget_apparate, pos[0], 0)
|
pid = self.db.getProfIDByApparat(app_id)
|
||||||
logger.debug(pos, pid)
|
logger.debug(app_id, pid)
|
||||||
extend_action.triggered.connect(self.extend_apparat)
|
|
||||||
delete_action.triggered.connect(lambda: self.delete_apparat(pos))
|
delete_action.triggered.connect(lambda: self.delete_apparat(pos))
|
||||||
# pass pos to contact_prof
|
# pass pos to contact_prof
|
||||||
contact_action.triggered.connect(
|
contact_action.triggered.connect(
|
||||||
lambda: self.contact_prof(pid=pid, apparat=app_id)
|
lambda: self.contact_prof(pid=pid, apparat=app_id)
|
||||||
)
|
)
|
||||||
remind_action.triggered.connect(self.reminder)
|
|
||||||
menu.exec(self.tableWidget_apparate.mapToGlobal(position))
|
menu.exec(self.tableWidget_apparate.mapToGlobal(position))
|
||||||
|
|
||||||
def reminder(self):
|
def reminder(self):
|
||||||
@@ -1371,11 +1378,10 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.active_user,
|
self.active_user,
|
||||||
self.active_apparat if self.active_apparat != "" else appnr,
|
self.active_apparat if self.active_apparat != "" else appnr,
|
||||||
)
|
)
|
||||||
self.calendarWidget.setMessages([data])
|
self.update_calendar(data)
|
||||||
self.calendarWidget.updateCells()
|
|
||||||
# self.db.update_bookdata(data, book_id)
|
# self.db.update_bookdata(data, book_id)
|
||||||
# self.db.update_bookdata(data)
|
# self.db.update_bookdata(data)
|
||||||
logger.info("Commited message to database")
|
logger.info("committed message to database")
|
||||||
# self.update_app_media_list()
|
# self.update_app_media_list()
|
||||||
|
|
||||||
def get_reminders(self):
|
def get_reminders(self):
|
||||||
@@ -1524,7 +1530,7 @@ class Ui(Ui_Semesterapparat):
|
|||||||
signature = self.tableWidget_apparat_media.item(
|
signature = self.tableWidget_apparat_media.item(
|
||||||
self.tableWidget_apparat_media.currentRow(), 1
|
self.tableWidget_apparat_media.currentRow(), 1
|
||||||
).text()
|
).text()
|
||||||
medium = self.db.getBookBasedOnSignature(
|
self.db.getBookBasedOnSignature(
|
||||||
self.drpdwn_app_nr.currentText(),
|
self.drpdwn_app_nr.currentText(),
|
||||||
signature=signature,
|
signature=signature,
|
||||||
prof_id=self.db.getProfId(self.profdata),
|
prof_id=self.db.getProfId(self.profdata),
|
||||||
@@ -1630,13 +1636,12 @@ class Ui(Ui_Semesterapparat):
|
|||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
def __get_table_data_field(self, table, row, column):
|
|
||||||
logger.debug(row, column)
|
|
||||||
row = int(row)
|
|
||||||
return table.item(row, column).text()
|
|
||||||
|
|
||||||
def __contact_dialog(self, apparat, location: tuple | str, mail=None, pid=""):
|
def __contact_dialog(self, apparat, location: tuple | str, mail=None, pid=""):
|
||||||
logger.debug(location, pid, apparat)
|
logger.debug(
|
||||||
|
"Got these values apparat: {}, location: {}, mail: {}, pid: {}".format(
|
||||||
|
apparat, location, mail, pid
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
active_apparat_id = (
|
active_apparat_id = (
|
||||||
self.drpdwn_app_nr.currentText() if apparat is None else apparat
|
self.drpdwn_app_nr.currentText() if apparat is None else apparat
|
||||||
@@ -1644,15 +1649,10 @@ class Ui(Ui_Semesterapparat):
|
|||||||
if not active_apparat_id:
|
if not active_apparat_id:
|
||||||
# get column 0 of the selected row
|
# get column 0 of the selected row
|
||||||
pass
|
pass
|
||||||
# #print(active_apparat_id)
|
if isinstance(pid, str):
|
||||||
|
prof_id = self.db.getProfByName(pid).id
|
||||||
# profname = self.drpdwn_prof_name.currentText().replace(",", "").split(" ")
|
else:
|
||||||
# if profname != [""]:
|
prof_id = pid
|
||||||
# profname = f"{profname[1]} {profname[0]}"
|
|
||||||
# if pid == "":
|
|
||||||
# pid = profname
|
|
||||||
# get the row of the clicked cell
|
|
||||||
prof_id = self.db.getProfByName(pid).id
|
|
||||||
# if profname == "Name Kein":
|
# if profname == "Name Kein":
|
||||||
# profname = pid
|
# profname = pid
|
||||||
if self.app_name.text() != "":
|
if self.app_name.text() != "":
|
||||||
@@ -1664,16 +1664,11 @@ class Ui(Ui_Semesterapparat):
|
|||||||
else:
|
else:
|
||||||
app_subject = self.db.getApparatData(active_apparat_id, app_name)
|
app_subject = self.db.getApparatData(active_apparat_id, app_name)
|
||||||
app_subject = app_subject.apparat.subject
|
app_subject = app_subject.apparat.subject
|
||||||
# profname = f"{profname.split(" ")[1]} {profname.split(" ")[0]}"
|
|
||||||
# #print(pid)
|
|
||||||
if prof_id:
|
if prof_id:
|
||||||
pmail = self.db.getSpecificProfData(prof_id, ["mail"])
|
pmail = self.db.getSpecificProfData(prof_id, ["mail"])
|
||||||
prof_name = self.db.getSpecificProfData(prof_id, ["fullname"])
|
prof_name = self.db.getSpecificProfData(prof_id, ["fullname"])
|
||||||
else:
|
else:
|
||||||
pmail = self.prof_mail.text()
|
pmail = self.prof_mail.text()
|
||||||
# #print(prof_name)
|
|
||||||
# create a new thread to show the mail interface and send the mail
|
|
||||||
# #print("showing mail dialog")
|
|
||||||
self.mail_thread = Mail_Dialog(
|
self.mail_thread = Mail_Dialog(
|
||||||
app_id=active_apparat_id,
|
app_id=active_apparat_id,
|
||||||
prof_name=prof_name,
|
prof_name=prof_name,
|
||||||
@@ -1703,9 +1698,11 @@ class Ui(Ui_Semesterapparat):
|
|||||||
message = f"Soll der Apparat {selected_apparat_id} wirklich gelöscht werden?"
|
message = f"Soll der Apparat {selected_apparat_id} wirklich gelöscht werden?"
|
||||||
state = self.confirm_popup(message, title="Löschen?")
|
state = self.confirm_popup(message, title="Löschen?")
|
||||||
# #print(state)
|
# #print(state)
|
||||||
pid = self.__get_table_data_field(self.tableWidget_apparate, position[0], 2)
|
logger.info("Result state: {}", state)
|
||||||
if state == 1:
|
if state == 1:
|
||||||
self.db.deleteApparat(selected_apparat_id)
|
logger.debug("Deleting apparat {}", selected_apparat_id)
|
||||||
|
pid = self.db.getProfIDByApparat(selected_apparat_id)
|
||||||
|
self.db.deleteApparat(selected_apparat_id, Semester().value)
|
||||||
# delete the corresponding entry from self.apparats
|
# delete the corresponding entry from self.apparats
|
||||||
for apparat in self.apparats:
|
for apparat in self.apparats:
|
||||||
if apparat[4] == int(selected_apparat_id):
|
if apparat[4] == int(selected_apparat_id):
|
||||||
|
|||||||
Reference in New Issue
Block a user