1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 14:23:53 +00:00
openmw/apps/launcher/playpage.cpp

41 lines
978 B
C++
Raw Normal View History

2011-04-07 22:04:09 +00:00
#include "playpage.hpp"
#include <QtGui>
2011-04-07 22:04:09 +00:00
PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
{
2013-03-03 00:49:41 +00:00
setupUi(this);
// Hacks to get the stylesheet look properly on different platforms
QPlastiqueStyle *style = new QPlastiqueStyle;
QFont font = QApplication::font();
font.setPointSize(12); // Fixes problem with overlapping items
2013-03-03 00:49:41 +00:00
profilesComboBox->setStyle(style);
profilesComboBox->setFont(font);
2013-03-03 00:49:41 +00:00
connect(profilesComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotCurrentIndexChanged(int)));
connect(playButton, SIGNAL(clicked()), this, SLOT(slotPlayClicked()));
2013-03-03 00:49:41 +00:00
}
2013-03-03 00:49:41 +00:00
void PlayPage::setProfilesComboBoxModel(QAbstractItemModel *model)
{
profilesComboBox->setModel(model);
}
2013-03-03 00:49:41 +00:00
void PlayPage::setProfilesComboBoxIndex(int index)
{
profilesComboBox->setCurrentIndex(index);
}
2013-03-03 00:49:41 +00:00
void PlayPage::slotCurrentIndexChanged(int index)
{
emit profileChanged(index);
}
2013-03-03 00:49:41 +00:00
void PlayPage::slotPlayClicked()
{
emit playButtonClicked();
}