mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-31 23:36:41 +00:00
Cleaned up the GUI of the Graphics page
This commit is contained in:
parent
6fe471c1c6
commit
77ac8760d1
1 changed files with 19 additions and 38 deletions
|
@ -32,57 +32,38 @@ GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, QWidget *parent)
|
||||||
renderSystemLayout->addWidget(rendererLabel, 0, 0, 1, 1);
|
renderSystemLayout->addWidget(rendererLabel, 0, 0, 1, 1);
|
||||||
renderSystemLayout->addWidget(mRendererComboBox, 0, 1, 1, 1);
|
renderSystemLayout->addWidget(mRendererComboBox, 0, 1, 1, 1);
|
||||||
|
|
||||||
QVBoxLayout *rendererGroupLayout = new QVBoxLayout(rendererGroup);
|
|
||||||
|
|
||||||
rendererGroupLayout->addLayout(renderSystemLayout);
|
|
||||||
|
|
||||||
// Display
|
// Display
|
||||||
QGroupBox *displayGroup = new QGroupBox(tr("Display"), this);
|
QGroupBox *displayGroup = new QGroupBox(tr("Display"), this);
|
||||||
|
|
||||||
mDisplayStackedWidget = new QStackedWidget(displayGroup);
|
mVSyncCheckBox = new QCheckBox(tr("Vertical Sync"), displayGroup);
|
||||||
|
mFullScreenCheckBox = new QCheckBox(tr("Full Screen"), displayGroup);
|
||||||
|
|
||||||
QVBoxLayout *displayGroupLayout = new QVBoxLayout(displayGroup);
|
QLabel *antiAliasingLabel = new QLabel(tr("Antialiasing:"), displayGroup);
|
||||||
QSpacerItem *vSpacer3 = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
QLabel *resolutionLabel = new QLabel(tr("Resolution:"), displayGroup);
|
||||||
|
|
||||||
displayGroupLayout->addWidget(mDisplayStackedWidget);
|
mResolutionComboBox = new QComboBox(displayGroup);
|
||||||
displayGroupLayout->addItem(vSpacer3);
|
mAntiAliasingComboBox = new QComboBox(displayGroup);
|
||||||
|
|
||||||
|
QVBoxLayout *rendererGroupLayout = new QVBoxLayout(rendererGroup);
|
||||||
|
rendererGroupLayout->addLayout(renderSystemLayout);
|
||||||
|
|
||||||
|
QGridLayout *displayGroupLayout = new QGridLayout(displayGroup);
|
||||||
|
displayGroupLayout->addWidget(mVSyncCheckBox, 0, 0, 1, 1);
|
||||||
|
displayGroupLayout->addWidget(mFullScreenCheckBox, 1, 0, 1, 1);
|
||||||
|
displayGroupLayout->addWidget(antiAliasingLabel, 2, 0, 1, 1);
|
||||||
|
displayGroupLayout->addWidget(mAntiAliasingComboBox, 2, 1, 1, 1);
|
||||||
|
displayGroupLayout->addWidget(resolutionLabel, 3, 0, 1, 1);
|
||||||
|
displayGroupLayout->addWidget(mResolutionComboBox, 3, 1, 1, 1);
|
||||||
|
|
||||||
// Layout for the whole page
|
// Layout for the whole page
|
||||||
QVBoxLayout *pageLayout = new QVBoxLayout(this);
|
QVBoxLayout *pageLayout = new QVBoxLayout(this);
|
||||||
|
QSpacerItem *vSpacer1 = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||||
|
|
||||||
pageLayout->addWidget(rendererGroup);
|
pageLayout->addWidget(rendererGroup);
|
||||||
pageLayout->addWidget(displayGroup);
|
pageLayout->addWidget(displayGroup);
|
||||||
|
pageLayout->addItem(vSpacer1);
|
||||||
|
|
||||||
connect(mRendererComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(rendererChanged(const QString&)));
|
connect(mRendererComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(rendererChanged(const QString&)));
|
||||||
|
|
||||||
createPages();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GraphicsPage::createPages()
|
|
||||||
{
|
|
||||||
QWidget *main = new QWidget();
|
|
||||||
QGridLayout *grid = new QGridLayout(main);
|
|
||||||
|
|
||||||
mVSyncCheckBox = new QCheckBox(tr("Vertical Sync"), main);
|
|
||||||
grid->addWidget(mVSyncCheckBox, 0, 0, 1, 1);
|
|
||||||
|
|
||||||
mFullScreenCheckBox = new QCheckBox(tr("Full Screen"), main);
|
|
||||||
grid->addWidget(mFullScreenCheckBox, 1, 0, 1, 1);
|
|
||||||
|
|
||||||
QLabel *antiAliasingLabel = new QLabel(tr("Antialiasing:"), main);
|
|
||||||
mAntiAliasingComboBox = new QComboBox(main);
|
|
||||||
grid->addWidget(antiAliasingLabel, 2, 0, 1, 1);
|
|
||||||
grid->addWidget(mAntiAliasingComboBox, 2, 1, 1, 1);
|
|
||||||
|
|
||||||
QLabel *resolutionLabel = new QLabel(tr("Resolution:"), main);
|
|
||||||
mResolutionComboBox = new QComboBox(main);
|
|
||||||
grid->addWidget(resolutionLabel, 3, 0, 1, 1);
|
|
||||||
grid->addWidget(mResolutionComboBox, 3, 1, 1, 1);
|
|
||||||
|
|
||||||
QSpacerItem *vSpacer1 = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
|
||||||
grid->addItem(vSpacer1, 4, 0, 1, 1);
|
|
||||||
|
|
||||||
mDisplayStackedWidget->addWidget(main);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GraphicsPage::setupOgre()
|
bool GraphicsPage::setupOgre()
|
||||||
|
|
Loading…
Reference in a new issue