Skip to content
Browse files
[dbmanager] add connection icon
this harmonizes display with that of the browser panel
  • Loading branch information
nirvn committed Jun 30, 2018
1 parent a7aec56 commit eb5521507b3d2a65f4d61dd4ad5d17837fb516f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
@@ -156,6 +156,9 @@ def data(self, column):
return self.getItemData().connectionName()
return None

def icon(self):
return self.getItemData().connectionIcon()

def populate(self):
if self.populated:
return True
@@ -27,7 +27,7 @@
from qgis.PyQt.QtGui import QKeySequence, QIcon

from qgis.gui import QgsMessageBar
from qgis.core import Qgis, QgsSettings
from qgis.core import Qgis, QgsApplication, QgsSettings
from ..db_plugins import createDbPlugin

@@ -91,6 +91,9 @@ def __init__(self, conn_name, parent=None):
def __del__(self):
pass # print "DBPlugin.__del__", self.connName

def connectionIcon(self):
return QgsApplication.getThemeIcon("/mIconDbSchema.svg")

def connectionName(self):
return self.connName

@@ -39,6 +39,9 @@ class VLayerDBPlugin(DBPlugin):
def icon(self):
return QgsApplication.getThemeIcon("/mIconVirtualLayer.svg")

def connectionIcon(self):
return QgsApplication.getThemeIcon("/providerQgis.svg")

def typeName(self):
return 'vlayers'

0 comments on commit eb55215

Please sign in to comment.