Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[needs-docs][dbmanager] harmonize icons
  • Loading branch information
nirvn committed Jun 29, 2018
1 parent 18dbf03 commit 46246f6
Show file tree
Hide file tree
Showing 29 changed files with 18 additions and 313 deletions.
1 change: 1 addition & 0 deletions images/images.qrc
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions images/themes/default/mIconVirtualLayer.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions python/plugins/db_manager/db_model.py
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
3 changes: 0 additions & 3 deletions python/plugins/db_manager/db_plugins/gpkg/CMakeLists.txt
@@ -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})
Expand Down
Binary file not shown.
7 changes: 2 additions & 5 deletions python/plugins/db_manager/db_plugins/gpkg/plugin.py
Expand Up @@ -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
Expand All @@ -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):
Expand Down
5 changes: 0 additions & 5 deletions python/plugins/db_manager/db_plugins/gpkg/resources.qrc

This file was deleted.

3 changes: 0 additions & 3 deletions python/plugins/db_manager/db_plugins/oracle/CMakeLists.txt
@@ -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})
Expand Down
Binary file not shown.
6 changes: 2 additions & 4 deletions python/plugins/db_manager/db_plugins/oracle/plugin.py
Expand Up @@ -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
Expand All @@ -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):
Expand Down
5 changes: 0 additions & 5 deletions python/plugins/db_manager/db_plugins/oracle/resources.qrc

This file was deleted.

3 changes: 0 additions & 3 deletions python/plugins/db_manager/db_plugins/postgis/CMakeLists.txt
@@ -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})
Expand Down
Binary file not shown.
6 changes: 2 additions & 4 deletions python/plugins/db_manager/db_plugins/postgis/plugin.py
Expand Up @@ -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
Expand All @@ -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):
Expand Down
5 changes: 0 additions & 5 deletions python/plugins/db_manager/db_plugins/postgis/resources.qrc

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})
Expand Down
Binary file not shown.
6 changes: 2 additions & 4 deletions python/plugins/db_manager/db_plugins/spatialite/plugin.py
Expand Up @@ -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
Expand All @@ -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):
Expand Down
5 changes: 0 additions & 5 deletions python/plugins/db_manager/db_plugins/spatialite/resources.qrc

This file was deleted.

2 changes: 0 additions & 2 deletions python/plugins/db_manager/db_plugins/vlayers/CMakeLists.txt
@@ -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})

6 changes: 2 additions & 4 deletions python/plugins/db_manager/db_plugins/vlayers/plugin.py
Expand Up @@ -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
Expand All @@ -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):
Expand Down
5 changes: 0 additions & 5 deletions python/plugins/db_manager/db_plugins/vlayers/resources.qrc

This file was deleted.

0 comments on commit 46246f6

Please sign in to comment.