You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
937 B
C++
44 lines
937 B
C++
#include "playpage.hpp"
|
|
|
|
#include <QListView>
|
|
|
|
#ifdef Q_OS_MAC
|
|
#include <QPlastiqueStyle>
|
|
#endif
|
|
|
|
PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
|
|
{
|
|
setupUi(this);
|
|
|
|
// Hacks to get the stylesheet look properly
|
|
#ifdef Q_OS_MAC
|
|
QPlastiqueStyle *style = new QPlastiqueStyle;
|
|
profilesComboBox->setStyle(style);
|
|
#endif
|
|
profilesComboBox->setView(new QListView());
|
|
|
|
connect(profilesComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotCurrentIndexChanged(int)));
|
|
connect(playButton, SIGNAL(clicked()), this, SLOT(slotPlayClicked()));
|
|
|
|
}
|
|
|
|
void PlayPage::setProfilesComboBoxModel(QAbstractItemModel *model)
|
|
{
|
|
profilesComboBox->setModel(model);
|
|
}
|
|
|
|
void PlayPage::setProfilesComboBoxIndex(int index)
|
|
{
|
|
profilesComboBox->setCurrentIndex(index);
|
|
}
|
|
|
|
void PlayPage::slotCurrentIndexChanged(int index)
|
|
{
|
|
emit profileChanged(index);
|
|
}
|
|
|
|
void PlayPage::slotPlayClicked()
|
|
{
|
|
emit playButtonClicked();
|
|
}
|