[cleanup]
This commit is contained in:
parent
ddb39146cd
commit
fc65542aee
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ target
|
||||
env/
|
||||
__pycache__
|
||||
main.spec
|
||||
*.afdesign
|
@ -15,6 +15,7 @@ class ItemDescriptor():
|
||||
self.value = value
|
||||
self.entity_type = entity_type
|
||||
|
||||
|
||||
class NodeType(Enum):
|
||||
Root = "root"
|
||||
Section = "section"
|
||||
@ -37,6 +38,7 @@ class Singleton(type):
|
||||
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
|
||||
return cls._instances[cls]
|
||||
|
||||
|
||||
class FileHandler(metaclass=Singleton):
|
||||
|
||||
def __init__(self) -> None:
|
||||
@ -75,7 +77,6 @@ class FileHandler(metaclass=Singleton):
|
||||
|
||||
return ItemDescriptor()
|
||||
|
||||
|
||||
@property
|
||||
def is_valid(self):
|
||||
return self._nix_file is not None and self._nix_file.is_open()
|
||||
|
@ -1,9 +1,8 @@
|
||||
from PyQt5.QtCore import QAbstractItemModel, QFile, QModelIndex, QSize, Qt
|
||||
from PyQt5.QtCore import QAbstractItemModel, QModelIndex, Qt
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QHeaderView, QTreeWidgetItem
|
||||
from PyQt5.QtWidgets import QTreeWidgetItem
|
||||
|
||||
from file_handler import ItemDescriptor, NodeType
|
||||
from IPython import embed
|
||||
|
||||
column_names = ['Name', 'Type', 'ID', 'Value', 'Description']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user