X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fconfigdialog.cpp;h=752713bde6998e163e5597350d97d4e96e634eec;hb=69effddb777c2009d32f70e3315d5570973446ef;hp=709940c3f4a63efafbefec3743b74923e394e78e;hpb=f30bf746981a99079e766b0d4e9de5391a4175ff;p=virtualjaguar diff --git a/src/gui/configdialog.cpp b/src/gui/configdialog.cpp index 709940c..752713b 100644 --- a/src/gui/configdialog.cpp +++ b/src/gui/configdialog.cpp @@ -22,22 +22,28 @@ #include "settings.h" -ConfigDialog::ConfigDialog(QWidget * parent/*= 0*/): QDialog(parent) +ConfigDialog::ConfigDialog(QWidget * parent/*= 0*/): QDialog(parent), + tabWidget(new QTabWidget), + generalTab(new GeneralTab(this)), + controllerTab1(new ControllerTab(this)) { - tabWidget = new QTabWidget; - generalTab = new GeneralTab(this); - controllerTab1 = new ControllerTab(this); - controllerTab2 = new ControllerTab(this); +// tabWidget = new QTabWidget; +// generalTab = new GeneralTab(this); +// controllerTab1 = new ControllerTab(this); +//// controllerTab2 = new ControllerTab(this); - if (vjs.hardwareTypeAlpine) - alpineTab = new AlpineTab(this); +// if (vjs.hardwareTypeAlpine) +// alpineTab = new AlpineTab(this); tabWidget->addTab(generalTab, tr("General")); - tabWidget->addTab(controllerTab1, tr("Controller #1")); - tabWidget->addTab(controllerTab2, tr("Controller #2")); + tabWidget->addTab(controllerTab1, tr("Controllers")); +// tabWidget->addTab(controllerTab2, tr("Controller #2")); if (vjs.hardwareTypeAlpine) + { + alpineTab = new AlpineTab(this); tabWidget->addTab(alpineTab, tr("Alpine")); + } buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); @@ -50,27 +56,27 @@ ConfigDialog::ConfigDialog(QWidget * parent/*= 0*/): QDialog(parent) setLayout(mainLayout); setWindowTitle(tr("Virtual Jaguar Settings")); - LoadDialogFromSettings(); -// controllerTab1->UpdateLabel(); // Now it's safe to do this... ;-) -// controllerTab2->UpdateLabel(); // Now it's safe to do this... ;-) } + ConfigDialog::~ConfigDialog() { } + void ConfigDialog::LoadDialogFromSettings(void) { - generalTab->edit1->setText(vjs.jagBootPath); - generalTab->edit2->setText(vjs.CDBootPath); +// generalTab->edit1->setText(vjs.jagBootPath); +// generalTab->edit2->setText(vjs.CDBootPath); generalTab->edit3->setText(vjs.EEPROMPath); generalTab->edit4->setText(vjs.ROMPath); generalTab->useBIOS->setChecked(vjs.useJaguarBIOS); generalTab->useGPU->setChecked(vjs.GPUEnabled); generalTab->useDSP->setChecked(vjs.DSPEnabled); - generalTab->useHostAudio->setChecked(vjs.audioEnabled); + generalTab->useFullScreen->setChecked(vjs.fullscreen); +// generalTab->useHostAudio->setChecked(vjs.audioEnabled); if (vjs.hardwareTypeAlpine) { @@ -79,17 +85,22 @@ void ConfigDialog::LoadDialogFromSettings(void) alpineTab->writeROM->setChecked(vjs.allowWritesToROM); } +#warning "!!! Need to load settings from controller profile !!!" +#if 0 for(int i=0; i<21; i++) { +// We need to find the right profile and load it up here... controllerTab1->controllerWidget->keys[i] = vjs.p1KeyBindings[i]; - controllerTab2->controllerWidget->keys[i] = vjs.p2KeyBindings[i]; +// controllerTab2->controllerWidget->keys[i] = vjs.p2KeyBindings[i]; } +#endif } + void ConfigDialog::UpdateVJSettings(void) { - strcpy(vjs.jagBootPath, generalTab->edit1->text().toAscii().data()); - strcpy(vjs.CDBootPath, generalTab->edit2->text().toAscii().data()); +// strcpy(vjs.jagBootPath, generalTab->edit1->text().toAscii().data()); +// strcpy(vjs.CDBootPath, generalTab->edit2->text().toAscii().data()); strcpy(vjs.EEPROMPath, CheckForTrailingSlash( generalTab->edit3->text()).toAscii().data()); strcpy(vjs.ROMPath, CheckForTrailingSlash( @@ -98,7 +109,8 @@ void ConfigDialog::UpdateVJSettings(void) vjs.useJaguarBIOS = generalTab->useBIOS->isChecked(); vjs.GPUEnabled = generalTab->useGPU->isChecked(); vjs.DSPEnabled = generalTab->useDSP->isChecked(); - vjs.audioEnabled = generalTab->useHostAudio->isChecked(); + vjs.fullscreen = generalTab->useFullScreen->isChecked(); +// vjs.audioEnabled = generalTab->useHostAudio->isChecked(); if (vjs.hardwareTypeAlpine) { @@ -107,13 +119,16 @@ void ConfigDialog::UpdateVJSettings(void) vjs.allowWritesToROM = alpineTab->writeROM->isChecked(); } +#warning "!!! Need to save settings to controller profile !!!" for(int i=0; i<21; i++) { +// We need to find the right profile and load it up here... vjs.p1KeyBindings[i] = controllerTab1->controllerWidget->keys[i]; - vjs.p2KeyBindings[i] = controllerTab2->controllerWidget->keys[i]; +// vjs.p2KeyBindings[i] = controllerTab2->controllerWidget->keys[i]; } } + QString ConfigDialog::CheckForTrailingSlash(QString s) { if (!s.endsWith('/') && !s.endsWith('\\'))