From 6410a9fe31dcccd68cc2632dd59a2bd3d634cb0a Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Thu, 26 Apr 2012 10:41:47 +0300 Subject: [PATCH] new icon for Interpolation plugins. Thanks, Robert! --- src/plugins/interpolation/interpolation.png | Bin 283 -> 0 bytes src/plugins/interpolation/interpolator.qrc | 2 +- .../interpolation/qgsinterpolationplugin.cpp | 54 +++++++++--------- .../interpolation/qgsinterpolationplugin.h | 4 +- .../interpolation/raster-interpolate.png | Bin 0 -> 617 bytes 5 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 src/plugins/interpolation/interpolation.png create mode 100644 src/plugins/interpolation/raster-interpolate.png diff --git a/src/plugins/interpolation/interpolation.png b/src/plugins/interpolation/interpolation.png deleted file mode 100644 index ee5fed226c50dbf22eff44fa3fa82d9f29e24b49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^3P3C)zy>4(f)W#f6kC$FyUTwt;Eecw2Pnc>;1O92 zq&>jc?PRtcNU*HHF&#)N0I>|i7tW_iK*lmp7srr@!*8cK@--;%upIsIU;pvZBOQue zSLO;?iR(|A_HvPqw*bSFn%bf@CCny@4S5Y}EEjk$v@q;qlu~C3`QBJ9tIlL$#k$3> zZ~sq8?hS7G9x4sn1h`XTKgKeeo@vv+&rxwp$-{%3M$N}K)X options.png - interpolation.png + raster-interpolate.png diff --git a/src/plugins/interpolation/qgsinterpolationplugin.cpp b/src/plugins/interpolation/qgsinterpolationplugin.cpp index 849c282d70ae..75d79827ec5a 100644 --- a/src/plugins/interpolation/qgsinterpolationplugin.cpp +++ b/src/plugins/interpolation/qgsinterpolationplugin.cpp @@ -26,7 +26,7 @@ static const QString name_ = QObject::tr( "Interpolation plugin" ); static const QString description_ = QObject::tr( "A plugin for interpolation based on vertices of a vector layer" ); static const QString category_ = QObject::tr( "Raster" ); static const QString version_ = QObject::tr( "Version 0.001" ); -static const QString icon_ = ":/interpolation.png"; +static const QString icon_ = ":/raster-interpolate.png"; QgsInterpolationPlugin::QgsInterpolationPlugin( QgisInterface* iface ): mIface( iface ), mInterpolationAction( 0 ) { @@ -42,8 +42,8 @@ void QgsInterpolationPlugin::initGui() { if ( mIface ) { - mInterpolationAction = new QAction( QIcon(), tr( "&Interpolation" ), 0 ); - setCurrentTheme( "" ); + mInterpolationAction = new QAction( QIcon( ":/raster-interpolate.png" ), tr( "&Interpolation" ), 0 ); + //~ setCurrentTheme( "" ); QObject::connect( mInterpolationAction, SIGNAL( triggered() ), this, SLOT( showInterpolationDialog() ) ); mIface->addRasterToolBarIcon( mInterpolationAction ); mIface->addPluginToRasterMenu( tr( "&Interpolation" ), mInterpolationAction ); @@ -65,30 +65,30 @@ void QgsInterpolationPlugin::showInterpolationDialog() dialog.exec(); } -//! Set icons to the current theme -void QgsInterpolationPlugin::setCurrentTheme( QString theThemeName ) -{ - Q_UNUSED( theThemeName ); - QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/interpolation.png"; - QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/interpolation.png"; - QString myQrcPath = ":/interpolation.png"; - if ( QFile::exists( myCurThemePath ) ) - { - mInterpolationAction->setIcon( QIcon( myCurThemePath ) ); - } - else if ( QFile::exists( myDefThemePath ) ) - { - mInterpolationAction->setIcon( QIcon( myDefThemePath ) ); - } - else if ( QFile::exists( myQrcPath ) ) - { - mInterpolationAction->setIcon( QIcon( myQrcPath ) ); - } - else - { - mInterpolationAction->setIcon( QIcon() ); - } -} +//~ //! Set icons to the current theme +//~ void QgsInterpolationPlugin::setCurrentTheme( QString theThemeName ) +//~ { + //~ Q_UNUSED( theThemeName ); + //~ QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/interpolation.png"; + //~ QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/interpolation.png"; + //~ QString myQrcPath = ":/interpolation.png"; + //~ if ( QFile::exists( myCurThemePath ) ) + //~ { + //~ mInterpolationAction->setIcon( QIcon( myCurThemePath ) ); + //~ } + //~ else if ( QFile::exists( myDefThemePath ) ) + //~ { + //~ mInterpolationAction->setIcon( QIcon( myDefThemePath ) ); + //~ } + //~ else if ( QFile::exists( myQrcPath ) ) + //~ { + //~ mInterpolationAction->setIcon( QIcon( myQrcPath ) ); + //~ } + //~ else + //~ { + //~ mInterpolationAction->setIcon( QIcon() ); + //~ } +//~ } QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) { diff --git a/src/plugins/interpolation/qgsinterpolationplugin.h b/src/plugins/interpolation/qgsinterpolationplugin.h index 8ef6576f0ff7..2b6739636598 100644 --- a/src/plugins/interpolation/qgsinterpolationplugin.h +++ b/src/plugins/interpolation/qgsinterpolationplugin.h @@ -39,8 +39,8 @@ class QgsInterpolationPlugin: public QObject, public QgisPlugin void unload(); public slots: - //! update the plugins theme when the app tells us its theme is changed - void setCurrentTheme( QString theThemeName ); + //~ //! update the plugins theme when the app tells us its theme is changed + //~ void setCurrentTheme( QString theThemeName ); private slots: void showInterpolationDialog(); diff --git a/src/plugins/interpolation/raster-interpolate.png b/src/plugins/interpolation/raster-interpolate.png new file mode 100644 index 0000000000000000000000000000000000000000..a12fa2dce6c08249644a560cdfb8af55f1ba1eb9 GIT binary patch literal 617 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4K#ic8tEFC=o*>M-F77zs3r(x zj&puNWl?5&MhSznvw~wuNl|7}DM*iQa0bxHjyajxsR|h-B?VUc`pID9fKJKJ&CSm% z2KhigCo?%UuQ;_>KdDl;I8onN&px`r? zLjMvPHwXvvB|pkFIi`Aw>Cf7m$sS)s^6p%n+V&u1W#*LaS<7laU%LL1N4mG&_{2fc zBeO#`%;GQE^> z-QR!EdW-emU3oLafEH}9lPi1fFSAnmMO$X7*A1;hn$ukaCDy1*c6Sxr$gp|Rv{%?u zAmsZ0RUKIYT7e6trUWrQl`LKn#Ot-vVbZeYD_h>r>F(-t+i7=;*(mwzYUvX_SBs)l cjKkh<`BQV3d-?Szz>sI~boFyt=akR{0K4JsNdN!< literal 0 HcmV?d00001