read highlighters from settings.ini
This commit is contained in:
@@ -7,6 +7,7 @@ from typing import List, Optional
|
||||
from PyQt6.QtGui import QBrush, QColor, QPen
|
||||
|
||||
from highlight_regex import HighlightRegex
|
||||
from highlighting import Highlighting
|
||||
from line import Line
|
||||
import os
|
||||
from settings import Settings
|
||||
@@ -20,14 +21,15 @@ class LogFileModel:
|
||||
self._file = os.path.realpath(file)
|
||||
self._lock = threading.RLock()
|
||||
|
||||
self.highlights = [
|
||||
HighlightRegex(
|
||||
re.compile("ERROR"),
|
||||
brush=QBrush(QColor(220, 112, 122)),
|
||||
pen=QPen(QColor(0, 0, 0)),
|
||||
brush_full_line=QBrush(QColor(255, 112, 122))
|
||||
)
|
||||
]
|
||||
self.highlights = Highlighting.read_config(settings)
|
||||
# [
|
||||
# HighlightRegex(
|
||||
# re.compile("ERROR"),
|
||||
# brush=QBrush(QColor(220, 112, 122)),
|
||||
# pen=QPen(QColor(0, 0, 0)),
|
||||
# brush_full_line=QBrush(QColor(255, 112, 122))
|
||||
# )
|
||||
# ]
|
||||
|
||||
def get_file(self):
|
||||
return self._file
|
||||
|
||||
Reference in New Issue
Block a user