Skip to content
Permalink
Browse files
[FEATURE] [DBManager] Add a GeoPackage dedicated plugin
  • Loading branch information
rouault committed Oct 18, 2016
1 parent 68cb04a commit 3f2866c47a0fc2960bd7c3760f242be8dce2c680
@@ -300,6 +300,7 @@ def __init__(self, parent=None):
self.importVector.connect(self.vectorImport)

self.hasSpatialiteSupport = "spatialite" in supportedDbTypes()
self.hasGPKGSupport = "gpkg" in supportedDbTypes()

self.rootItem = TreeItem(None, None)
for dbtype in supportedDbTypes():
@@ -401,7 +402,7 @@ def flags(self, index):
flags |= Qt.ItemIsDropEnabled

# SL/Geopackage db files can be dropped everywhere in the tree
if self.hasSpatialiteSupport:
if self.hasSpatialiteSupport or self.hasGPKGSupport:
flags |= Qt.ItemIsDropEnabled

return flags
@@ -1,5 +1,6 @@
ADD_SUBDIRECTORY(postgis)
ADD_SUBDIRECTORY(spatialite)
ADD_SUBDIRECTORY(gpkg)
IF(WITH_ORACLE)
ADD_SUBDIRECTORY(oracle)
ENDIF(WITH_ORACLE)
@@ -25,7 +25,8 @@
class NotSupportedDbType(Exception):

def __init__(self, dbtype):
self.msg = self.tr("%s is not supported yet") % dbtype
from qgis.PyQt.QtWidgets import QApplication
self.msg = QApplication.translate("DBManagerPlugin", "%s is not supported yet" % dbtype)
Exception(self, self.msg)

def __str__(self):
@@ -0,0 +1,9 @@

FILE(GLOB PY_FILES *.py)
FILE(GLOB ICON_FILES icons/*.png)

PYQT_ADD_RESOURCES(PYRC_FILES resources.qrc)

PLUGIN_INSTALL(db_manager db_plugins/gpkg ${PY_FILES} ${PYRC_FILES})
PLUGIN_INSTALL(db_manager db_plugins/gpkg/icons ${ICON_FILES})

Empty file.

0 comments on commit 3f2866c

Please sign in to comment.