Skip to content
Permalink
Browse files
new icons for Georeferencer plugin (fix #5530)
  • Loading branch information
alexbruy committed May 6, 2012
1 parent 0d23029 commit ad0d711f6a84098268e97bbd5a9c894db67bc34e
Showing with 95 additions and 34 deletions.
  1. +32 −22 src/plugins/georeferencer/georeferencer.qrc
  2. BIN src/plugins/georeferencer/icons/{ → default}/mActionAbout.png
  3. BIN src/plugins/georeferencer/icons/default/mActionAddGCPPoint.png
  4. BIN src/plugins/georeferencer/icons/default/mActionDeleteGCPPoint.png
  5. BIN src/plugins/georeferencer/icons/{ → default}/mActionGDALScript.png
  6. BIN src/plugins/georeferencer/icons/{ → default}/mActionHelp.png
  7. BIN src/plugins/georeferencer/icons/{ → default}/mActionInfoTabWidget.png
  8. BIN src/plugins/georeferencer/icons/{ → default}/mActionLinkGeorefToQGis.png
  9. BIN src/plugins/georeferencer/icons/{ → default}/mActionLinkGeorefToQGis.xcf
  10. BIN src/plugins/georeferencer/icons/{ → default}/mActionLinkQGisToGeoref.png
  11. BIN src/plugins/georeferencer/icons/{ → default}/mActionLinkQGisToGeoref.xcf
  12. BIN src/plugins/georeferencer/icons/{ → default}/mActionLoadGCPpoints.png
  13. BIN src/plugins/georeferencer/icons/{ → default}/mActionMoveGCPPoint.png
  14. BIN src/plugins/georeferencer/icons/{ → default}/mActionOpenRaster.png
  15. BIN src/plugins/georeferencer/icons/{ → default}/mActionProjectProperties.png
  16. BIN src/plugins/georeferencer/icons/{ → default}/mActionSaveGCPpointsAs.png
  17. BIN src/plugins/georeferencer/icons/{ → default}/mActionSaveRasterAs.png
  18. BIN src/plugins/georeferencer/icons/{ → default}/mActionStartGeoref.png
  19. BIN src/plugins/georeferencer/icons/{ → default}/mActionTransformSettings.png
  20. BIN src/plugins/georeferencer/icons/{ → default}/mGeorefDescription.png
  21. BIN src/plugins/georeferencer/icons/{ → default}/mGeorefRun.png
  22. BIN src/plugins/georeferencer/icons/{ → default}/mPushButtonClipboard.png
  23. BIN src/plugins/georeferencer/icons/{ → default}/mPushButtonEditPaste.png
  24. BIN src/plugins/georeferencer/icons/{ → default}/mPushButtonFileOpen.png
  25. BIN src/plugins/georeferencer/icons/{ → default}/mPushButtonPencil.png
  26. BIN src/plugins/georeferencer/icons/{ → default}/mPushButtonTargetSRSDisabled.png
  27. BIN src/plugins/georeferencer/icons/{ → default}/mPushButtonTargetSRSEnabled.png
  28. 0 src/plugins/georeferencer/icons/{ → default}/qgis.xpm
  29. BIN src/plugins/georeferencer/icons/gis/mActionAddGCPPoint.png
  30. BIN src/plugins/georeferencer/icons/gis/mActionDeleteGCPPoint.png
  31. BIN src/plugins/georeferencer/icons/gis/mActionGDALScript.png
  32. BIN src/plugins/georeferencer/icons/gis/mActionLoadGCPpoints.png
  33. BIN src/plugins/georeferencer/icons/gis/mActionMoveGCPPoint.png
  34. BIN src/plugins/georeferencer/icons/gis/mActionOpenRaster.png
  35. BIN src/plugins/georeferencer/icons/gis/mActionSaveGCPpointsAs.png
  36. BIN src/plugins/georeferencer/icons/gis/mActionStartGeoref.png
  37. BIN src/plugins/georeferencer/icons/gis/mActionTransformSettings.png
  38. +3 −3 src/plugins/georeferencer/qgsgeorefdescriptiondialogbase.ui
  39. +2 −2 src/plugins/georeferencer/qgsgeorefplugin.cpp
  40. +45 −5 src/plugins/georeferencer/qgsgeorefplugingui.cpp
  41. +2 −0 src/plugins/georeferencer/qgsgeorefplugingui.h
  42. +1 −1 src/plugins/georeferencer/qgsmapcoordsdialog.cpp
  43. +10 −1 src/plugins/georeferencer/qgstransformsettingsdialog.cpp
@@ -1,24 +1,34 @@
<RCC>
<qresource prefix="/">
<file>icons/mGeorefDescription.png</file>
<file>icons/mGeorefRun.png</file>
<file>icons/mPushButtonClipboard.png</file>
<file>icons/mPushButtonEditPaste.png</file>
<file>icons/mPushButtonFileOpen.png</file>
<file>icons/mPushButtonPencil.png</file>
<file>icons/mPushButtonTargetSRSEnabled.png</file>
<file>icons/mPushButtonTargetSRSDisabled.png</file>
<file>icons/mActionGDALScript.png</file>
<file>icons/mActionOpenRaster.png</file>
<file>icons/mActionSaveRasterAs.png</file>
<file>icons/mActionLinkGeorefToQGis.png</file>
<file>icons/mActionLinkQGisToGeoref.png</file>
<file>icons/mActionLoadGCPpoints.png</file>
<file>icons/mActionMoveGCPPoint.png</file>
<file>icons/mActionSaveGCPpointsAs.png</file>
<file>icons/mActionStartGeoref.png</file>
<file>icons/mActionTransformSettings.png</file>
<file>icons/mActionHelp.png</file>
<file>icons/mActionAbout.png</file>
</qresource>
<qresource prefix="/">
<file>icons/default/mGeorefDescription.png</file>
<file>icons/default/mGeorefRun.png</file>
<file>icons/default/mPushButtonClipboard.png</file>
<file>icons/default/mPushButtonEditPaste.png</file>
<file>icons/default/mPushButtonFileOpen.png</file>
<file>icons/default/mPushButtonPencil.png</file>
<file>icons/default/mPushButtonTargetSRSEnabled.png</file>
<file>icons/default/mPushButtonTargetSRSDisabled.png</file>
<file>icons/default/mActionGDALScript.png</file>
<file>icons/default/mActionOpenRaster.png</file>
<file>icons/default/mActionSaveRasterAs.png</file>
<file>icons/default/mActionLinkGeorefToQGis.png</file>
<file>icons/default/mActionLinkQGisToGeoref.png</file>
<file>icons/default/mActionLoadGCPpoints.png</file>
<file>icons/default/mActionAddGCPPoint.png</file>
<file>icons/default/mActionDeleteGCPPoint.png</file>
<file>icons/default/mActionMoveGCPPoint.png</file>
<file>icons/default/mActionSaveGCPpointsAs.png</file>
<file>icons/default/mActionStartGeoref.png</file>
<file>icons/default/mActionTransformSettings.png</file>
<file>icons/default/mActionHelp.png</file>
<file>icons/gis/mActionAddGCPPoint.png</file>
<file>icons/gis/mActionDeleteGCPPoint.png</file>
<file>icons/gis/mActionGDALScript.png</file>
<file>icons/gis/mActionLoadGCPpoints.png</file>
<file>icons/gis/mActionMoveGCPPoint.png</file>
<file>icons/gis/mActionOpenRaster.png</file>
<file>icons/gis/mActionSaveGCPpointsAs.png</file>
<file>icons/gis/mActionStartGeoref.png</file>
<file>icons/gis/mActionTransformSettings.png</file>
</qresource>
</RCC>
Binary file not shown.
Binary file not shown.
File renamed without changes.
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.
@@ -46,8 +46,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:'Sans Serif'; font-size:10pt; 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;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&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>
</property>
</widget>
</item>
@@ -57,7 +57,7 @@ p, li { white-space: pre-wrap; }
<string/>
</property>
<property name="pixmap">
<pixmap resource="georeferencer.qrc">:/icons/mGeorefDescription.png</pixmap>
<pixmap resource="georeferencer.qrc">:/icons/default/mGeorefDescription.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
@@ -64,7 +64,7 @@ static const QString sDescription = QObject::tr( "Georeferencing rasters using G
static const QString sCategory = QObject::tr( "Raster" );
static const QString sPluginVersion = QObject::tr( "Version 3.1.9" );
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
static const QString sPluginIcon = ":/icons/mGeorefRun.png";
static const QString sPluginIcon = ":/icons/default/mGeorefRun.png";

//////////////////////////////////////////////////////////////////////
//
@@ -149,7 +149,7 @@ QIcon QgsGeorefPlugin::getThemeIcon( const QString &theName )
}
else
{
return QIcon( ":/icons" + theName );
return QIcon( ":/icons/default" + theName );
}
}

@@ -111,6 +111,8 @@ QgsGeorefPluginGui::QgsGeorefPluginGui( QgisInterface* theQgisInterface, QWidget

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

connect( mIface, SIGNAL( currentThemeChanged( QString ) ), this, SLOT( updateIconTheme( QString ) ) );

QSettings s;
if ( s.value( "/Plugin-GeoReferencer/Config/ShowDocked" ).toBool() )
{
@@ -805,10 +807,10 @@ void QgsGeorefPluginGui::createActions()
connect( mActionTransformSettings, SIGNAL( triggered() ), this, SLOT( getTransformSettings() ) );

// Edit actions
mActionAddPoint->setIcon( getThemeIcon( "/mActionCapturePoint.png" ) );
mActionAddPoint->setIcon( getThemeIcon( "/mActionAddGCPPoint.png" ) );
connect( mActionAddPoint, SIGNAL( triggered() ), this, SLOT( setAddPointTool() ) );

mActionDeletePoint->setIcon( getThemeIcon( "/mActionDeleteSelected.png" ) );
mActionDeletePoint->setIcon( getThemeIcon( "/mActionDeleteGCPPoint.png" ) );
connect( mActionDeletePoint, SIGNAL( triggered() ), this, SLOT( setDeletePointTool() ) );

mActionMoveGCPPoint->setIcon( getThemeIcon( "/mActionMoveGCPPoint.png" ) );
@@ -1032,7 +1034,38 @@ void QgsGeorefPluginGui::setupConnections()

// Connect extents changed - Use for need add again Raster
connect( mCanvas, SIGNAL( extentsChanged() ), this, SLOT( extentsChanged() ) );
}

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

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

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

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

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

// Mapcanvas Plugin
@@ -1451,8 +1484,6 @@ bool QgsGeorefPluginGui::writePDFMapFile( const QString& fileName, const QgsGeor
return true;
}



bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsGeorefTransform& transform )
{
if ( !mCanvas )
@@ -1985,7 +2016,16 @@ QIcon QgsGeorefPluginGui::getThemeIcon( const QString &theName )
}
else
{
return QIcon( ":/icons" + theName );
QSettings settings;
QString themePath = ":/icons/" + settings.value( "/Themes" ).toString() + theName;
if ( QFile::exists( themePath ) )
{
return QIcon( themePath );
}
else
{
return QIcon( ":/icons/default" + theName );
}
}
}

@@ -107,6 +107,8 @@ class QgsGeorefPluginGui : public QMainWindow, private Ui::QgsGeorefPluginGuiBas

bool updateGeorefTransform();

void updateIconTheme( QString theme);

private:
enum SaveGCPs
{
@@ -28,7 +28,7 @@ QgsMapCoordsDialog::QgsMapCoordsDialog( QgsMapCanvas* qgisCanvas, QgsPoint pixel

setAttribute( Qt::WA_DeleteOnClose );

mPointFromCanvasPushButton = new QPushButton( QIcon( ":/icons/mPushButtonPencil.png" ), tr( "From map canvas" ) );
mPointFromCanvasPushButton = new QPushButton( QIcon( ":/icons/default/mPushButtonPencil.png" ), tr( "From map canvas" ) );
mPointFromCanvasPushButton->setCheckable( true );
buttonBox->addButton( mPointFromCanvasPushButton, QDialogButtonBox::ActionRole );
adjustSize();
@@ -353,6 +353,15 @@ QIcon QgsTransformSettingsDialog::getThemeIcon( const QString &theName )
}
else
{
return QIcon( ":/icons" + theName );
QSettings settings;
QString themePath = ":/icons/" + settings.value( "/Themes" ).toString() + theName;
if ( QFile::exists( themePath ) )
{
return QIcon( themePath );
}
else
{
return QIcon( ":/icons/default" + theName );
}
}
}

0 comments on commit ad0d711

Please sign in to comment.