X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fgui%2Ffilepicker.cpp;h=daaae590288c19a57019b764bebce88eefe1d3d9;hb=7611a21d2b36def66216598617d647acfc657e3e;hp=2280f82202c10b55798cc9aaadec4af6c30a4127;hpb=be0b102eec76acf80acce7cd3de8e690e27564d4;p=virtualjaguar diff --git a/src/gui/filepicker.cpp b/src/gui/filepicker.cpp index 2280f82..daaae59 100644 --- a/src/gui/filepicker.cpp +++ b/src/gui/filepicker.cpp @@ -13,6 +13,8 @@ #include "filepicker.h" +#include "crc32.h" +#include "settings.h" #include "types.h" struct RomIdentifier @@ -98,5 +100,63 @@ in romList for future reference. When constructing the list, use the index to pull up an image of the cart and put that in the list. User picks from a graphical image of the cart. + +Ideally, the label will go into the archive along with the ROM image, but that's +for the future... +Maybe box art, screenshots will go as well... */ +//FilePickerWindow::FilePickerWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)//could use Window as well... +FilePickerWindow::FilePickerWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Window) +{ + setWindowTitle("Insert Cartridge..."); + + fileList = new QListWidget(this); +// addWidget(fileList); + + QVBoxLayout * layout = new QVBoxLayout(); +// layout->setSizeConstraint(QLayout::SetFixedSize); + setLayout(layout); + + layout->addWidget(fileList); + + PopulateList(); +} + +void FilePickerWindow::PopulateList(void) +{ + QDir romDir(vjs.ROMPath); + QFileInfoList list = romDir.entryInfoList(); + + for(int i=0; i