mirror of
https://github.com/FAUSheppy/ths-datenlogger
synced 2025-12-06 12:11:35 +01:00
improve info outputs
This commit is contained in:
@@ -37,3 +37,7 @@ info_output_path = "INFO: Output wird gespeichert nach: {}"
|
|||||||
|
|
||||||
# imageutils.py
|
# imageutils.py
|
||||||
info_divergence = "INFO: Seitenverhältnisabweichung zu A4: {:.2f}%"
|
info_divergence = "INFO: Seitenverhältnisabweichung zu A4: {:.2f}%"
|
||||||
|
|
||||||
|
success = "INFO: Fertig."
|
||||||
|
testing_input = "Info: Eingabedatei wird geprüft..."
|
||||||
|
testing_input_suc = "Info: Eingabedatei akzeptiert."
|
||||||
|
|||||||
@@ -199,11 +199,14 @@ class WidgetGallery(QDialog):
|
|||||||
self.truePath = plot.plot(self.datapoints, path=target,
|
self.truePath = plot.plot(self.datapoints, path=target,
|
||||||
date1=startDateTime,
|
date1=startDateTime,
|
||||||
date2=endDateTime,
|
date2=endDateTime,
|
||||||
forcePath=forcePath)
|
forcePath=forcePath,
|
||||||
|
qtTextBrowser=self.infoTextBox)
|
||||||
|
|
||||||
self.buttonGo.setText(self.localization.button_go)
|
self.buttonGo.setText(self.localization.button_go)
|
||||||
self.buttonGo.setDisabled(False)
|
self.buttonGo.setDisabled(False)
|
||||||
|
|
||||||
|
self.infoTextBox.append(self.localization.success)
|
||||||
|
|
||||||
doneDialog = QMessageBox(self)
|
doneDialog = QMessageBox(self)
|
||||||
doneDialog.setAttribute(PyQt5.QtCore.Qt.WA_DeleteOnClose)
|
doneDialog.setAttribute(PyQt5.QtCore.Qt.WA_DeleteOnClose)
|
||||||
doneDialog.setText(self.localization.done_text)
|
doneDialog.setText(self.localization.done_text)
|
||||||
@@ -222,10 +225,7 @@ class WidgetGallery(QDialog):
|
|||||||
if not self.srcFileString:
|
if not self.srcFileString:
|
||||||
return
|
return
|
||||||
|
|
||||||
waitDialog = QMessageBox(self)
|
self.infoTextBox.append(self.localization.testing_input)
|
||||||
waitDialog.setAttribute(PyQt5.QtCore.Qt.WA_DeleteOnClose)
|
|
||||||
waitDialog.setText(self.localization.wait_dialog_text)
|
|
||||||
waitDialog.show()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.datapoints = input_backend.read_in_file(self.srcFileString,
|
self.datapoints = input_backend.read_in_file(self.srcFileString,
|
||||||
@@ -234,7 +234,6 @@ class WidgetGallery(QDialog):
|
|||||||
plotOutsideHum=False,
|
plotOutsideHum=False,
|
||||||
qtTextBrowser=self.infoTextBox)
|
qtTextBrowser=self.infoTextBox)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
waitDialog.close()
|
|
||||||
errorBox = QMessageBox(self)
|
errorBox = QMessageBox(self)
|
||||||
errorBox.setAttribute(PyQt5.QtCore.Qt.WA_DeleteOnClose)
|
errorBox.setAttribute(PyQt5.QtCore.Qt.WA_DeleteOnClose)
|
||||||
errorBox.setText(self.localization.error_read_in)
|
errorBox.setText(self.localization.error_read_in)
|
||||||
@@ -242,7 +241,6 @@ class WidgetGallery(QDialog):
|
|||||||
errorBox.show()
|
errorBox.show()
|
||||||
return
|
return
|
||||||
|
|
||||||
waitDialog.close()
|
|
||||||
|
|
||||||
start = self.datapoints[cp.CFG("plot_temperatur_key")].getFirstTime()
|
start = self.datapoints[cp.CFG("plot_temperatur_key")].getFirstTime()
|
||||||
self.startDateEdit.setDateTime(start)
|
self.startDateEdit.setDateTime(start)
|
||||||
@@ -258,6 +256,8 @@ class WidgetGallery(QDialog):
|
|||||||
self.startTimeEdit.setDisabled(False)
|
self.startTimeEdit.setDisabled(False)
|
||||||
self.endTimeEdit.setDisabled(False)
|
self.endTimeEdit.setDisabled(False)
|
||||||
|
|
||||||
|
self.infoTextBox.append(self.localization.testing_input_suc)
|
||||||
|
|
||||||
def selectTargetFile(self):
|
def selectTargetFile(self):
|
||||||
'''Function to select a target-file'''
|
'''Function to select a target-file'''
|
||||||
self.targetFileString = QFileDialog.getSaveFileName(self,
|
self.targetFileString = QFileDialog.getSaveFileName(self,
|
||||||
|
|||||||
Reference in New Issue
Block a user