X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fimagedelegate.cpp;h=e7ab7111b28bb45adb50364dd53751f5917f6953;hb=2d556a3eb52664e928014a72ad18edc13281de7e;hp=875f1f7ee88a7d9a02d938da97889265ec668dd1;hpb=f24ae2128609d5ab8c9a57dfd9dbb46afb7302a9;p=virtualjaguar diff --git a/src/gui/imagedelegate.cpp b/src/gui/imagedelegate.cpp index 875f1f7..e7ab711 100644 --- a/src/gui/imagedelegate.cpp +++ b/src/gui/imagedelegate.cpp @@ -87,17 +87,13 @@ The foreground of the item (the circle representing a pixel) must be rendered us // This is crappy. We really should have a properly scaled image ready to go so we // 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 +//We've got the carts, now just need to do the labels... + 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 QString nameToDraw; if (i == 0xFFFFFFFF) // Not found... @@ -107,16 +103,7 @@ The foreground of the item (the circle representing a pixel) must be rendered us } else nameToDraw = romList[i].name; -#if 0 - if (role == Qt::DecorationRole) - return list.at(index.row()).label; - else if (role == Qt::DisplayRole) - return (uint)list.at(index.row()).dbIndex; - else if (role == Qt::EditRole) - return list.at(index.row()).filename; -#endif -// if (romList[i].file[0] == 0) if (label.isNull()) { // painter->drawPixmap(option.rect.x()+14, option.rect.y()+50, 433/2, 203/2, QPixmap(":/res/label-blank.png"));