47 : KListWidget(parent),
51 setResizeMode(QListView::Adjust);
52 setViewMode(QListView::IconMode);
95 foreach (qint16 index, library->
indexes()) {
122 removeItemWidget(
m_items.value(index));
144 QListWidgetItem *item =
new QListWidgetItem;
145 item->setData(Qt::UserRole, index);
158 insertItem(row(
m_items[i]), item);
175 QPixmap icon(size, size);
176 icon.fill(Qt::white);
178 p.setRenderHint(QPainter::Antialiasing,
true);
180 QBrush brush(symbol.
filled() ? Qt::SolidPattern : Qt::NoBrush);
191 p.drawPath(symbol.
path());
204 QStringList mimetypes;
205 mimetypes.append(
"application/kxstitchsymbol");
212 return Qt::CopyAction;
225 QMimeData *
mimeData =
new QMimeData;
228 QDataStream stream(&data, QIODevice::WriteOnly);
230 foreach (QListWidgetItem * item, items) {
231 qint16 index =
static_cast<qint16
>(item->data(Qt::UserRole).toInt());
236 mimeData->setData(
"application/kxstitchsymbol", data);
254 if (mimeData->hasFormat(
"application/kxstitchsymbol")) {
268 foreach (qint16 index,
m_items.keys()) {