X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fimagedelegate.cpp;h=e9069dad698ab4057cdc99e0f13e3ce5a4d60b7e;hb=f400b282bbf71d7eab7d1f67828605f44b5445fd;hp=eaae05fc00ed1ac3e3b2478bcf6ee4f00f4036e6;hpb=4beff2f35f649bb0befa58c8a89fdd702b3c9b4f;p=virtualjaguar diff --git a/src/gui/imagedelegate.cpp b/src/gui/imagedelegate.cpp index eaae05f..e9069da 100644 --- a/src/gui/imagedelegate.cpp +++ b/src/gui/imagedelegate.cpp @@ -17,7 +17,7 @@ #include "imagedelegate.h" #include "filedb.h" - +#include "filelistmodel.h" //ImageDelegate::ImageDelegate(QObject * parent): QAbstractItemDelegate(parent)//, pixelSize(12) //{ @@ -89,9 +89,15 @@ The foreground of the item (the circle representing a pixel) must be rendered us // don't get Qt's default ugly looking fast scaling... #warning "!!! FIX !!! Need to create properly scaled down cart/label images!" // unsigned long i = index.model()->data(index, Qt::DisplayRole).toUInt(); +#if 0 unsigned long i = index.model()->data(index, Qt::DisplayRole).toUInt(); QString filename = index.model()->data(index, Qt::EditRole).toString(); QImage label = index.model()->data(index, Qt::DecorationRole).value(); +#else + unsigned long i = index.model()->data(index, FLM_INDEX).toUInt(); + QString filename = index.model()->data(index, FLM_FILENAME).toString(); + QImage label = index.model()->data(index, FLM_LABEL).value(); +#endif #if 0 if (role == Qt::DecorationRole)