]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/imagedelegate.cpp
Small fix to allow app.cpp to compile on win32.
[virtualjaguar] / src / gui / imagedelegate.cpp
index eaae05fc00ed1ac3e3b2478bcf6ee4f00f4036e6..e9069dad698ab4057cdc99e0f13e3ce5a4d60b7e 100644 (file)
@@ -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<QImage>();
+#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<QImage>();
+#endif
 
 #if 0
        if (role == Qt::DecorationRole)