##// END OF EJS Templates
Fixed Win32 build but lppmonplot python wrapper still broken!
Fixed Win32 build but lppmonplot python wrapper still broken!

File last commit:

r0:1aa783210b8e default
r49:d9c54528bd30 Win32 build Ok default
Show More
qsvgicon.cpp
41 lines | 731 B | text/x-c | CppLexer
#include "qsvgicon.h"
QSvgIcon::QSvgIcon()
:QIcon()
{
}
QSvgIcon::QSvgIcon(const QString &fileName)
:QIcon()
{
this->addFile(fileName);
}
void QSvgIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State state)
{
Q_UNUSED(size)
Q_UNUSED(mode)
Q_UNUSED(state)
QSvgRenderer* render= new QSvgRenderer(fileName);
if(render->isValid())
{
QPixmap* img= new QPixmap(render->defaultSize());
img->fill(Qt::transparent);
QPainter* pntr= new QPainter(img);
render->render(pntr);
pntr->end();
this->addPixmap(*img);
delete render;
delete img;
delete pntr;
}
}