Use Qt's Resource System (2nd approach) (#1891)
* Remove bin2res, use Qt's resource system * Use QDir search paths and QImageReader in getIconPixmap * Don't include "embed.cpp" in plugins * getIconPixmap: Use QPixmapCache, use QPixmap::fromImageReader * Require CMake 2.8.9 * Fix ReverbSC embed usage
This commit is contained in:
@@ -35,15 +35,7 @@
|
||||
namespace embed
|
||||
{
|
||||
|
||||
struct descriptor
|
||||
{
|
||||
int size;
|
||||
const unsigned char * data;
|
||||
const char * name;
|
||||
} ;
|
||||
|
||||
|
||||
QPixmap EXPORT getIconPixmap( const char * _name, int _w = -1, int _h = -1 );
|
||||
QPixmap EXPORT getIconPixmap( const QString& _name, int _w = -1, int _h = -1 );
|
||||
QString EXPORT getText( const char * _name );
|
||||
|
||||
}
|
||||
@@ -53,7 +45,10 @@ QString EXPORT getText( const char * _name );
|
||||
namespace PLUGIN_NAME
|
||||
{
|
||||
|
||||
QPixmap getIconPixmap( const char * _name, int _w = -1, int _h = -1 );
|
||||
inline QPixmap getIconPixmap( const QString& _name, int _w = -1, int _h = -1 )
|
||||
{
|
||||
return embed::getIconPixmap(QString("%1/%2").arg(STRINGIFY(PLUGIN_NAME), _name), _w, _h);
|
||||
}
|
||||
//QString getText( const char * _name );
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user