Skip to content

Commit

Permalink
[dbmanager] add connection icon
Browse files Browse the repository at this point in the history
this harmonizes display with that of the browser panel
  • Loading branch information
nirvn committed Jun 30, 2018
1 parent 9d8202b commit 86547eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions python/plugins/db_manager/db_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion python/plugins/db_manager/db_plugins/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions python/plugins/db_manager/db_plugins/vlayers/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ class VLayerDBPlugin(DBPlugin):
def icon(self):
return QgsApplication.getThemeIcon("/mIconVirtualLayer.svg")

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

@classmethod
def typeName(self):
return 'vlayers'
Expand Down

0 comments on commit 86547eb

Please sign in to comment.