Skip to content
Permalink
Browse files
[needs-docs][dbmanager] harmonize icons
  • Loading branch information
nirvn committed Jun 29, 2018
1 parent 18dbf03 commit 46246f622d88438cb5d99e642508bf2a86732245
Show file tree
Hide file tree
Showing 29 changed files with 18 additions and 313 deletions.
@@ -468,6 +468,7 @@
<file>themes/default/mIconTimerContinue.svg</file>
<file>themes/default/mIconTimerPause.svg</file>
<file>themes/default/mIconTreeView.svg</file>
<file>themes/default/mIconVirtualLayer.svg</file>
<file>themes/default/mIconWcs.svg</file>
<file>themes/default/mIconWfs.svg</file>
<file>themes/default/mIconWms.svg</file>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -31,7 +31,7 @@
from .db_plugins.plugin import BaseError, Table, Database
from .dlg_db_error import DlgDbError

from qgis.core import QgsDataSourceUri, QgsVectorLayer, QgsRasterLayer, QgsMimeDataUtils
from qgis.core import QgsApplication, QgsDataSourceUri, QgsVectorLayer, QgsRasterLayer, QgsMimeDataUtils
from qgis.utils import OverrideCursor

from . import resources_rc # NOQA
@@ -234,13 +234,13 @@ def __init__(self, table, parent):

# load (shared) icon with first instance of table item
if not hasattr(TableItem, 'tableIcon'):
TableItem.tableIcon = QIcon(":/db_manager/icons/table.png")
TableItem.tableIcon = QgsApplication.getThemeIcon("/mIconTableLayer.svg")
TableItem.viewIcon = QIcon(":/db_manager/icons/view.png")
TableItem.viewMaterializedIcon = QIcon(":/db_manager/icons/view_materialized.png")
TableItem.layerPointIcon = QIcon(":/db_manager/icons/layer_point.png")
TableItem.layerLineIcon = QIcon(":/db_manager/icons/layer_line.png")
TableItem.layerPolygonIcon = QIcon(":/db_manager/icons/layer_polygon.png")
TableItem.layerRasterIcon = QIcon(":/db_manager/icons/layer_raster.png")
TableItem.layerPointIcon = QgsApplication.getThemeIcon("/mIconPointLayer.svg")
TableItem.layerLineIcon = QgsApplication.getThemeIcon("/mIconLineLayer.svg")
TableItem.layerPolygonIcon = QgsApplication.getThemeIcon("/mIconPolygonLayer.svg")
TableItem.layerRasterIcon = QgsApplication.getThemeIcon("/mIconRasterLayer.svg")
TableItem.layerUnknownIcon = QIcon(":/db_manager/icons/layer_unknown.png")

def data(self, column):
@@ -1,8 +1,5 @@

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})
Binary file not shown.
@@ -27,15 +27,12 @@
from qgis.PyQt.QtCore import Qt, QFileInfo, QCoreApplication
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtWidgets import QApplication, QAction, QFileDialog
from qgis.core import Qgis, QgsDataSourceUri, QgsSettings
from qgis.core import Qgis, QgsApplication, QgsDataSourceUri, QgsSettings
from qgis.gui import QgsMessageBar

from ..plugin import DBPlugin, Database, Table, VectorTable, RasterTable, TableField, TableIndex, TableTrigger, \
InvalidDataException

from . import resources_rc
hasattr(resources_rc, 'foo')


def classFactory():
return GPKGDBPlugin
@@ -45,7 +42,7 @@ class GPKGDBPlugin(DBPlugin):

@classmethod
def icon(self):
return QIcon(":/db_manager/gpkg/icon")
return QgsApplication.getThemeIcon("/mGeoPackage.svg")

@classmethod
def typeName(self):

This file was deleted.

@@ -1,8 +1,5 @@

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

PYQT_ADD_RESOURCES(PYRC_FILES resources.qrc)

PLUGIN_INSTALL(db_manager db_plugins/oracle ${PY_FILES} ${PYRC_FILES})
PLUGIN_INSTALL(db_manager db_plugins/oracle/icons ${ICON_FILES})
Binary file not shown.
@@ -32,16 +32,14 @@
from qgis.PyQt.QtGui import QIcon, QKeySequence
from qgis.PyQt.QtWidgets import QAction, QApplication, QMessageBox

from qgis.core import QgsVectorLayer, NULL, QgsSettings
from qgis.core import QgsApplication QgsVectorLayer, NULL, QgsSettings

from ..plugin import ConnectionError, InvalidDataException, DBPlugin, \
Database, Schema, Table, VectorTable, TableField, TableConstraint, \
TableIndex, TableTrigger

from qgis.core import QgsCredentials

from . import resources_rc # NOQA


def classFactory():
return OracleDBPlugin
@@ -51,7 +49,7 @@ class OracleDBPlugin(DBPlugin):

@classmethod
def icon(self):
return QIcon(":/db_manager/oracle/icon")
return QgsApplication.getThemeIcon("/mIconOracle.svg")

@classmethod
def typeName(self):

This file was deleted.

@@ -1,7 +1,4 @@
FILE(GLOB PY_FILES *.py)
FILE(GLOB ICON_FILES icons/*.png)

PYQT_ADD_RESOURCES(PYRC_FILES resources.qrc)

PLUGIN_INSTALL(db_manager db_plugins/postgis ${PY_FILES} ${PYRC_FILES})
PLUGIN_INSTALL(db_manager db_plugins/postgis/icons ${ICON_FILES})
Binary file not shown.
@@ -29,16 +29,14 @@
from qgis.PyQt.QtCore import Qt, QRegExp, QCoreApplication
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtWidgets import QAction, QApplication, QMessageBox
from qgis.core import Qgis, QgsSettings
from qgis.core import Qgis, QgsApplication, QgsSettings
from qgis.gui import QgsMessageBar

from ..plugin import ConnectionError, InvalidDataException, DBPlugin, Database, Schema, Table, VectorTable, RasterTable, \
TableField, TableConstraint, TableIndex, TableTrigger, TableRule

import re

from . import resources_rc # NOQA


def classFactory():
return PostGisDBPlugin
@@ -48,7 +46,7 @@ class PostGisDBPlugin(DBPlugin):

@classmethod
def icon(self):
return QIcon(":/db_manager/postgis/icon")
return QgsApplication.getThemeIcon("/mIconPostgis.svg")

@classmethod
def typeName(self):

This file was deleted.

@@ -1,8 +1,5 @@

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

PYQT_ADD_RESOURCES(PYRC_FILES resources.qrc)

PLUGIN_INSTALL(db_manager db_plugins/spatialite ${PY_FILES} ${PYRC_FILES})
PLUGIN_INSTALL(db_manager db_plugins/spatialite/icons ${ICON_FILES})
Binary file not shown.
@@ -27,14 +27,12 @@
from qgis.PyQt.QtCore import Qt, QFileInfo, QCoreApplication
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtWidgets import QApplication, QAction, QFileDialog
from qgis.core import Qgis, QgsDataSourceUri, QgsSettings
from qgis.core import Qgis, QgsApplication, QgsDataSourceUri, QgsSettings
from qgis.gui import QgsMessageBar

from ..plugin import DBPlugin, Database, Table, VectorTable, RasterTable, TableField, TableIndex, TableTrigger, \
InvalidDataException

from . import resources_rc # NOQA


def classFactory():
return SpatiaLiteDBPlugin
@@ -44,7 +42,7 @@ class SpatiaLiteDBPlugin(DBPlugin):

@classmethod
def icon(self):
return QIcon(":/db_manager/spatialite/icon")
return QgsApplication.getThemeIcon("/mIconSpatialite.svg")

@classmethod
def typeName(self):

This file was deleted.

@@ -1,7 +1,5 @@

FILE(GLOB PY_FILES *.py)

PYQT_ADD_RESOURCES(PYRC_FILES resources.qrc)

PLUGIN_INSTALL(db_manager db_plugins/vlayers ${PY_FILES} ${PYRC_FILES})

@@ -24,12 +24,10 @@

from qgis.PyQt.QtCore import QCoreApplication
from qgis.PyQt.QtGui import QIcon
from qgis.core import QgsVectorLayer, QgsProject, QgsVirtualLayerDefinition
from qgis.core import QgsApplication, QgsVectorLayer, QgsProject, QgsVirtualLayerDefinition

from ..plugin import DBPlugin, Database, Table, VectorTable, TableField

from . import resources_rc # NOQA


def classFactory():
return VLayerDBPlugin
@@ -39,7 +37,7 @@ class VLayerDBPlugin(DBPlugin):

@classmethod
def icon(self):
return QIcon(":/db_manager/vlayers/icon")
return QgsApplication.getThemeIcon("/mIconVirtualLayer.svg")

@classmethod
def typeName(self):

This file was deleted.

0 comments on commit 46246f6

Please sign in to comment.