def __init__(self, parent): QAbstractItemModel.__init__(self, parent) self.__ngw_connection_settings = None self._ngw_connection = None self.jobs = [] self.root_item = QNGWConnectionItem() self.__indexes_blocked_by_jobs = {} self.__indexes_blocked_by_job_errors = {}
def __init__(self, parent=None): global isImportVectorAvail QAbstractItemModel.__init__(self, parent) self.treeView = parent self.header = [self.tr('Databases')] if isImportVectorAvail: self.importVector.connect(self.vectorImport) self.hasSpatialiteSupport = "spatialite" in supportedDbTypes() self.rootItem = TreeItem(None, None) for dbtype in supportedDbTypes(): dbpluginclass = createDbPlugin(dbtype) item = PluginItem(dbpluginclass, self.rootItem) item.changed.connect(partial(self.refreshItem, item))
def headerData(self, section, orientation, role=Qt.DisplayRole): if role != Qt.DisplayRole: # We are being asked for something else, do the default implementation return QAbstractItemModel.headerData(self, section, orientation, role) if orientation == Qt.Vertical: return section + 1 else: return self.headerNames[section]
def __init__(self, postgis_finder): QAbstractItemModel.__init__(self) self.postgis_finder = postgis_finder self.searchesLoaded()
def __init__(self, root, parent=None, view=None): QAbstractItemModel.__init__(self, parent) self._rootNode = root self._view = view
def __init__(self, project_finder): QAbstractItemModel.__init__(self) self.project_finder = project_finder self.project_finder.fileChanged.connect(self.fileChanged)