Fixed up Qt4 project file

Started preliminary Qt4 directory dialog in options
This commit is contained in:
mudlord 2008-05-16 02:40:47 +00:00
parent 9720e3ec10
commit f0e786aed0
5 changed files with 124 additions and 102 deletions

View File

@ -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/

View File

@ -172,7 +172,6 @@ InputOptionsPage::InputOptionsPage(QWidget *parent)
InputLayout->addWidget(MultipleAssignCheckBox, 3, 2);
InputGroup->setLayout(InputLayout);
QVBoxLayout *mainLayout = new QVBoxLayout;
@ -203,7 +202,6 @@ SoundOptionsPage::SoundOptionsPage(QWidget *parent)
SRCombo->addItem("44100 Hz");
SRCombo->addItem("48000 Hz");
QHBoxLayout *APILayout = new QHBoxLayout;
APILayout->addWidget(APILabel);
APILayout->addWidget(APICombo);
@ -217,23 +215,32 @@ SoundOptionsPage::SoundOptionsPage(QWidget *parent)
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);
}
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);
}

View File

@ -45,4 +45,12 @@ public:
SoundOptionsPage(QWidget *parent = 0);
};
class DirecOptionsPage : public QWidget
{
Q_OBJECT
public:
DirecOptionsPage(QWidget *parent = 0);
};
#endif

View File

@ -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*)));

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB