Mercurial > hg > svgui
comparison widgets/IconLoader.cpp @ 1004:2e3d388489e5 tony-2.0-integration
Merge from branch "3.0-integration"
author | Chris Cannam |
---|---|
date | Wed, 14 Oct 2015 14:52:21 +0100 |
parents | 5fdf5cd032ac |
children | a9c2e791ab8d |
comparison
equal
deleted
inserted
replaced
1001:89f44d182d37 | 1004:2e3d388489e5 |
---|---|
124 | 124 |
125 QPixmap | 125 QPixmap |
126 IconLoader::loadScalable(QString name, int size) | 126 IconLoader::loadScalable(QString name, int size) |
127 { | 127 { |
128 if (!QFile(name).exists()) { | 128 if (!QFile(name).exists()) { |
129 cerr << "loadScalable: no such file as: \"" << name << "\"" << endl; | 129 // cerr << "loadScalable: no such file as: \"" << name << "\"" << endl; |
130 return QPixmap(); | 130 return QPixmap(); |
131 } | 131 } |
132 QPixmap pmap(size, size); | 132 QPixmap pmap(size, size); |
133 pmap.fill(Qt::transparent); | 133 pmap.fill(Qt::transparent); |
134 QSvgRenderer renderer(name); | 134 QSvgRenderer renderer(name); |
135 QPainter painter; | 135 QPainter painter; |
136 painter.begin(&pmap); | 136 painter.begin(&pmap); |
137 cerr << "calling renderer for " << name << " at size " << size << "..." << endl; | 137 // cerr << "calling renderer for " << name << " at size " << size << "..." << endl; |
138 renderer.render(&painter); | 138 renderer.render(&painter); |
139 cerr << "renderer completed" << endl; | 139 // cerr << "renderer completed" << endl; |
140 painter.end(); | 140 painter.end(); |
141 return pmap; | 141 return pmap; |
142 } | 142 } |
143 | 143 |
144 QString | 144 QString |