rename ravenlog to krowlog
There is a database named RavenDB. KrowLog starts with a K, which is a) distinctive and b) has an association to KDE.
This commit is contained in:
47
src/plugins/logfile/fulltabwidget.py
Normal file
47
src/plugins/logfile/fulltabwidget.py
Normal file
@@ -0,0 +1,47 @@
|
||||
from PySide6.QtWidgets import *
|
||||
from PySide6.QtCore import *
|
||||
|
||||
from src.ui.bigtext.bigtext import BigText
|
||||
from src.plugins.logfile.filterviewsyncer import FilterViewSyncer
|
||||
from src.plugins.logfile.filterwidget import FilterWidget
|
||||
from src.ui.bigtext.logFileModel import LogFileModel
|
||||
from src.plugins.krowlog.Tab import Tab
|
||||
from src.util.conversion import humanbytes
|
||||
|
||||
|
||||
class FullTabWidget(Tab):
|
||||
|
||||
def __init__(self, model: LogFileModel, unique_id: str, title: str):
|
||||
super(FullTabWidget, self).__init__(unique_id, title)
|
||||
self._model = model
|
||||
self.file_view = BigText(model)
|
||||
self.filter_hit_view = FilterWidget(self._model)
|
||||
self.filter_view_syncer = FilterViewSyncer(self.file_view)
|
||||
self.filter_hit_view.add_line_click_listener(self.filter_view_syncer.click_listener)
|
||||
self.filter_hit_view.add_filter_match_found_listener(self.filter_view_syncer.match_found)
|
||||
|
||||
self.layout = QVBoxLayout(self)
|
||||
self.layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
splitter = QSplitter()
|
||||
splitter.setOrientation(Qt.Orientation.Vertical)
|
||||
splitter.setHandleWidth(5)
|
||||
# splitter.setStyleSheet("QSplitter::handle{background: #cccccc;}")
|
||||
splitter.addWidget(self.file_view)
|
||||
splitter.addWidget(self.filter_hit_view)
|
||||
|
||||
self.layout.addWidget(splitter)
|
||||
|
||||
def get_file(self) -> str:
|
||||
return self.file_view.get_file()
|
||||
|
||||
# overriding abstract method
|
||||
def destruct(self):
|
||||
self.file_view.destruct()
|
||||
self.filter_hit_view.destruct()
|
||||
|
||||
# overriding abstract method
|
||||
def get_status_text(self) -> str:
|
||||
file = self._model.get_file()
|
||||
file_size = humanbytes(self._model.byte_count())
|
||||
return "%s - %s" % (file_size, file)
|
||||
Reference in New Issue
Block a user