add time diff plugin

This commit is contained in:
2022-03-12 09:28:33 +01:00
parent b99421e8e7
commit 297f67b9b5
16 changed files with 239 additions and 21 deletions

View File

@@ -0,0 +1,18 @@
from typing import List
from src.plugins.logfile.preprocesslineshook import PreProcessLinesHook
class PreProcessLinesModel:
def __init__(self):
self._pre_process_lines_hooks: List[PreProcessLinesHook] = []
def add_hook(self, hook: PreProcessLinesHook):
self._pre_process_lines_hooks.append(hook)
def add_hooks(self, hooks: List[PreProcessLinesHook]):
for hook in hooks:
self.add_hook(hook)
def get_hooks(self) -> List[PreProcessLinesHook]:
return self._pre_process_lines_hooks.copy()

View File

@@ -5,5 +5,9 @@ class HBox(QWidget):
def __init__(self, *widgets: QWidget):
super(HBox, self).__init__()
self.layout = QHBoxLayout(self)
self.layout.setContentsMargins(0, 0, 0, 0)
for widget in widgets:
self.layout.addWidget(widget)
def addWidget(self, widget: QWidget):
self.layout.addWidget(widget)