FIXED: Icon issue in options in Qt4 GUI system

ADDED: Directory options in Qt4 GUI system. Yay.
This commit is contained in:
mudlord 2008-08-06 04:00:48 +00:00
parent 5006873994
commit 4fd9f109e5
3 changed files with 72 additions and 7 deletions

View File

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

View File

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

View File

@ -3,6 +3,7 @@
<file>resources/video.png</file>
<file>resources/input.png</file>
<file>resources/sound.png</file>
<file>resources/folder-orange.png</file>
<file>resources/exit.png</file>
<file>resources/locale.png</file>
<file>resources/settings.png</file>