Skip to content
Permalink
Browse files

Merge pull request #3628 from rouault/dbmanager_gpkg

[DBManager] Add dedicated GeoPackage plugin
  • Loading branch information
rouault committed Oct 24, 2016
2 parents 72229c1 + d32a949 commit af236c4ef8303f4ff95f9f0733d25e08659318eb
@@ -5,3 +5,4 @@ qgis_composermapgridtest
qgis_composerutils
ProcessingGrass7AlgorithmsImageryTest
ProcessingGrass7AlgorithmsRasterTest
PyQgsDBManagerGpkg
@@ -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})

No changes.

0 comments on commit af236c4

Please sign in to comment.
You can’t perform that action at this time.