|
|
@ -5,10 +5,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include "ColorImageProvider.h" |
|
|
|
#include "ColorImageProvider.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <QIcon> |
|
|
|
#include <QPainter> |
|
|
|
#include <QPainter> |
|
|
|
|
|
|
|
|
|
|
|
QPixmap |
|
|
|
QPixmap |
|
|
|
ColorImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &) |
|
|
|
ColorImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &req) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto args = id.split('?'); |
|
|
|
auto args = id.split('?'); |
|
|
|
|
|
|
|
|
|
|
@ -17,6 +18,8 @@ ColorImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &) |
|
|
|
if (size) |
|
|
|
if (size) |
|
|
|
*size = QSize(source.width(), source.height()); |
|
|
|
*size = QSize(source.width(), source.height()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (req.width() > 0 && req.height() > 0) |
|
|
|
|
|
|
|
source = QIcon(args[0]).pixmap(req); |
|
|
|
if (args.size() < 2) |
|
|
|
if (args.size() < 2) |
|
|
|
return source; |
|
|
|
return source; |
|
|
|
|
|
|
|
|
|
|
|