Skip to content
Permalink
Browse files

Cleanup georeferencer icons and move to standard icon locations

  • Loading branch information
nyalldawson committed May 25, 2020
1 parent 80a29fd commit 985c6e04021d215489ed8e1b83e2ccd424d4d1c7
Showing with 42 additions and 82 deletions.
  1. +12 −0 images/images.qrc
  2. BIN {src/app/georeferencer/icons/default → images/themes/default/georeferencer}/mActionAddGCPPoint.png
  3. BIN .../app/georeferencer/icons/default → images/themes/default/georeferencer}/mActionDeleteGCPPoint.png
  4. BIN {src/app/georeferencer/icons/default → images/themes/default/georeferencer}/mActionGDALScript.png
  5. BIN ...pp/georeferencer/icons/default → images/themes/default/georeferencer}/mActionLinkGeorefToQGis.png
  6. BIN ...pp/georeferencer/icons/default → images/themes/default/georeferencer}/mActionLinkQGisToGeoref.png
  7. BIN {src/app/georeferencer/icons/default → images/themes/default/georeferencer}/mActionLoadGCPpoints.png
  8. BIN {src/app/georeferencer/icons/default → images/themes/default/georeferencer}/mActionMoveGCPPoint.png
  9. BIN ...app/georeferencer/icons/default → images/themes/default/georeferencer}/mActionSaveGCPpointsAs.png
  10. BIN {src/app/georeferencer/icons/default → images/themes/default/georeferencer}/mActionStartGeoref.png
  11. BIN {src/app/georeferencer/icons/default → images/themes/default/georeferencer}/mGeorefDescription.png
  12. BIN {src/app/georeferencer/icons/default → images/themes/default/georeferencer}/mGeorefRun.png
  13. BIN {src/app/georeferencer/icons/default → images/themes/default/georeferencer}/mPushButtonPencil.png
  14. +0 −24 src/app/georeferencer/georeferencer.qrc
  15. BIN src/app/georeferencer/icons/default/mActionFullHistogramStretch.png
  16. BIN src/app/georeferencer/icons/default/mActionInfoTabWidget.png
  17. BIN src/app/georeferencer/icons/default/mActionLinkGeorefToQGis.xcf
  18. BIN src/app/georeferencer/icons/default/mActionLinkQGisToGeoref.xcf
  19. BIN src/app/georeferencer/icons/default/mActionLocalHistogramStretch.png
  20. BIN src/app/georeferencer/icons/default/mActionOpenRaster.png
  21. BIN src/app/georeferencer/icons/default/mActionProjectProperties.png
  22. BIN src/app/georeferencer/icons/default/mActionSaveRasterAs.png
  23. BIN src/app/georeferencer/icons/default/mActionTransformSettings.png
  24. BIN src/app/georeferencer/icons/default/mPushButtonClipboard.png
  25. BIN src/app/georeferencer/icons/default/mPushButtonEditPaste.png
  26. BIN src/app/georeferencer/icons/default/mPushButtonFileOpen.png
  27. BIN src/app/georeferencer/icons/default/mPushButtonTargetSRSDisabled.png
  28. BIN src/app/georeferencer/icons/default/mPushButtonTargetSRSEnabled.png
  29. BIN src/app/georeferencer/icons_old/default/mActionAddGCPPoint.png
  30. BIN src/app/georeferencer/icons_old/default/mActionDeleteGCPPoint.png
  31. BIN src/app/georeferencer/icons_old/default/mActionGDALScript.png
  32. BIN src/app/georeferencer/icons_old/default/mActionLoadGCPpoints.png
  33. BIN src/app/georeferencer/icons_old/default/mActionMoveGCPPoint.png
  34. BIN src/app/georeferencer/icons_old/default/mActionOpenRaster.png
  35. BIN src/app/georeferencer/icons_old/default/mActionSaveGCPpointsAs.png
  36. BIN src/app/georeferencer/icons_old/default/mActionStartGeoref.png
  37. BIN src/app/georeferencer/icons_old/default/mActionTransformSettings.png
  38. BIN src/app/georeferencer/icons_old/default/mGeorefRun.png
  39. +1 −1 src/app/georeferencer/qgsgeorefplugin.cpp
  40. +10 −45 src/app/georeferencer/qgsgeorefplugingui.cpp
  41. +0 −2 src/app/georeferencer/qgsgeorefplugingui.h
  42. +2 −1 src/app/georeferencer/qgsmapcoordsdialog.cpp
  43. +1 −1 src/app/qgisapp.cpp
  44. +2 −3 src/ui/auth/qgsautheditorwidgets.ui
  45. +14 −5 src/ui/georeferencer/qgsgeorefdescriptiondialogbase.ui
@@ -860,6 +860,18 @@
<file>themes/default/mLayoutItemMarker.svg</file>
<file>themes/default/algorithms/mAlgorithmConstantRaster.svg</file>
<file>themes/default/mIconStopwatch.svg</file>
<file>themes/default/georeferencer/mGeorefDescription.png</file>
<file>themes/default/georeferencer/mGeorefRun.png</file>
<file>themes/default/georeferencer/mPushButtonPencil.png</file>
<file>themes/default/georeferencer/mActionGDALScript.png</file>
<file>themes/default/georeferencer/mActionLinkGeorefToQGis.png</file>
<file>themes/default/georeferencer/mActionLinkQGisToGeoref.png</file>
<file>themes/default/georeferencer/mActionLoadGCPpoints.png</file>
<file>themes/default/georeferencer/mActionAddGCPPoint.png</file>
<file>themes/default/georeferencer/mActionDeleteGCPPoint.png</file>
<file>themes/default/georeferencer/mActionMoveGCPPoint.png</file>
<file>themes/default/georeferencer/mActionSaveGCPpointsAs.png</file>
<file>themes/default/georeferencer/mActionStartGeoref.png</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -127,7 +127,7 @@ void QgsGeorefPlugin::unload()
void QgsGeorefPlugin::setCurrentTheme( const QString & )
{
if ( mActionRunGeoref )
mActionRunGeoref->setIcon( getThemeIcon( QStringLiteral( "/mGeorefRun.png" ) ) );
mActionRunGeoref->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mGeorefRun.png" ) ) );
}

QIcon QgsGeorefPlugin::getThemeIcon( const QString &name )
@@ -113,8 +113,6 @@ QgsGeorefPluginGui::QgsGeorefPluginGui( QgisInterface *qgisInterface, QWidget *p

mCanvas->clearExtentHistory(); // reset zoomnext/zoomlast

connect( mIface, &QgisInterface::currentThemeChanged, this, &QgsGeorefPluginGui::updateIconTheme );

QgsSettings settings;
if ( settings.value( QStringLiteral( "/Plugin-GeoReferencer/Config/ShowDocked" ) ).toBool() )
{
@@ -842,29 +840,29 @@ void QgsGeorefPluginGui::createActions()
mActionOpenRaster->setIcon( getThemeIcon( QStringLiteral( "/mActionAddRasterLayer.svg" ) ) );
connect( mActionOpenRaster, &QAction::triggered, this, &QgsGeorefPluginGui::openRaster );

mActionStartGeoref->setIcon( getThemeIcon( QStringLiteral( "/mActionStartGeoref.png" ) ) );
mActionStartGeoref->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mActionStartGeoref.png" ) ) );
connect( mActionStartGeoref, &QAction::triggered, this, &QgsGeorefPluginGui::doGeoreference );

mActionGDALScript->setIcon( getThemeIcon( QStringLiteral( "/mActionGDALScript.png" ) ) );
mActionGDALScript->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mActionGDALScript.png" ) ) );
connect( mActionGDALScript, &QAction::triggered, this, &QgsGeorefPluginGui::generateGDALScript );

mActionLoadGCPpoints->setIcon( getThemeIcon( QStringLiteral( "/mActionLoadGCPpoints.png" ) ) );
mActionLoadGCPpoints->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mActionLoadGCPpoints.png" ) ) );
connect( mActionLoadGCPpoints, &QAction::triggered, this, &QgsGeorefPluginGui::loadGCPsDialog );

mActionSaveGCPpoints->setIcon( getThemeIcon( QStringLiteral( "/mActionSaveGCPpointsAs.png" ) ) );
mActionSaveGCPpoints->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mActionSaveGCPpointsAs.png" ) ) );
connect( mActionSaveGCPpoints, &QAction::triggered, this, &QgsGeorefPluginGui::saveGCPsDialog );

mActionTransformSettings->setIcon( getThemeIcon( QStringLiteral( "/mActionTransformSettings.png" ) ) );
mActionTransformSettings->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/propertyicons/settings.svg" ) ) );
connect( mActionTransformSettings, &QAction::triggered, this, &QgsGeorefPluginGui::getTransformSettings );

// Edit actions
mActionAddPoint->setIcon( getThemeIcon( QStringLiteral( "/mActionAddGCPPoint.png" ) ) );
mActionAddPoint->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mActionAddGCPPoint.png" ) ) );
connect( mActionAddPoint, &QAction::triggered, this, &QgsGeorefPluginGui::setAddPointTool );

mActionDeletePoint->setIcon( getThemeIcon( QStringLiteral( "/mActionDeleteGCPPoint.png" ) ) );
mActionDeletePoint->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mActionDeleteGCPPoint.png" ) ) );
connect( mActionDeletePoint, &QAction::triggered, this, &QgsGeorefPluginGui::setDeletePointTool );

mActionMoveGCPPoint->setIcon( getThemeIcon( QStringLiteral( "/mActionMoveGCPPoint.png" ) ) );
mActionMoveGCPPoint->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mActionMoveGCPPoint.png" ) ) );
connect( mActionMoveGCPPoint, &QAction::triggered, this, &QgsGeorefPluginGui::setMovePointTool );

// View actions
@@ -886,10 +884,10 @@ void QgsGeorefPluginGui::createActions()
mActionZoomNext->setIcon( getThemeIcon( QStringLiteral( "/mActionZoomNext.svg" ) ) );
connect( mActionZoomNext, &QAction::triggered, this, &QgsGeorefPluginGui::zoomToNext );

mActionLinkGeorefToQGis->setIcon( getThemeIcon( QStringLiteral( "/mActionLinkGeorefToQGis.png" ) ) );
mActionLinkGeorefToQGis->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mActionLinkGeorefToQGis.png" ) ) );
connect( mActionLinkGeorefToQGis, &QAction::triggered, this, &QgsGeorefPluginGui::linkGeorefToQGis );

mActionLinkQGisToGeoref->setIcon( getThemeIcon( QStringLiteral( "/mActionLinkQGisToGeoref.png" ) ) );
mActionLinkQGisToGeoref->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/georeferencer/mActionLinkQGisToGeoref.png" ) ) );
connect( mActionLinkQGisToGeoref, &QAction::triggered, this, &QgsGeorefPluginGui::linkQGisToGeoref );

// Settings actions
@@ -1118,39 +1116,6 @@ void QgsGeorefPluginGui::removeOldLayer()
mCanvas->refresh();
}

void QgsGeorefPluginGui::updateIconTheme( const QString &theme )
{
Q_UNUSED( theme )
// File actions
mActionOpenRaster->setIcon( getThemeIcon( QStringLiteral( "/mActionAddRasterLayer.svg" ) ) );
mActionStartGeoref->setIcon( getThemeIcon( QStringLiteral( "/mActionStartGeoref.png" ) ) );
mActionGDALScript->setIcon( getThemeIcon( QStringLiteral( "/mActionGDALScript.png" ) ) );
mActionLoadGCPpoints->setIcon( getThemeIcon( QStringLiteral( "/mActionLoadGCPpoints.png" ) ) );
mActionSaveGCPpoints->setIcon( getThemeIcon( QStringLiteral( "/mActionSaveGCPpointsAs.png" ) ) );
mActionTransformSettings->setIcon( getThemeIcon( QStringLiteral( "/mActionTransformSettings.png" ) ) );

// Edit actions
mActionAddPoint->setIcon( getThemeIcon( QStringLiteral( "/mActionAddGCPPoint.png" ) ) );
mActionDeletePoint->setIcon( getThemeIcon( QStringLiteral( "/mActionDeleteGCPPoint.png" ) ) );
mActionMoveGCPPoint->setIcon( getThemeIcon( QStringLiteral( "/mActionMoveGCPPoint.png" ) ) );

// View actions
mActionPan->setIcon( getThemeIcon( QStringLiteral( "/mActionPan.svg" ) ) );
mActionZoomIn->setIcon( getThemeIcon( QStringLiteral( "/mActionZoomIn.svg" ) ) );
mActionZoomOut->setIcon( getThemeIcon( QStringLiteral( "/mActionZoomOut.svg" ) ) );
mActionZoomToLayer->setIcon( getThemeIcon( QStringLiteral( "/mActionZoomToLayer.svg" ) ) );
mActionZoomLast->setIcon( getThemeIcon( QStringLiteral( "/mActionZoomLast.svg" ) ) );
mActionZoomNext->setIcon( getThemeIcon( QStringLiteral( "/mActionZoomNext.svg" ) ) );
mActionLinkGeorefToQGis->setIcon( getThemeIcon( QStringLiteral( "/mActionLinkGeorefToQGis.png" ) ) );
mActionLinkQGisToGeoref->setIcon( getThemeIcon( QStringLiteral( "/mActionLinkQGisToGeoref.png" ) ) );

// Settings actions
mActionRasterProperties->setIcon( getThemeIcon( QStringLiteral( "/mActionRasterProperties.png" ) ) );
mActionGeorefConfig->setIcon( getThemeIcon( QStringLiteral( "/mActionGeorefConfig.png" ) ) );

mActionQuit->setIcon( getThemeIcon( QStringLiteral( "/mActionQuit.png" ) ) );
}

// Mapcanvas Plugin
void QgsGeorefPluginGui::addRaster( const QString &file )
{
@@ -126,8 +126,6 @@ class QgsGeorefPluginGui : public QMainWindow, private Ui::QgsGeorefPluginGuiBas

bool updateGeorefTransform();

void updateIconTheme( const QString &theme );

private:
enum SaveGCPs
{
@@ -21,6 +21,7 @@
#include "qgssettings.h"
#include "qgsmapmouseevent.h"
#include "qgsgui.h"
#include "qgsapplication.h"

QgsMapCoordsDialog::QgsMapCoordsDialog( QgsMapCanvas *qgisCanvas, const QgsPointXY &pixelCoords, QWidget *parent )
: QDialog( parent, Qt::Dialog )
@@ -34,7 +35,7 @@ QgsMapCoordsDialog::QgsMapCoordsDialog( QgsMapCanvas *qgisCanvas, const QgsPoint

setAttribute( Qt::WA_DeleteOnClose );

mPointFromCanvasPushButton = new QPushButton( QIcon( ":/icons/default/mPushButtonPencil.png" ), tr( "From Map Canvas" ) );
mPointFromCanvasPushButton = new QPushButton( QgsApplication::getThemeIcon( "georeferencer/mPushButtonPencil.png" ), tr( "From Map Canvas" ) );
mPointFromCanvasPushButton->setCheckable( true );
buttonBox->addButton( mPointFromCanvasPushButton, QDialogButtonBox::ActionRole );

@@ -3869,7 +3869,7 @@ void QgisApp::setTheme( const QString &themeName )
mActionShowSelectedLayers->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowSelectedLayers.svg" ) ) );
mActionRemoveAllFromOverview->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionRemoveAllFromOverview.svg" ) ) );
mActionToggleFullScreen->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionToggleFullScreen.png" ) ) );
mActionProjectProperties->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionProjectProperties.png" ) ) );
mActionProjectProperties->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionProjectProperties.svg" ) ) );
mActionManagePlugins->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowPluginManager.svg" ) ) );
mActionShowPythonDialog->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "console/mIconRunConsole.svg" ) ) );
mActionCheckQgisVersion->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mIconSuccess.svg" ) ) );
@@ -126,8 +126,8 @@
<string>Utilities</string>
</property>
<property name="icon">
<iconset resource="../../plugins/georeferencer/georeferencer.qrc">
<normaloff>:/icons/default/mActionTransformSettings.png</normaloff>:/icons/default/mActionTransformSettings.png</iconset>
<iconset resource="../../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/settings.svg</normaloff>:/images/themes/default/propertyicons/settings.svg</iconset>
</property>
</widget>
</item>
@@ -170,7 +170,6 @@
</customwidgets>
<resources>
<include location="../../../images/images.qrc"/>
<include location="../../plugins/georeferencer/georeferencer.qrc"/>
</resources>
<connections/>
</ui>
@@ -21,7 +21,16 @@
<bool>true</bool>
</property>
<layout class="QGridLayout">
<property name="margin">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<property name="spacing">
@@ -46,8 +55,8 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Droid Sans'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@@ -57,7 +66,7 @@ p, li { white-space: pre-wrap; }
<string/>
</property>
<property name="pixmap">
<pixmap resource="georeferencer.qrc">:/icons/default/mGeorefDescription.png</pixmap>
<pixmap resource="../../../images/images.qrc">:/images/themes/default/georeferencer/mGeorefDescription.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
@@ -67,7 +76,7 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
<resources>
<include location="georeferencer.qrc"/>
<include location="../../../images/images.qrc"/>
</resources>
<connections>
<connection>

0 comments on commit 985c6e0

Please sign in to comment.
You can’t perform that action at this time.