[Qgis-developer] Theme support in plugins
Borys Jurgiel
borys at wolf.most.org.pl
Sat Dec 20 08:55:32 EST 2008
Hi Folks,
We have a new shining 'gis' buttons for plugins, but most plugins
don't support themes yet. I need to add a few lines of code to each
plugin, so I'll wait for 1.0.1.
Only one plugin where the fix is simple and safe is the grass plugin,
which used to support themes already, but only themes compiled with qgis:
- QString myPath = ":/" + QgsApplication::themeName() + "/grass/" + theName;
+ QString myPath = QgsApplication::activeThemePath() + QDir::separator() + "grass" + QDir::separator() + theName;
- QString myDefaultPath = ":/default/grass/" + theName;
+ QString myDefaultPath = QgsApplication::defaultThemePath() + QDir::separator() + "grass" + QDir::separator() + theName;
I've commited in rev 9873. I believe it's completely safe change - however
if anybody disagree to implement it in a last minute, I can revert it.
Regards,
B.
More information about the Qgis-developer
mailing list