Skip to content

Commit

Permalink
Cleanup georeferencer icons and move to standard icon locations
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 25, 2020
1 parent 80a29fd commit 985c6e0
Show file tree
Hide file tree
Showing 45 changed files with 42 additions and 82 deletions.
12 changes: 12 additions & 0 deletions images/images.qrc
Expand Up @@ -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>
Expand Down
24 changes: 0 additions & 24 deletions src/app/georeferencer/georeferencer.qrc

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.
2 changes: 1 addition & 1 deletion src/app/georeferencer/qgsgeorefplugin.cpp
Expand Up @@ -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 )
Expand Down
55 changes: 10 additions & 45 deletions src/app/georeferencer/qgsgeorefplugingui.cpp
Expand Up @@ -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() )
{
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 )
{
Expand Down
2 changes: 0 additions & 2 deletions src/app/georeferencer/qgsgeorefplugingui.h
Expand Up @@ -126,8 +126,6 @@ class QgsGeorefPluginGui : public QMainWindow, private Ui::QgsGeorefPluginGuiBas

bool updateGeorefTransform();

void updateIconTheme( const QString &theme );

private:
enum SaveGCPs
{
Expand Down
3 changes: 2 additions & 1 deletion src/app/georeferencer/qgsmapcoordsdialog.cpp
Expand Up @@ -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 )
Expand All @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -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" ) ) );
Expand Down
5 changes: 2 additions & 3 deletions src/ui/auth/qgsautheditorwidgets.ui
Expand Up @@ -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>
Expand Down Expand Up @@ -170,7 +170,6 @@
</customwidgets>
<resources>
<include location="../../../images/images.qrc"/>
<include location="../../plugins/georeferencer/georeferencer.qrc"/>
</resources>
<connections/>
</ui>
19 changes: 14 additions & 5 deletions src/ui/georeferencer/qgsgeorefdescriptiondialogbase.ui
Expand Up @@ -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">
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit 985c6e0

Please sign in to comment.