diff --git a/Furious/Widget/Application.py b/Furious/Widget/Application.py index 701a973..f55cc0d 100644 --- a/Furious/Widget/Application.py +++ b/Furious/Widget/Application.py @@ -225,6 +225,9 @@ class Application(ApplicationFactory, SingletonApplication): ) logging.raiseExceptions = False + def log(self): + return self.logViewerWindowApp_.plainText() + def addCustomFont(self): fontFile = str(DATA_DIR / 'font' / 'CascadiaMono') fontName = 'Cascadia Mono' diff --git a/Furious/Window/LogViewerWindow.py b/Furious/Window/LogViewerWindow.py index fc24666..268786a 100644 --- a/Furious/Window/LogViewerWindow.py +++ b/Furious/Window/LogViewerWindow.py @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import annotations + from Furious.QtFramework import * from Furious.QtFramework import gettext as _ @@ -176,6 +178,9 @@ class LogViewerWindow(AppQMainWindow): self.menuBar().addMenu(self._editMenu) self.menuBar().addMenu(self._viewMenu) + def plainText(self) -> str: + return self.textBrowser.toPlainText() + def appendLine(self, line: str): self.textBrowser.appendLine(line)