add sqlalchemy as orm tool

This commit is contained in:
Thomas Peetz
2025-01-10 17:39:54 +01:00
parent a1e8474149
commit 2ae11e24ef
10 changed files with 281 additions and 172 deletions
+20
View File
@@ -56,6 +56,16 @@ class KontorTableModel(QAbstractTableModel):
return self._main_window.tick
else:
return self._main_window.cross
if isinstance(value, int):
if value == 1:
return self._main_window.tick
else:
return self._main_window.cross
if isinstance(value, bool):
if value:
return self._main_window.tick
else:
return self._main_window.cross
return str(value)
if role == Qt.ItemDataRole.DecorationRole:
if isinstance(value, bytes):
@@ -64,6 +74,16 @@ class KontorTableModel(QAbstractTableModel):
return self._main_window.tick
else:
return self._main_window.cross
if isinstance(value, int):
if value == 1:
return self._main_window.tick
else:
return self._main_window.cross
if isinstance(value, bool):
if value:
return self._main_window.tick
else:
return self._main_window.cross
def columnCount(self, index=QModelIndex()):
# The following takes the first sub-list, and returns