From f6f0fe5fb91b85a09c19e340c531766680ce2875 Mon Sep 17 00:00:00 2001 From: mudlord Date: Wed, 6 Aug 2008 04:00:48 +0000 Subject: [PATCH] FIXED: Icon issue in options in Qt4 GUI system ADDED: Directory options in Qt4 GUI system. Yay. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@595 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/qt/MainOptions.cpp | 70 +++++++++++++++++++++++++++++++++++++++-- src/qt/configdialog.cpp | 8 ++--- src/qt/vba-m.qrc | 1 + 3 files changed, 72 insertions(+), 7 deletions(-) diff --git a/src/qt/MainOptions.cpp b/src/qt/MainOptions.cpp index 0994a17b..4e2f8ccc 100644 --- a/src/qt/MainOptions.cpp +++ b/src/qt/MainOptions.cpp @@ -27,6 +27,7 @@ VideoOptionsPage::VideoOptionsPage(QWidget *parent) RenderCombo->addItem("OpenGL"); RenderCombo->addItem("QPainter"); + QLabel *ResLabel = new QLabel(tr("Resolution:")); QComboBox *ResCombo = new QComboBox; ResCombo->addItem("320x200"); @@ -236,10 +237,75 @@ SoundOptionsPage::SoundOptionsPage(QWidget *parent) DirecOptionsPage::DirecOptionsPage(QWidget *parent) : QWidget(parent) { - QGroupBox *FolderGroup = new QGroupBox(tr("Directory Options")); + QGroupBox *DirectoryGroup = new QGroupBox(tr("Directory Options")); + + + QLabel *GBAROMLabel = new QLabel(tr("GBA ROMs:")); + QLineEdit *GBAROMEdit = new QLineEdit; + QPushButton *GBAROMButton = new QPushButton(tr("&...")); + + QLabel *GBCROMLabel = new QLabel(tr("GBC ROMs:")); + QLineEdit *GBCROMEdit = new QLineEdit; + QPushButton *GBCROMButton = new QPushButton(tr("&...")); + + QLabel *GBROMLabel = new QLabel(tr("GB ROMs:")); + QLineEdit *GBROMEdit = new QLineEdit; + QPushButton *GBROMButton = new QPushButton(tr("&...")); + + QLabel *NativeSaveLabel = new QLabel(tr("Native Saves:")); + QLineEdit *NativeSaveEdit = new QLineEdit; + QPushButton *NativeSaveButton = new QPushButton(tr("&...")); + + QLabel *SaveStateLabel = new QLabel(tr("Savestates:")); + QLineEdit *SaveStateEdit = new QLineEdit; + QPushButton *SaveStateButton = new QPushButton(tr("&...")); + + QLabel *ScreenshotLabel = new QLabel(tr("Screenshots:")); + QLineEdit *ScreenshotEdit = new QLineEdit; + QPushButton *ScreenshotButton = new QPushButton(tr("&...")); + + QLabel *GBMonoBIOSLabel = new QLabel(tr("GB Mono BIOS:")); + QLineEdit *GBMonoBIOSEdit = new QLineEdit; + QPushButton *GBMonoBIOSButton = new QPushButton(tr("&...")); + + QLabel *GBABIOSLabel = new QLabel(tr("GBA BIOS:")); + QLineEdit *GBABIOSEdit = new QLineEdit; + QPushButton *GBABIOSButton = new QPushButton(tr("&...")); + + + QGridLayout *DirectoryLayout = new QGridLayout; + DirectoryLayout->addWidget(GBAROMLabel, 0, 0); + DirectoryLayout->addWidget(GBAROMEdit, 0, 1); + DirectoryLayout->addWidget(GBAROMButton, 0, 2); + DirectoryLayout->addWidget(GBCROMLabel, 1, 0); + DirectoryLayout->addWidget(GBCROMEdit, 1, 1); + DirectoryLayout->addWidget(GBCROMButton, 1, 2); + DirectoryLayout->addWidget(GBROMLabel, 2, 0); + DirectoryLayout->addWidget(GBROMEdit, 2, 1); + DirectoryLayout->addWidget(GBROMButton, 2, 2); + DirectoryLayout->addWidget(NativeSaveLabel, 3, 0); + DirectoryLayout->addWidget(NativeSaveEdit, 3, 1); + DirectoryLayout->addWidget(NativeSaveButton, 3, 2); + DirectoryLayout->addWidget(SaveStateLabel, 4, 0); + DirectoryLayout->addWidget(SaveStateEdit, 4, 1); + DirectoryLayout->addWidget(SaveStateButton, 4, 2); + DirectoryLayout->addWidget(ScreenshotLabel, 5, 0); + DirectoryLayout->addWidget(ScreenshotEdit, 5, 1); + DirectoryLayout->addWidget(ScreenshotButton, 5, 2); + DirectoryLayout->addWidget(GBMonoBIOSLabel, 6, 0); + DirectoryLayout->addWidget(GBMonoBIOSEdit, 6, 1); + DirectoryLayout->addWidget(GBMonoBIOSButton, 6, 2); + DirectoryLayout->addWidget(GBABIOSLabel, 7, 0); + DirectoryLayout->addWidget(GBABIOSEdit, 7, 1); + DirectoryLayout->addWidget(GBABIOSButton, 7, 2); + + + + DirectoryGroup->setLayout(DirectoryLayout); + QVBoxLayout *mainLayout = new QVBoxLayout; - mainLayout->addWidget(FolderGroup); + mainLayout->addWidget(DirectoryGroup); mainLayout->addStretch(1); setLayout(mainLayout); } diff --git a/src/qt/configdialog.cpp b/src/qt/configdialog.cpp index 0f86696d..a16b51aa 100644 --- a/src/qt/configdialog.cpp +++ b/src/qt/configdialog.cpp @@ -32,8 +32,7 @@ ConfigDialog::ConfigDialog() pagesWidget->addWidget( new VideoOptionsPage( pagesWidget ) ); pagesWidget->addWidget( new SoundOptionsPage( pagesWidget ) ); pagesWidget->addWidget( new InputOptionsPage( pagesWidget ) ); - //pagesWidget->addWidget( new DirecOptionsPage( pagesWidget ) ); - //mudlord: I need to work this shit out......Yuck. + pagesWidget->addWidget( new DirecOptionsPage( pagesWidget ) ); // item box contentsWidget = new QListWidget; @@ -84,11 +83,11 @@ void ConfigDialog::createIcons() InputButton->setTextAlignment(Qt::AlignHCenter); InputButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - /*QListWidgetItem *DirecButton = new QListWidgetItem(contentsWidget); + QListWidgetItem *DirecButton = new QListWidgetItem(contentsWidget); DirecButton->setIcon(QIcon(":/resources/folder-orange.png")); DirecButton->setText(tr("Directory")); DirecButton->setTextAlignment(Qt::AlignHCenter); - DirecButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);*/ + DirecButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); connect(contentsWidget, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), @@ -99,6 +98,5 @@ void ConfigDialog::changePage(QListWidgetItem *current, QListWidgetItem *previou { if (!current) current = previous; - pagesWidget->setCurrentIndex(contentsWidget->row(current)); } diff --git a/src/qt/vba-m.qrc b/src/qt/vba-m.qrc index b9ebf018..40da3852 100644 --- a/src/qt/vba-m.qrc +++ b/src/qt/vba-m.qrc @@ -3,6 +3,7 @@ resources/video.png resources/input.png resources/sound.png + resources/folder-orange.png resources/exit.png resources/locale.png resources/settings.png