layout->addWidget(fileList);
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();
}
void FilePickerWindow::AddFileToList(unsigned long index)
{
printf("FilePickerWindow: Found match [%s]...\n", romList[index].name);
- // NOTE: The model *ignores* what you send it, so this is crap. !!! FIX !!!
+ // NOTE: The model *ignores* what you send it, so this is crap. !!! FIX !!! [DONE, somewhat]
// 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());
+}
+