mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
add icon created by Robert to Zonal statistics plugin
This commit is contained in:
parent
63fa68ec17
commit
17e00c80f5
@ -6,7 +6,7 @@ SET (ZONAL_STATISTICS_SRCS
|
|||||||
qgszonalstatisticsdialog.cpp
|
qgszonalstatisticsdialog.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET (ZONAL_STATISTICS_UIS
|
SET (ZONAL_STATISTICS_UIS
|
||||||
qgszonalstatisticsdialogbase.ui
|
qgszonalstatisticsdialogbase.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -15,6 +15,8 @@ qgszonalstatisticsdialog.h
|
|||||||
qgszonalstatisticsplugin.h
|
qgszonalstatisticsplugin.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
SET (ZONAL_STATISTICS_RCCS zonal_statistics.qrc)
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# Build
|
# 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})
|
QT4_ADD_RESOURCES(ZONAL_STATISTICS_RCC_SRCS ${ZONAL_STATISTICS_RCCS})
|
||||||
|
|
||||||
ADD_LIBRARY (zonalstatisticsplugin MODULE
|
ADD_LIBRARY (zonalstatisticsplugin MODULE
|
||||||
${ZONAL_STATISTICS_SRCS}
|
${ZONAL_STATISTICS_SRCS}
|
||||||
${ZONAL_STATISTICS_MOC_SRCS}
|
${ZONAL_STATISTICS_MOC_SRCS}
|
||||||
${ZONAL_STATISTICS_RCC_SRCS}
|
${ZONAL_STATISTICS_RCC_SRCS}
|
||||||
${ZONAL_STATISTICS_UIS_H})
|
${ZONAL_STATISTICS_UIS_H})
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${GDAL_INCLUDE_DIR}
|
${GDAL_INCLUDE_DIR}
|
||||||
../../core
|
../../core
|
||||||
../../core/raster
|
../../core/raster
|
||||||
../../gui
|
../../gui
|
||||||
../../analysis/vector
|
../../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 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 category_ = QObject::tr( "Raster" );
|
||||||
static const QString version_ = QObject::tr( "Version 0.1" );
|
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 )
|
QgsZonalStatisticsPlugin::QgsZonalStatisticsPlugin( QgisInterface* iface ): mIface( iface ), mAction( 0 )
|
||||||
{
|
{
|
||||||
@ -40,7 +41,7 @@ QgsZonalStatisticsPlugin::~QgsZonalStatisticsPlugin()
|
|||||||
|
|
||||||
void QgsZonalStatisticsPlugin::initGui()
|
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() ) );
|
QObject::connect( mAction, SIGNAL( triggered() ), this, SLOT( run() ) );
|
||||||
mIface->addRasterToolBarIcon( mAction );
|
mIface->addRasterToolBarIcon( mAction );
|
||||||
mIface->addPluginToRasterMenu( tr( "&Zonal statistics" ), mAction );
|
mIface->addPluginToRasterMenu( tr( "&Zonal statistics" ), mAction );
|
||||||
@ -100,6 +101,11 @@ QGISEXTERN QString version()
|
|||||||
return version_;
|
return version_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QGISEXTERN QString icon()
|
||||||
|
{
|
||||||
|
return pluginIcon_;
|
||||||
|
}
|
||||||
|
|
||||||
QGISEXTERN int type()
|
QGISEXTERN int type()
|
||||||
{
|
{
|
||||||
return QgisPlugin::UI;
|
return QgisPlugin::UI;
|
||||||
|
BIN
src/plugins/zonal_statistics/raster-stats.png
Normal file
BIN
src/plugins/zonal_statistics/raster-stats.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 733 B |
6
src/plugins/zonal_statistics/zonal_statistics.qrc
Normal file
6
src/plugins/zonal_statistics/zonal_statistics.qrc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/zonal_statistics/" >
|
||||||
|
<file>raster-stats.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user