A lot of changes going on

This commit is contained in:
2025-05-13 16:40:48 +02:00
parent 3ff830b3e2
commit 5b16432767
37 changed files with 4332 additions and 183 deletions

View File

@@ -1,6 +1,7 @@
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot, Signal
from .ObjectDAO import ObjectDAO
from ..ConfigLoader import ConfigLoader
from ..PyqcrmDataRoles import PyqcrmDataRoles
import re
import json
@@ -66,8 +67,16 @@ class ObjectModel(QAbstractTableModel):
if object_col > 4 and tr:
tr = re.sub("Keine Angabe ","", tr)
return tr
elif role == PyqcrmDataRoles.STREET_IN_POSTCODE:
pass
return None
def roleNames(self):
return {
Qt.DisplayRole: b"display",
PyqcrmDataRoles.STREET_IN_POSTCODE: b"StreetInPostcode",
}
def headerData(self, section, orientation, role = Qt.DisplayRole):
if orientation == Qt.Horizontal and role == Qt.DisplayRole:
self.__col_name = self.__visible_columns[section + self.__col_skip]