Skip to content

Commit eb55215

Browse files
committedJun 30, 2018
[dbmanager] add connection icon
this harmonizes display with that of the browser panel
1 parent a7aec56 commit eb55215

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed
 

‎python/plugins/db_manager/db_model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ def data(self, column):
156156
return self.getItemData().connectionName()
157157
return None
158158

159+
def icon(self):
160+
return self.getItemData().connectionIcon()
161+
159162
def populate(self):
160163
if self.populated:
161164
return True

‎python/plugins/db_manager/db_plugins/plugin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from qgis.PyQt.QtGui import QKeySequence, QIcon
2828

2929
from qgis.gui import QgsMessageBar
30-
from qgis.core import Qgis, QgsSettings
30+
from qgis.core import Qgis, QgsApplication, QgsSettings
3131
from ..db_plugins import createDbPlugin
3232

3333

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

94+
def connectionIcon(self):
95+
return QgsApplication.getThemeIcon("/mIconDbSchema.svg")
96+
9497
def connectionName(self):
9598
return self.connName
9699

‎python/plugins/db_manager/db_plugins/vlayers/plugin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class VLayerDBPlugin(DBPlugin):
3939
def icon(self):
4040
return QgsApplication.getThemeIcon("/mIconVirtualLayer.svg")
4141

42+
def connectionIcon(self):
43+
return QgsApplication.getThemeIcon("/providerQgis.svg")
44+
4245
@classmethod
4346
def typeName(self):
4447
return 'vlayers'

0 commit comments

Comments
 (0)
Please sign in to comment.