2011-04-08 00:04:09 +02:00
|
|
|
#include "playpage.hpp"
|
|
|
|
|
2013-02-25 21:22:07 +01:00
|
|
|
#include <QtGui>
|
|
|
|
|
2011-04-08 00:04:09 +02:00
|
|
|
PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
|
|
|
|
{
|
2013-03-03 01:49:41 +01:00
|
|
|
setupUi(this);
|
2011-04-23 04:34:58 +02:00
|
|
|
|
2013-02-24 04:00:22 +01:00
|
|
|
// Hacks to get the stylesheet look properly on different platforms
|
2011-07-16 15:40:40 +02:00
|
|
|
QPlastiqueStyle *style = new QPlastiqueStyle;
|
2013-02-24 04:00:22 +01:00
|
|
|
QFont font = QApplication::font();
|
|
|
|
font.setPointSize(12); // Fixes problem with overlapping items
|
|
|
|
|
2013-03-03 01:49:41 +01:00
|
|
|
profilesComboBox->setStyle(style);
|
|
|
|
profilesComboBox->setFont(font);
|
2011-05-02 17:46:02 +02:00
|
|
|
|
2013-03-03 01:49:41 +01:00
|
|
|
connect(profilesComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotCurrentIndexChanged(int)));
|
|
|
|
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-03-03 01:49:41 +01:00
|
|
|
void PlayPage::setProfilesComboBoxModel(QAbstractItemModel *model)
|
|
|
|
{
|
|
|
|
profilesComboBox->setModel(model);
|
|
|
|
}
|
2011-04-23 04:34:58 +02:00
|
|
|
|
2013-03-03 01:49:41 +01:00
|
|
|
void PlayPage::setProfilesComboBoxIndex(int index)
|
|
|
|
{
|
|
|
|
profilesComboBox->setCurrentIndex(index);
|
|
|
|
}
|
2011-04-23 04:34:58 +02:00
|
|
|
|
2013-03-03 01:49:41 +01:00
|
|
|
void PlayPage::slotCurrentIndexChanged(int index)
|
|
|
|
{
|
|
|
|
emit profileChanged(index);
|
|
|
|
}
|
2011-04-23 04:34:58 +02:00
|
|
|
|
2013-03-03 01:49:41 +01:00
|
|
|
void PlayPage::slotPlayClicked()
|
|
|
|
{
|
|
|
|
emit playButtonClicked();
|
2013-02-24 04:00:22 +01:00
|
|
|
}
|