diff --git a/project/qmake/vba-m.pro b/project/qmake/vba-m.pro index 9f5ad3c6..bb6061d7 100644 --- a/project/qmake/vba-m.pro +++ b/project/qmake/vba-m.pro @@ -2,7 +2,7 @@ TEMPLATE = app CONFIG += qt release QT += opengl TARGET = VisualBoyAdvance -DEFINES += BKPT_SUPPORT +DEFINES += BKPT_SUPPORT NO_PNG # Directory Locations M_DIR_QT = ../../src/qt/ diff --git a/src/qt/MainOptions.cpp b/src/qt/MainOptions.cpp index 6f927a08..0994a17b 100644 --- a/src/qt/MainOptions.cpp +++ b/src/qt/MainOptions.cpp @@ -21,16 +21,16 @@ VideoOptionsPage::VideoOptionsPage(QWidget *parent) : QWidget(parent) { - QGroupBox *RenderGroup = new QGroupBox(tr("Renderer Options")); - QLabel *RenderLabel = new QLabel(tr("Renderer:")); - QComboBox *RenderCombo = new QComboBox; - RenderCombo->addItem("OpenGL"); - RenderCombo->addItem("QPainter"); + QGroupBox *RenderGroup = new QGroupBox(tr("Renderer Options")); + QLabel *RenderLabel = new QLabel(tr("Renderer:")); + QComboBox *RenderCombo = new QComboBox; + RenderCombo->addItem("OpenGL"); + RenderCombo->addItem("QPainter"); QLabel *ResLabel = new QLabel(tr("Resolution:")); QComboBox *ResCombo = new QComboBox; - ResCombo->addItem("320x200"); - ResCombo->addItem("320x240"); + ResCombo->addItem("320x200"); + ResCombo->addItem("320x240"); ResCombo->addItem("400x300"); ResCombo->addItem("512x384"); ResCombo->addItem("640x480"); @@ -40,8 +40,8 @@ VideoOptionsPage::VideoOptionsPage(QWidget *parent) QLabel *SWFilterLabel = new QLabel(tr("Software Filter:")); QComboBox *SWFilterCombo = new QComboBox; - SWFilterCombo->addItem("2xSai"); - SWFilterCombo->addItem("HQ2X"); + SWFilterCombo->addItem("2xSai"); + SWFilterCombo->addItem("HQ2X"); SWFilterCombo->addItem("HQ3X"); SWFilterCombo->addItem("HQ4X"); SWFilterCombo->addItem("Super Eagle"); @@ -50,25 +50,25 @@ VideoOptionsPage::VideoOptionsPage(QWidget *parent) QLabel *HWFilterLabel = new QLabel(tr("Hardware Filter:")); QComboBox *HWFilterCombo = new QComboBox; - HWFilterCombo->addItem("Nearest"); - HWFilterCombo->addItem("Bilinear"); + HWFilterCombo->addItem("Nearest"); + HWFilterCombo->addItem("Bilinear"); + + QHBoxLayout *RenderLayout = new QHBoxLayout; + RenderLayout->addWidget(RenderLabel); + RenderLayout->addWidget(RenderCombo); - QHBoxLayout *RenderLayout = new QHBoxLayout; - RenderLayout->addWidget(RenderLabel); - RenderLayout->addWidget(RenderCombo); - QHBoxLayout *ResLayout = new QHBoxLayout; ResLayout->addWidget(ResLabel); - ResLayout->addWidget(ResCombo); + ResLayout->addWidget(ResCombo); QHBoxLayout *SWFilterLayout = new QHBoxLayout; SWFilterLayout->addWidget(SWFilterLabel); - SWFilterLayout->addWidget(SWFilterCombo); + SWFilterLayout->addWidget(SWFilterCombo); QHBoxLayout *HWFilterLayout = new QHBoxLayout; HWFilterLayout->addWidget(HWFilterLabel); - HWFilterLayout->addWidget(HWFilterCombo); - + HWFilterLayout->addWidget(HWFilterCombo); + QCheckBox *TripleBufCheckBox = new QCheckBox(tr("Triple Buffering")); QCheckBox *VerticalSyncCheckBox = new QCheckBox(tr("Vertical Sync")); QCheckBox *DisableStatCheckBox = new QCheckBox(tr("Disable status messages")); @@ -79,107 +79,106 @@ VideoOptionsPage::VideoOptionsPage(QWidget *parent) CheckLayout->addWidget(VerticalSyncCheckBox, 4, 2); CheckLayout->addWidget(DisableStatCheckBox, 5, 2); - QVBoxLayout *configLayout = new QVBoxLayout; - configLayout->addLayout(RenderLayout); + QVBoxLayout *configLayout = new QVBoxLayout; + configLayout->addLayout(RenderLayout); configLayout->addLayout(ResLayout); configLayout->addLayout(HWFilterLayout); configLayout->addLayout(SWFilterLayout); configLayout->addLayout(CheckLayout); - RenderGroup->setLayout(configLayout); + RenderGroup->setLayout(configLayout); - QVBoxLayout *mainLayout = new QVBoxLayout; - mainLayout->addWidget(RenderGroup); - mainLayout->addStretch(1); - setLayout(mainLayout); + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(RenderGroup); + mainLayout->addStretch(1); + setLayout(mainLayout); } InputOptionsPage::InputOptionsPage(QWidget *parent) : QWidget(parent) { - QGroupBox *InputGroup = new QGroupBox(tr("Input Keys")); + QGroupBox *InputGroup = new QGroupBox(tr("Input Keys")); - QLabel *StartLabel = new QLabel(tr("Start:")); - QLineEdit *StartEdit = new QLineEdit; + QLabel *StartLabel = new QLabel(tr("Start:")); + QLineEdit *StartEdit = new QLineEdit; - QLabel *SelectLabel = new QLabel(tr("Select:")); - QLineEdit *SelectEdit = new QLineEdit; + QLabel *SelectLabel = new QLabel(tr("Select:")); + QLineEdit *SelectEdit = new QLineEdit; - QLabel *UpLabel = new QLabel(tr("Up:")); - QLineEdit *UpEdit = new QLineEdit; + QLabel *UpLabel = new QLabel(tr("Up:")); + QLineEdit *UpEdit = new QLineEdit; - QLabel *DownLabel = new QLabel(tr("Down:")); - QLineEdit *DownEdit = new QLineEdit; + QLabel *DownLabel = new QLabel(tr("Down:")); + QLineEdit *DownEdit = new QLineEdit; - QLabel *LeftLabel = new QLabel(tr("Left:")); - QLineEdit *LeftEdit = new QLineEdit; + QLabel *LeftLabel = new QLabel(tr("Left:")); + QLineEdit *LeftEdit = new QLineEdit; - QLabel *RightLabel = new QLabel(tr("Right:")); - QLineEdit *RightEdit = new QLineEdit; + QLabel *RightLabel = new QLabel(tr("Right:")); + QLineEdit *RightEdit = new QLineEdit; - QLabel *ALabel = new QLabel(tr("A:")); - QLineEdit *AEdit = new QLineEdit; + QLabel *ALabel = new QLabel(tr("A:")); + QLineEdit *AEdit = new QLineEdit; - QLabel *BLabel = new QLabel(tr("B:")); - QLineEdit *BEdit = new QLineEdit; + QLabel *BLabel = new QLabel(tr("B:")); + QLineEdit *BEdit = new QLineEdit; - QLabel *LLabel = new QLabel(tr("L:")); - QLineEdit *LEdit = new QLineEdit; + QLabel *LLabel = new QLabel(tr("L:")); + QLineEdit *LEdit = new QLineEdit; - QLabel *RLabel = new QLabel(tr("R:")); - QLineEdit *REdit = new QLineEdit; + QLabel *RLabel = new QLabel(tr("R:")); + QLineEdit *REdit = new QLineEdit; - QLabel *GSLabel = new QLabel(tr("Gameshark:")); - QLineEdit *GSEdit = new QLineEdit; + QLabel *GSLabel = new QLabel(tr("Gameshark:")); + QLineEdit *GSEdit = new QLineEdit; - QLabel *SpeedUpLabel = new QLabel(tr("Speed Up:")); - QLineEdit *SpeedUpEdit = new QLineEdit; + QLabel *SpeedUpLabel = new QLabel(tr("Speed Up:")); + QLineEdit *SpeedUpEdit = new QLineEdit; - QLabel *ScreenshotLabel = new QLabel(tr("Screenshot:")); - QLineEdit *ScreenshotEdit = new QLineEdit; + QLabel *ScreenshotLabel = new QLabel(tr("Screenshot:")); + QLineEdit *ScreenshotEdit = new QLineEdit; - QCheckBox *MultipleAssignCheckBox = new QCheckBox(tr("Multiple key assignments")); + QCheckBox *MultipleAssignCheckBox = new QCheckBox(tr("Multiple key assignments")); - QGridLayout *InputLayout = new QGridLayout; - InputLayout->addWidget(StartLabel, 0, 0); - InputLayout->addWidget(StartEdit, 0, 1); - InputLayout->addWidget(SelectLabel, 1, 0); - InputLayout->addWidget(SelectEdit, 1, 1); - InputLayout->addWidget(UpLabel, 2, 0); - InputLayout->addWidget(UpEdit, 2, 1); - InputLayout->addWidget(DownLabel, 3, 0); - InputLayout->addWidget(DownEdit, 3, 1); - InputLayout->addWidget(LeftLabel, 4, 0); - InputLayout->addWidget(LeftEdit, 4, 1); - InputLayout->addWidget(RightLabel, 5, 0); - InputLayout->addWidget(RightEdit, 5, 1); - InputLayout->addWidget(ALabel, 6, 0); - InputLayout->addWidget(AEdit, 6, 1); - InputLayout->addWidget(BLabel, 7, 0); - InputLayout->addWidget(BEdit, 7, 1); - InputLayout->addWidget(LLabel, 8, 0); - InputLayout->addWidget(LEdit, 8, 1); - InputLayout->addWidget(RLabel, 9, 0); - InputLayout->addWidget(REdit, 9, 1); - InputLayout->addWidget(GSLabel, 0, 2); - InputLayout->addWidget(GSEdit, 0, 3); - InputLayout->addWidget(SpeedUpLabel, 1, 2); - InputLayout->addWidget(SpeedUpEdit, 1, 3); - InputLayout->addWidget(ScreenshotLabel, 2, 2); - InputLayout->addWidget(ScreenshotEdit, 2, 3); - InputLayout->addWidget(MultipleAssignCheckBox, 3, 2); + QGridLayout *InputLayout = new QGridLayout; + InputLayout->addWidget(StartLabel, 0, 0); + InputLayout->addWidget(StartEdit, 0, 1); + InputLayout->addWidget(SelectLabel, 1, 0); + InputLayout->addWidget(SelectEdit, 1, 1); + InputLayout->addWidget(UpLabel, 2, 0); + InputLayout->addWidget(UpEdit, 2, 1); + InputLayout->addWidget(DownLabel, 3, 0); + InputLayout->addWidget(DownEdit, 3, 1); + InputLayout->addWidget(LeftLabel, 4, 0); + InputLayout->addWidget(LeftEdit, 4, 1); + InputLayout->addWidget(RightLabel, 5, 0); + InputLayout->addWidget(RightEdit, 5, 1); + InputLayout->addWidget(ALabel, 6, 0); + InputLayout->addWidget(AEdit, 6, 1); + InputLayout->addWidget(BLabel, 7, 0); + InputLayout->addWidget(BEdit, 7, 1); + InputLayout->addWidget(LLabel, 8, 0); + InputLayout->addWidget(LEdit, 8, 1); + InputLayout->addWidget(RLabel, 9, 0); + InputLayout->addWidget(REdit, 9, 1); + InputLayout->addWidget(GSLabel, 0, 2); + InputLayout->addWidget(GSEdit, 0, 3); + InputLayout->addWidget(SpeedUpLabel, 1, 2); + InputLayout->addWidget(SpeedUpEdit, 1, 3); + InputLayout->addWidget(ScreenshotLabel, 2, 2); + InputLayout->addWidget(ScreenshotEdit, 2, 3); + InputLayout->addWidget(MultipleAssignCheckBox, 3, 2); + InputGroup->setLayout(InputLayout); - InputGroup->setLayout(InputLayout); - - QVBoxLayout *mainLayout = new QVBoxLayout; - mainLayout->addWidget(InputGroup); - mainLayout->addSpacing(12); - mainLayout->addStretch(1); - setLayout(mainLayout); + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(InputGroup); + mainLayout->addSpacing(12); + mainLayout->addStretch(1); + setLayout(mainLayout); } @@ -203,37 +202,45 @@ SoundOptionsPage::SoundOptionsPage(QWidget *parent) SRCombo->addItem("44100 Hz"); SRCombo->addItem("48000 Hz"); - QHBoxLayout *APILayout = new QHBoxLayout; APILayout->addWidget(APILabel); APILayout->addWidget(APICombo); - + QHBoxLayout *SRLayout = new QHBoxLayout; SRLayout->addWidget(SRLabel); SRLayout->addWidget(SRCombo); QCheckBox *SoundSyncCheckBox = new QCheckBox(tr("Sync game to audio")); - QCheckBox *MuteAudioCheckBox = new QCheckBox(tr("Mute audio")); - QCheckBox *InterpolateCheckBox = new QCheckBox(tr("Interpolate audio")); + QCheckBox *MuteAudioCheckBox = new QCheckBox(tr("Mute audio")); + QCheckBox *InterpolateCheckBox = new QCheckBox(tr("Interpolate audio")); QCheckBox *EchoCheckBox = new QCheckBox(tr("GB audio echo")); - QGridLayout *CheckLayout = new QGridLayout; CheckLayout->addWidget(SoundSyncCheckBox, 3, 2); CheckLayout->addWidget(MuteAudioCheckBox, 4, 2); CheckLayout->addWidget(InterpolateCheckBox, 5, 2); CheckLayout->addWidget(EchoCheckBox, 6, 2); - QVBoxLayout *configLayout = new QVBoxLayout; configLayout->addLayout(APILayout); configLayout->addLayout(SRLayout); configLayout->addLayout(CheckLayout); SoundGroup->setLayout(configLayout); - - QVBoxLayout *mainLayout = new QVBoxLayout; - mainLayout->addWidget(SoundGroup); - mainLayout->addStretch(1); - setLayout(mainLayout); + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(SoundGroup); + mainLayout->addStretch(1); + setLayout(mainLayout); } + +DirecOptionsPage::DirecOptionsPage(QWidget *parent) +: QWidget(parent) +{ + QGroupBox *FolderGroup = new QGroupBox(tr("Directory Options")); + + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(FolderGroup); + mainLayout->addStretch(1); + setLayout(mainLayout); +} + diff --git a/src/qt/MainOptions.h b/src/qt/MainOptions.h index af777d88..6323e07d 100644 --- a/src/qt/MainOptions.h +++ b/src/qt/MainOptions.h @@ -45,4 +45,12 @@ public: SoundOptionsPage(QWidget *parent = 0); }; +class DirecOptionsPage : public QWidget +{ + Q_OBJECT + +public: + DirecOptionsPage(QWidget *parent = 0); +}; + #endif diff --git a/src/qt/configdialog.cpp b/src/qt/configdialog.cpp index 542badf9..0f86696d 100644 --- a/src/qt/configdialog.cpp +++ b/src/qt/configdialog.cpp @@ -32,6 +32,8 @@ 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. // item box contentsWidget = new QListWidget; @@ -58,7 +60,6 @@ ConfigDialog::ConfigDialog() horizontalLayout->addWidget( contentsWidget ); horizontalLayout->addLayout( verticalLayout ); - setWindowTitle(tr("Options")); setWindowIcon( QIcon( ":/resources/settings.png" ) ); } @@ -83,6 +84,12 @@ void ConfigDialog::createIcons() InputButton->setTextAlignment(Qt::AlignHCenter); InputButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + /*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);*/ + connect(contentsWidget, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWidgetItem*))); diff --git a/src/qt/resources/folder-orange.png b/src/qt/resources/folder-orange.png new file mode 100644 index 00000000..b3adc7d8 Binary files /dev/null and b/src/qt/resources/folder-orange.png differ