@@ -16,6 +16,7 @@ email : tim@linfiniti.com
16
16
***************************************************************************/
17
17
18
18
19
+ #include " qgsapplication.h"
19
20
#include " qgsrasterlayerproperties.h"
20
21
#include " qgslayerprojectionselector.h"
21
22
#include " qgsproject.h"
@@ -194,12 +195,9 @@ QgsRasterLayerProperties::QgsRasterLayerProperties(QgsMapLayer *lyr, QWidget *pa
194
195
cboGray->insertItem (tr (" Not Set" ));
195
196
}
196
197
197
- //
198
- #if defined(WIN32) || defined(Q_OS_MACX)
199
- QString PKGDATAPATH = qApp->applicationDirPath () + " /share/qgis" ;
200
- #endif
201
- QPixmap myPyramidPixmap (QString (PKGDATAPATH) + QString (" /images/icons/pyramid.png" ));
202
- QPixmap myNoPyramidPixmap (QString (PKGDATAPATH) + QString (" /images/icons/no_pyramid.png" ));
198
+ QString myThemePath = QgsApplication::themePath ();
199
+ QPixmap myPyramidPixmap (myThemePath + " /mIconPyramid.png" );
200
+ QPixmap myNoPyramidPixmap (myThemePath + " /mIconNoPyramid.png" );
203
201
204
202
// Only do pyramids if dealing directly with GDAL.
205
203
if (!(rasterLayer->usesProvider ()))
@@ -458,11 +456,10 @@ void QgsRasterLayerProperties::on_buttonBuildPyramids_clicked()
458
456
// repopulate the pyramids list
459
457
//
460
458
lbxPyramidResolutions->clear ();
461
- #if defined(WIN32) || defined(Q_OS_MACX)
462
- QString PKGDATAPATH = qApp->applicationDirPath () + " /share/qgis" ;
463
- #endif
464
- QPixmap myPyramidPixmap (QString (PKGDATAPATH) + QString (" /images/icons/pyramid.png" ));
465
- QPixmap myNoPyramidPixmap (QString (PKGDATAPATH) + QString (" /images/icons/no_pyramid.png" ));
459
+ QString myThemePath = QgsApplication::themePath ();
460
+ QPixmap myPyramidPixmap (myThemePath + " /mIconPyramid.png" );
461
+ QPixmap myNoPyramidPixmap (myThemePath + " /mIconNoPyramid.png" );
462
+
466
463
QgsRasterLayer::RasterPyramidList::iterator myRasterPyramidIterator;
467
464
for ( myRasterPyramidIterator=myPyramidList.begin ();
468
465
myRasterPyramidIterator != myPyramidList.end ();
0 commit comments