add error icon, statustip -> dialog
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
institution_name: HB Testbibliothek Psychologie
|
institution_name: HB Testbibliothek Psychologie
|
||||||
default_loan_duration: 7
|
default_loan_duration: 7
|
||||||
|
catalogue: True
|
||||||
database:
|
database:
|
||||||
path: C:/testdatabase_1
|
path: C:/testdatabase_1
|
||||||
name: libr.db
|
name: librr.db
|
||||||
backupLocation: V:/backup
|
backupLocation: V:/backup
|
||||||
do_backup: false
|
do_backup: false
|
||||||
report:
|
report:
|
||||||
@@ -10,4 +11,3 @@ report:
|
|||||||
email: None
|
email: None
|
||||||
debug: false
|
debug: false
|
||||||
log_debug: false
|
log_debug: false
|
||||||
catalogue: True
|
|
||||||
|
|||||||
1
icons/error.svg
Normal file
1
icons/error.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#c0c0c0"><path d="M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 537 B |
@@ -1,15 +1,16 @@
|
|||||||
color: '#B89230' #Hex code of the color
|
color: '#B89230' #Hex code of the color
|
||||||
icons:
|
icons:
|
||||||
newentry: library_add.svg
|
addBook: add_book.svg
|
||||||
|
add_user: add_user.svg
|
||||||
|
backup: db_backup.svg
|
||||||
|
borrow: book.svg
|
||||||
|
duplicate: duplicate.svg
|
||||||
|
error: error.svg
|
||||||
|
loan_extend: calendar_event.svg
|
||||||
main: library.svg
|
main: library.svg
|
||||||
warning: warning.svg
|
multiuser: multiple_user.svg
|
||||||
|
newentry: library_add.svg
|
||||||
|
report: report.svg
|
||||||
settings: settings.svg
|
settings: settings.svg
|
||||||
user: user.svg
|
user: user.svg
|
||||||
multiuser: multiple_user.svg
|
warning: warning.svg
|
||||||
add_user: add_user.svg
|
|
||||||
borrow: book.svg
|
|
||||||
backup: db_backup.svg
|
|
||||||
addBook: add_book.svg
|
|
||||||
report: report.svg
|
|
||||||
duplicate: duplicate.svg
|
|
||||||
loan_extend: calendar_event.svg
|
|
||||||
@@ -251,9 +251,7 @@ class MainUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
self.mediaAdd(value)
|
self.mediaAdd(value)
|
||||||
|
|
||||||
def mediaAdd(self, identifier):
|
def mediaAdd(self, identifier):
|
||||||
self.clearStatusTip
|
|
||||||
# print("Adding Media", identifier)
|
# print("Adding Media", identifier)
|
||||||
self.setStatusTip("")
|
|
||||||
self.input_file_ident.clear()
|
self.input_file_ident.clear()
|
||||||
self.input_file_ident.setEnabled(False)
|
self.input_file_ident.setEnabled(False)
|
||||||
|
|
||||||
@@ -385,13 +383,12 @@ class MainUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
print("Book not found")
|
print("Book not found")
|
||||||
|
|
||||||
def setStatusTipMessage(self, message):
|
def setStatusTipMessage(self, message):
|
||||||
self.setStatusTip(message)
|
dialog = QtWidgets.QMessageBox()
|
||||||
|
dialog.setWindowTitle("Fehler")
|
||||||
@property
|
dialog.setIcon(QtWidgets.QMessageBox.Icon.Information)
|
||||||
def clearStatusTip(self):
|
dialog.setWindowIcon(Icon("error").overwriteColor("#EA3323"))
|
||||||
self.setStatusTip("")
|
dialog.setText(message)
|
||||||
|
dialog.exec()
|
||||||
|
|
||||||
def exit_handler():
|
def exit_handler():
|
||||||
dbg("Exiting, creating backup")
|
dbg("Exiting, creating backup")
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
@@ -426,6 +423,6 @@ def exit_handler():
|
|||||||
def launch():
|
def launch():
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
main_ui = MainUI()
|
main_ui = MainUI()
|
||||||
# atexit.register(exit_handler)
|
atexit.register(exit_handler)
|
||||||
sys.exit(app.exec())
|
sys.exit(app.exec())
|
||||||
# sys.exit(app.exec())
|
# sys.exit(app.exec())
|
||||||
|
|||||||
Reference in New Issue
Block a user