Skip to content

Commit 6410a9f

Browse files
committedApr 26, 2012
new icon for Interpolation plugins. Thanks, Robert!
1 parent 0c700d3 commit 6410a9f

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed
 
-283 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<RCC>
22
<qresource prefix="/" >
33
<file>options.png</file>
4-
<file>interpolation.png</file>
4+
<file>raster-interpolate.png</file>
55
</qresource>
66
</RCC>

‎src/plugins/interpolation/qgsinterpolationplugin.cpp

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static const QString name_ = QObject::tr( "Interpolation plugin" );
2626
static const QString description_ = QObject::tr( "A plugin for interpolation based on vertices of a vector layer" );
2727
static const QString category_ = QObject::tr( "Raster" );
2828
static const QString version_ = QObject::tr( "Version 0.001" );
29-
static const QString icon_ = ":/interpolation.png";
29+
static const QString icon_ = ":/raster-interpolate.png";
3030

3131
QgsInterpolationPlugin::QgsInterpolationPlugin( QgisInterface* iface ): mIface( iface ), mInterpolationAction( 0 )
3232
{
@@ -42,8 +42,8 @@ void QgsInterpolationPlugin::initGui()
4242
{
4343
if ( mIface )
4444
{
45-
mInterpolationAction = new QAction( QIcon(), tr( "&Interpolation" ), 0 );
46-
setCurrentTheme( "" );
45+
mInterpolationAction = new QAction( QIcon( ":/raster-interpolate.png" ), tr( "&Interpolation" ), 0 );
46+
//~ setCurrentTheme( "" );
4747
QObject::connect( mInterpolationAction, SIGNAL( triggered() ), this, SLOT( showInterpolationDialog() ) );
4848
mIface->addRasterToolBarIcon( mInterpolationAction );
4949
mIface->addPluginToRasterMenu( tr( "&Interpolation" ), mInterpolationAction );
@@ -65,30 +65,30 @@ void QgsInterpolationPlugin::showInterpolationDialog()
6565
dialog.exec();
6666
}
6767

68-
//! Set icons to the current theme
69-
void QgsInterpolationPlugin::setCurrentTheme( QString theThemeName )
70-
{
71-
Q_UNUSED( theThemeName );
72-
QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/interpolation.png";
73-
QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/interpolation.png";
74-
QString myQrcPath = ":/interpolation.png";
75-
if ( QFile::exists( myCurThemePath ) )
76-
{
77-
mInterpolationAction->setIcon( QIcon( myCurThemePath ) );
78-
}
79-
else if ( QFile::exists( myDefThemePath ) )
80-
{
81-
mInterpolationAction->setIcon( QIcon( myDefThemePath ) );
82-
}
83-
else if ( QFile::exists( myQrcPath ) )
84-
{
85-
mInterpolationAction->setIcon( QIcon( myQrcPath ) );
86-
}
87-
else
88-
{
89-
mInterpolationAction->setIcon( QIcon() );
90-
}
91-
}
68+
//~ //! Set icons to the current theme
69+
//~ void QgsInterpolationPlugin::setCurrentTheme( QString theThemeName )
70+
//~ {
71+
//~ Q_UNUSED( theThemeName );
72+
//~ QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/interpolation.png";
73+
//~ QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/interpolation.png";
74+
//~ QString myQrcPath = ":/interpolation.png";
75+
//~ if ( QFile::exists( myCurThemePath ) )
76+
//~ {
77+
//~ mInterpolationAction->setIcon( QIcon( myCurThemePath ) );
78+
//~ }
79+
//~ else if ( QFile::exists( myDefThemePath ) )
80+
//~ {
81+
//~ mInterpolationAction->setIcon( QIcon( myDefThemePath ) );
82+
//~ }
83+
//~ else if ( QFile::exists( myQrcPath ) )
84+
//~ {
85+
//~ mInterpolationAction->setIcon( QIcon( myQrcPath ) );
86+
//~ }
87+
//~ else
88+
//~ {
89+
//~ mInterpolationAction->setIcon( QIcon() );
90+
//~ }
91+
//~ }
9292

9393
QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer )
9494
{

‎src/plugins/interpolation/qgsinterpolationplugin.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class QgsInterpolationPlugin: public QObject, public QgisPlugin
3939
void unload();
4040

4141
public slots:
42-
//! update the plugins theme when the app tells us its theme is changed
43-
void setCurrentTheme( QString theThemeName );
42+
//~ //! update the plugins theme when the app tells us its theme is changed
43+
//~ void setCurrentTheme( QString theThemeName );
4444

4545
private slots:
4646
void showInterpolationDialog();
617 Bytes
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.