X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Ffilepicker.cpp;h=e8a44d1bad7ea9d88d32fb99bd71fa06170afdff;hb=09adab3161f986d5cc8dbeffe15cb6545afa138f;hp=a221d03a2fbd3f030dd6a99b95a09b8e556b2202;hpb=8549cdb01f45764f69a6483285dc0771ea66c007;p=virtualjaguar diff --git a/src/gui/filepicker.cpp b/src/gui/filepicker.cpp index a221d03..e8a44d1 100644 --- a/src/gui/filepicker.cpp +++ b/src/gui/filepicker.cpp @@ -14,6 +14,7 @@ #include "filepicker.h" #include "crc32.h" +#include "filelistmodel.h" #include "filethread.h" #include "settings.h" #include "types.h" @@ -113,18 +114,22 @@ FilePickerWindow::FilePickerWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt: setWindowTitle("Insert Cartridge..."); #if 1 - fileList = new QListWidget(this); + fileList2 = new QListWidget(this); // addWidget(fileList); QVBoxLayout * layout = new QVBoxLayout(); // layout->setSizeConstraint(QLayout::SetFixedSize); setLayout(layout); - layout->addWidget(fileList); + layout->addWidget(fileList2); // PopulateList(); fileThread = new FileThread(this); - fileThread->Go(fileList); + + /*bool b =*/ connect(fileThread, SIGNAL(FoundAFile(unsigned long)), this, SLOT(AddFileToList(unsigned long))); +//printf("FilePickerWindow: Connection to FileThread %s...\n", (b ? "succeeded" : "failed")); + + fileThread->Go(fileList2); #else QStringList numbers; numbers << "One" << "Two" << "Three" << "Four" << "Five"; @@ -136,6 +141,14 @@ view->setModel(model); #endif } +// Need a slot here to pickup stuff from the thread... + +void FilePickerWindow::AddFileToList(unsigned long index) +{ + printf("--> Found CRC: %08X...\n", (uint32)index); +} + + /* void FilePickerWindow::PopulateList(void) {