Skip to content
Permalink
Browse files
add icon created by Robert to Zonal statistics plugin
  • Loading branch information
alexbruy committed Apr 26, 2012
1 parent 63fa68e commit 17e00c80f5e615de07e8de0741ee988815df8288
@@ -6,7 +6,7 @@ SET (ZONAL_STATISTICS_SRCS
qgszonalstatisticsdialog.cpp
)

SET (ZONAL_STATISTICS_UIS
SET (ZONAL_STATISTICS_UIS
qgszonalstatisticsdialogbase.ui
)

@@ -15,6 +15,8 @@ qgszonalstatisticsdialog.h
qgszonalstatisticsplugin.h
)

SET (ZONAL_STATISTICS_RCCS zonal_statistics.qrc)

########################################################
# Build

@@ -24,17 +26,17 @@ QT4_WRAP_CPP (ZONAL_STATISTICS_MOC_SRCS ${ZONAL_STATISTICS_MOC_HDRS})

QT4_ADD_RESOURCES(ZONAL_STATISTICS_RCC_SRCS ${ZONAL_STATISTICS_RCCS})

ADD_LIBRARY (zonalstatisticsplugin MODULE
ADD_LIBRARY (zonalstatisticsplugin MODULE
${ZONAL_STATISTICS_SRCS}
${ZONAL_STATISTICS_MOC_SRCS}
${ZONAL_STATISTICS_RCC_SRCS}
${ZONAL_STATISTICS_MOC_SRCS}
${ZONAL_STATISTICS_RCC_SRCS}
${ZONAL_STATISTICS_UIS_H})

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${GDAL_INCLUDE_DIR}
../../core
../../core/raster
../../core
../../core/raster
../../gui
../../analysis/vector
..
@@ -27,6 +27,7 @@ static const QString name_ = QObject::tr( "Zonal statistics plugin" );
static const QString description_ = QObject::tr( "A plugin to calculate count, sum, mean of rasters for each polygon of a vector layer" );
static const QString category_ = QObject::tr( "Raster" );
static const QString version_ = QObject::tr( "Version 0.1" );
static const QString pluginIcon_ = ":/zonal_statistics/raster-stats.png";

QgsZonalStatisticsPlugin::QgsZonalStatisticsPlugin( QgisInterface* iface ): mIface( iface ), mAction( 0 )
{
@@ -40,7 +41,7 @@ QgsZonalStatisticsPlugin::~QgsZonalStatisticsPlugin()

void QgsZonalStatisticsPlugin::initGui()
{
mAction = new QAction( tr( "&Zonal statistics" ), 0 );
mAction = new QAction( QIcon( ":/zonal_statistics/raster-stats.png" ), tr( "&Zonal statistics" ), 0 );
QObject::connect( mAction, SIGNAL( triggered() ), this, SLOT( run() ) );
mIface->addRasterToolBarIcon( mAction );
mIface->addPluginToRasterMenu( tr( "&Zonal statistics" ), mAction );
@@ -100,6 +101,11 @@ QGISEXTERN QString version()
return version_;
}

QGISEXTERN QString icon()
{
return pluginIcon_;
}

QGISEXTERN int type()
{
return QgisPlugin::UI;
Binary file not shown.
@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/zonal_statistics/" >
<file>raster-stats.png</file>
</qresource>
</RCC>

0 comments on commit 17e00c8

Please sign in to comment.