jdxi_editor.ui.widgets.viewer.log ================================= .. py:module:: jdxi_editor.ui.widgets.viewer.log .. autoapi-nested-parse:: Module: log_viewer ================== This module provides a graphical log viewer using PySide6. The `LogViewer` class is a QMainWindow-based widget that displays the log file written by Decologr in a styled QTextEdit widget. It automatically refreshes to show new log entries. Classes: -------- - `LogViewer`: A main window that displays the log file and refreshes automatically. Features: --------- - Dark theme with a modern red-accented styling. - Automatically reads and displays the log file written by Decologr. - Refreshes periodically to show new log entries. - Provides a "Clear Log" button to reset the log digital. - Auto-scrolls to the bottom to show the latest entries. Usage Example: -------------- >>> viewer = LogViewer() >>> viewer.show() Classes ------- .. autoapisummary:: jdxi_editor.ui.widgets.viewer.log.LogViewer Module Contents --------------- .. py:class:: LogViewer(midi_helper=None, parent=None) Bases: :py:obj:`PySide6.QtWidgets.QMainWindow` .. py:attribute:: log_file .. py:attribute:: last_position :value: 0 .. py:attribute:: fast_refresh_mode :value: True .. py:attribute:: log_text .. py:attribute:: refresh_mode_button .. py:attribute:: refresh_timer .. py:method:: load_log_file() Load the entire log file into the text widget .. py:method:: refresh_log_file() Read new lines from the log file and append them .. py:method:: toggle_refresh_mode() Toggle between fast refresh (500ms) and slow refresh (30s) .. py:method:: clear_log() Clear the log digital .. py:method:: closeEvent(event) Stop the refresh timer when window is closed