2011-04-08 00:04:09 +02:00
|
|
|
#include "playpage.hpp"
|
|
|
|
|
2013-03-12 01:29:13 +01:00
|
|
|
#include <QListView>
|
|
|
|
|
|
|
|
#ifdef Q_OS_MAC
|
|
|
|
#include <QPlastiqueStyle>
|
|
|
|
#endif
|
2013-02-25 21:22:07 +01:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
Launcher::PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
|
2011-04-08 00:04:09 +02:00
|
|
|
{
|
2013-10-06 21:13:47 -05:00
|
|
|
setObjectName ("PlayPage");
|
2013-03-03 01:49:41 +01:00
|
|
|
setupUi(this);
|
2011-04-23 04:34:58 +02:00
|
|
|
|
2013-03-11 01:20:30 +01:00
|
|
|
// Hacks to get the stylesheet look properly
|
|
|
|
#ifdef Q_OS_MAC
|
2011-07-16 15:40:40 +02:00
|
|
|
QPlastiqueStyle *style = new QPlastiqueStyle;
|
2013-03-03 01:49:41 +01:00
|
|
|
profilesComboBox->setStyle(style);
|
2013-03-11 01:20:30 +01:00
|
|
|
#endif
|
|
|
|
profilesComboBox->setView(new QListView());
|
2011-05-02 17:46:02 +02:00
|
|
|
|
2013-10-06 21:13:47 -05:00
|
|
|
connect(profilesComboBox, SIGNAL(activated(int)), this, SIGNAL (signalProfileChanged(int)));
|
2013-03-03 01:49:41 +01:00
|
|
|
connect(playButton, SIGNAL(clicked()), this, SLOT(slotPlayClicked()));
|
2011-04-23 04:34:58 +02:00
|
|
|
|
2013-03-03 01:49:41 +01:00
|
|
|
}
|
2011-04-23 04:34:58 +02:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
void Launcher::PlayPage::setProfilesModel(QAbstractItemModel *model)
|
2013-03-03 01:49:41 +01:00
|
|
|
{
|
|
|
|
profilesComboBox->setModel(model);
|
|
|
|
}
|
2011-04-23 04:34:58 +02:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
void Launcher::PlayPage::setProfilesIndex(int index)
|
2013-03-03 01:49:41 +01:00
|
|
|
{
|
|
|
|
profilesComboBox->setCurrentIndex(index);
|
|
|
|
}
|
2011-04-23 04:34:58 +02:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
void Launcher::PlayPage::slotPlayClicked()
|
2013-03-03 01:49:41 +01:00
|
|
|
{
|
|
|
|
emit playButtonClicked();
|
2013-02-24 04:00:22 +01:00
|
|
|
}
|