+//
+// This slot gets called when the QListView gets clicked on. Updates
+// the cart graphic and accompanying text.
+//
+void FilePickerWindow::UpdateSelection(const QModelIndex & current, const QModelIndex &/*previous*/)
+{
+ QString s = current.model()->data(current, Qt::EditRole).toString();
+ unsigned long i = current.model()->data(current, Qt::DisplayRole).toUInt();
+ QImage label = current.model()->data(current, Qt::DecorationRole).value<QImage>();
+// printf("FPW: %s\n", s.toAscii().data());
+
+ if (!label.isNull())
+ {
+ QImage cart(":/res/cart-blank.png");
+ QPainter painter(&cart);
+ painter.drawPixmap(23, 87, QPixmap::fromImage(label));
+ painter.end();
+ cartImage->setPixmap(QPixmap::fromImage(cart));
+ }
+
+ title->setText(QString("<h2>%1</h2>").arg(romList[i].name));
+ QString crcString = QString("%1").arg(romList[i].crc32, 8, 16, QChar('0')).toUpper();
+ data->setText(QString("%1<br>%2<br>%3<br>%4").arg("Cart").arg(crcString).arg("100%").arg("Requires BIOS"));
+}
+