コード例 #1
0
    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 = {}
コード例 #2
0
ファイル: db_model.py プロジェクト: NyakudyaA/QGIS
    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))
コード例 #3
0
    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))
コード例 #4
0
 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]
コード例 #5
0
 def __init__(self, postgis_finder):
     QAbstractItemModel.__init__(self)
     self.postgis_finder = postgis_finder
     self.searchesLoaded()
コード例 #6
0
ファイル: qtmodels.py プロジェクト: gltn/stdm
 def __init__(self, root, parent=None, view=None):
     QAbstractItemModel.__init__(self, parent)
     self._rootNode = root
     self._view = view
コード例 #7
0
 def __init__(self, project_finder):
     QAbstractItemModel.__init__(self)
     self.project_finder = project_finder
     self.project_finder.fileChanged.connect(self.fileChanged)