move highlights to model
makes it easier to manage highlights
This commit is contained in:
@@ -2,6 +2,10 @@ import math
|
||||
import threading
|
||||
import time
|
||||
from typing import List
|
||||
|
||||
from PyQt6.QtGui import QBrush, QColor
|
||||
|
||||
from highlight_regex import HighlightRegex
|
||||
from line import Line
|
||||
import os
|
||||
from settings import Settings
|
||||
@@ -14,6 +18,14 @@ class LogFileModel:
|
||||
self._file = os.path.realpath(file)
|
||||
self._lock = threading.RLock()
|
||||
|
||||
self.highlights = [
|
||||
HighlightRegex(
|
||||
r"ERROR",
|
||||
brush=QBrush(QColor(220, 112, 122)),
|
||||
brush_full_line=QBrush(QColor(255, 112, 122))
|
||||
)
|
||||
]
|
||||
|
||||
def get_file(self):
|
||||
return self._file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user