implement auto show and hide of the tool buttons in the media group box
This commit is contained in:
@@ -178,6 +178,7 @@ class Ui(Ui_Semesterapparat):
|
|||||||
self.line_3.hide()
|
self.line_3.hide()
|
||||||
self.avail_status.hide()
|
self.avail_status.hide()
|
||||||
self.chkbx_show_del_media.hide()
|
self.chkbx_show_del_media.hide()
|
||||||
|
self.automation_add_selected_books.hide()
|
||||||
# self.btn_del_select_apparats.setEnabled(False)
|
# self.btn_del_select_apparats.setEnabled(False)
|
||||||
|
|
||||||
self.tabWidget.currentChanged.connect(self.tabW1_changed)
|
self.tabWidget.currentChanged.connect(self.tabW1_changed)
|
||||||
@@ -589,6 +590,8 @@ class Ui(Ui_Semesterapparat):
|
|||||||
def load_app_data(self, app_id=None):
|
def load_app_data(self, app_id=None):
|
||||||
self.cancel_active_selection.setEnabled(True)
|
self.cancel_active_selection.setEnabled(True)
|
||||||
self.add_medium.setEnabled(True)
|
self.add_medium.setEnabled(True)
|
||||||
|
for child in self.app_group_box.findChildren(QtWidgets.QToolButton):
|
||||||
|
child.show()
|
||||||
if isinstance(app_id, str):
|
if isinstance(app_id, str):
|
||||||
# double click the tableWidget_apparate row with the given app_id
|
# double click the tableWidget_apparate row with the given app_id
|
||||||
row, column = self.get_index_of_value(self.tableWidget_apparate, app_id)
|
row, column = self.get_index_of_value(self.tableWidget_apparate, app_id)
|
||||||
@@ -633,6 +636,8 @@ class Ui(Ui_Semesterapparat):
|
|||||||
def btn_create_new_apparat(self):
|
def btn_create_new_apparat(self):
|
||||||
global valid_input
|
global valid_input
|
||||||
self.steps.show()
|
self.steps.show()
|
||||||
|
for child in self.app_group_box.findChildren(QtWidgets.QToolButton):
|
||||||
|
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 dokumemt_list
|
||||||
@@ -803,6 +808,8 @@ class Ui(Ui_Semesterapparat):
|
|||||||
|
|
||||||
for child in self.app_group_box.findChildren(QtWidgets.QLineEdit):
|
for child in self.app_group_box.findChildren(QtWidgets.QLineEdit):
|
||||||
child.clear()
|
child.clear()
|
||||||
|
for child in self.app_group_box.findChildren(QtWidgets.QToolButton):
|
||||||
|
child.hide()
|
||||||
self.validate_app_fach()
|
self.validate_app_fach()
|
||||||
self.validate_app_name()
|
self.validate_app_name()
|
||||||
self.validate_prof_mail()
|
self.validate_prof_mail()
|
||||||
@@ -1319,6 +1326,8 @@ class Ui(Ui_Semesterapparat):
|
|||||||
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:
|
||||||
|
return
|
||||||
pid = self.__get_table_data_field(self.tableWidget_apparate, pos[0], 2)
|
pid = self.__get_table_data_field(self.tableWidget_apparate, pos[0], 2)
|
||||||
app_id = self.__get_table_data_field(self.tableWidget_apparate, pos[0], 0)
|
app_id = self.__get_table_data_field(self.tableWidget_apparate, pos[0], 0)
|
||||||
ic(pos, pid)
|
ic(pos, pid)
|
||||||
|
|||||||
Reference in New Issue
Block a user