add icon created by Robert to Zonal statistics plugin

This commit is contained in:
Alexander Bruy 2012-04-26 10:12:45 +03:00
parent 63fa68ec17
commit 17e00c80f5
4 changed files with 21 additions and 7 deletions

View File

@ -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
..

View File

@ -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.

After

Width:  |  Height:  |  Size: 733 B

View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/zonal_statistics/" >
<file>raster-stats.png</file>
</qresource>
</RCC>