X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Ffilepicker.cpp;h=8d9afb38f79045e910f0104761f942b21723c489;hb=0231914da63ed8c44751d7c7ef07f8e311ae0db1;hp=9f85885f6f9b96cdfc0c8b4c489ec6cebdd66253;hpb=b79146c85ed8f85acc80fe56534f72cd777f0b02;p=virtualjaguar diff --git a/src/gui/filepicker.cpp b/src/gui/filepicker.cpp index 9f85885..8d9afb3 100644 --- a/src/gui/filepicker.cpp +++ b/src/gui/filepicker.cpp @@ -50,15 +50,53 @@ FilePickerWindow::FilePickerWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt: model = new FileListModel; fileList = new QListView; fileList->setModel(model); - fileList->setItemDelegate(new ImageDelegate(this)); +// fileList->setItemDelegate(new ImageDelegate(this)); + fileList->setItemDelegate(new ImageDelegate()); - QVBoxLayout * layout = new QVBoxLayout; +// QVBoxLayout * layout = new QVBoxLayout; + QHBoxLayout * layout = new QHBoxLayout; setLayout(layout); layout->addWidget(fileList); + // Weird note: This layout has to be added *before* putting anything into it... + QVBoxLayout * vLayout = new QVBoxLayout; + layout->addLayout(vLayout); + + QLabel * image = new QLabel; +// image->setAlignment(Qt::AlignRight); +// image->setPixmap(QPixmap(":/res/cart-blank.png")); + QImage cartImg(":/res/cart-blank.png"); + QPainter painter(&cartImg); + painter.drawPixmap(23, 87, 373, 172, QPixmap(":/res/label-blank.png")); + painter.end(); + image->setPixmap(QPixmap::fromImage(cartImg)); + image->setMargin(4); + vLayout->addWidget(image); + + QLabel * text1 = new QLabel(QString(tr( + "

Attack of the Mutant Penguins (World)

" + ))); + text1->setMargin(6); + text1->setAlignment(Qt::AlignCenter); + vLayout->addWidget(text1); + + QLabel * text2 = new QLabel(QString(tr( + "" + "" + "" + "" + "" + "
Type: 4MB Cartridge
CRC32: FEDCBA98
Compatibility: DOES NOT WORK
Notes: Universal Header detected; Requires DSP
" + ))); + vLayout->addWidget(text2); + fileThread = new FileThread(this); - connect(fileThread, SIGNAL(FoundAFile(unsigned long)), this, SLOT(AddFileToList(unsigned long))); +// connect(fileThread, SIGNAL(FoundAFile(unsigned long)), this, SLOT(AddFileToList(unsigned long))); + connect(fileThread, SIGNAL(FoundAFile2(unsigned long, QString, QImage *)), this, SLOT(AddFileToList2(unsigned long, QString, QImage *))); fileThread->Go(); +/* +New sizes: 373x172 (label), 420x340 (cart) +*/ } // @@ -72,3 +110,41 @@ printf("FilePickerWindow: Found match [%s]...\n", romList[index].name); // model->AddData(QIcon(":/res/generic.png")); model->AddData(index); } + +void FilePickerWindow::AddFileToList2(unsigned long index, QString str, QImage * img) +{ +printf("FilePickerWindow(2): Found match [%s]...\n", romList[index].name); + if (img) + model->AddData(index, str, *img); + else + model->AddData(index, str, QImage()); +} + +/* + Super Duper Awesome Guy (World) + + Type: 4MB Cartridge + CRC32: FEDCBA98 +Compatibility: DOES NOT WORK + Notes: Universal Header detected; Requires DSP + + + Stupid Homebrew Game That Sux + + Type: ABS/COF Executable (43853 bytes) + CRC32: 76543210 +Compatibility: Unknown + Notes: $4000 Load, $4000 Run + + + Action Hopscotch Plus (Prototype) + + Type: 2MB Alpine ROM + CRC32: 44889921 +Compatibility: 80% (or ****) + Notes: EEPROM available + + +*/ + +