Skip to content

Commit

Permalink
Use QgsApplication::themPath() to find pyramid icons and use their ne…
Browse files Browse the repository at this point in the history
…w names

git-svn-id: http://svn.osgeo.org/qgis/trunk@4650 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 11, 2006
1 parent 48e51ac commit 96f751a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/gui/qgsrasterlayerproperties.cpp
Expand Up @@ -16,6 +16,7 @@ email : tim@linfiniti.com
***************************************************************************/


#include "qgsapplication.h"
#include "qgsrasterlayerproperties.h"
#include "qgslayerprojectionselector.h"
#include "qgsproject.h"
Expand Down Expand Up @@ -194,12 +195,9 @@ QgsRasterLayerProperties::QgsRasterLayerProperties(QgsMapLayer *lyr, QWidget *pa
cboGray->insertItem(tr("Not Set"));
}

//
#if defined(WIN32) || defined(Q_OS_MACX)
QString PKGDATAPATH = qApp->applicationDirPath() + "/share/qgis";
#endif
QPixmap myPyramidPixmap(QString(PKGDATAPATH) + QString("/images/icons/pyramid.png"));
QPixmap myNoPyramidPixmap(QString(PKGDATAPATH) + QString("/images/icons/no_pyramid.png"));
QString myThemePath = QgsApplication::themePath();
QPixmap myPyramidPixmap(myThemePath + "/mIconPyramid.png");
QPixmap myNoPyramidPixmap(myThemePath + "/mIconNoPyramid.png");

// Only do pyramids if dealing directly with GDAL.
if (!(rasterLayer->usesProvider()))
Expand Down Expand Up @@ -458,11 +456,10 @@ void QgsRasterLayerProperties::on_buttonBuildPyramids_clicked()
// repopulate the pyramids list
//
lbxPyramidResolutions->clear();
#if defined(WIN32) || defined(Q_OS_MACX)
QString PKGDATAPATH = qApp->applicationDirPath() + "/share/qgis";
#endif
QPixmap myPyramidPixmap(QString(PKGDATAPATH) + QString("/images/icons/pyramid.png"));
QPixmap myNoPyramidPixmap(QString(PKGDATAPATH) + QString("/images/icons/no_pyramid.png"));
QString myThemePath = QgsApplication::themePath();
QPixmap myPyramidPixmap(myThemePath + "/mIconPyramid.png");
QPixmap myNoPyramidPixmap(myThemePath + "/mIconNoPyramid.png");

QgsRasterLayer::RasterPyramidList::iterator myRasterPyramidIterator;
for ( myRasterPyramidIterator=myPyramidList.begin();
myRasterPyramidIterator != myPyramidList.end();
Expand Down

0 comments on commit 96f751a

Please sign in to comment.