2011-04-07 22:04:09 +00:00
|
|
|
#include <QtGui>
|
|
|
|
|
|
|
|
#include "playpage.hpp"
|
|
|
|
|
|
|
|
PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
|
|
|
|
{
|
2011-05-02 15:46:02 +00:00
|
|
|
// Load the stylesheet
|
2011-05-02 18:07:37 +00:00
|
|
|
QFile file("launcher.qss");
|
2011-04-24 19:36:54 +00:00
|
|
|
|
|
|
|
file.open(QFile::ReadOnly);
|
|
|
|
QString styleSheet = QLatin1String(file.readAll());
|
|
|
|
setStyleSheet(styleSheet);
|
2011-04-23 02:34:58 +00:00
|
|
|
|
|
|
|
QGroupBox *playBox = new QGroupBox(this);
|
|
|
|
playBox->setFixedSize(QSize(425, 375));
|
|
|
|
playBox->setFlat(true);
|
|
|
|
|
|
|
|
QPushButton *playButton = new QPushButton(tr("Play"), playBox);
|
2011-05-02 15:46:02 +00:00
|
|
|
playButton->setMinimumSize(QSize(200, 50));
|
2011-04-23 02:34:58 +00:00
|
|
|
|
|
|
|
QLabel *profileLabel = new QLabel(tr("Current Profile:"), playBox);
|
|
|
|
|
2011-04-25 05:47:11 +00:00
|
|
|
mProfilesModel = new QStringListModel();
|
|
|
|
mProfilesComboBox = new QComboBox(playBox);
|
|
|
|
mProfilesComboBox->setModel(mProfilesModel);
|
2011-04-23 02:34:58 +00:00
|
|
|
|
2011-05-02 15:46:02 +00:00
|
|
|
QGridLayout *playLayout = new QGridLayout(playBox);
|
|
|
|
|
|
|
|
QSpacerItem *hSpacer1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
|
|
|
QSpacerItem *hSpacer2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
2011-04-23 02:34:58 +00:00
|
|
|
|
|
|
|
QSpacerItem *vSpacer1 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
|
|
|
QSpacerItem *vSpacer2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
|
|
|
|
2011-05-02 15:46:02 +00:00
|
|
|
playLayout->addWidget(playButton, 1, 1, 1, 1);
|
|
|
|
playLayout->addWidget(profileLabel, 2, 1, 1, 1);
|
|
|
|
playLayout->addWidget(mProfilesComboBox, 3, 1, 1, 1);
|
|
|
|
playLayout->addItem(hSpacer1, 2, 0, 1, 1);
|
|
|
|
playLayout->addItem(hSpacer2, 2, 2, 1, 1);
|
|
|
|
playLayout->addItem(vSpacer1, 0, 1, 1, 1);
|
|
|
|
playLayout->addItem(vSpacer2, 4, 1, 1, 1);
|
2011-04-23 02:34:58 +00:00
|
|
|
|
|
|
|
QHBoxLayout *pageLayout = new QHBoxLayout(this);
|
|
|
|
|
|
|
|
pageLayout->addWidget(playBox);
|
|
|
|
|
2011-04-25 05:47:11 +00:00
|
|
|
}
|