add log to edit signal

This commit is contained in:
Dominik Demuth
2023-11-05 15:20:40 +01:00
parent 5a8ef8c9c7
commit 9e9751cd9d
6 changed files with 255 additions and 47 deletions

View File

@ -1,4 +1,9 @@
from __future__ import annotations
from pathlib import Path
from nmreval.io.asciireader import AsciiReader
from nmreval.utils import NUMBER_RE
from ..Qt import QtGui, QtCore, QtWidgets
from .._py.asciidialog import Ui_ascii_reader
@ -57,6 +62,8 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
self.skippy_checkbox.setCheckState(QtCore.Qt.Unchecked)
self.skippy_checkbox.blockSignals(False)
self.check_filename(fname)
return self
def set_gui(self):
@ -215,3 +222,8 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
@QtCore.pyqtSlot(int, name='on_skippy_checkbox_stateChanged')
def skip_next_dial(self, _: int):
self.skip = self.skippy_checkbox.isChecked()
def check_filename(self, filename: str | Path):
self.label_8.setText(str(filename.stem))
for i in NUMBER_RE.finditer(str(filename.stem)):
print(i)