1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
OpenMW/apps/launcher/playpage.cpp

31 lines
703 B
C++

#include "playpage.hpp"
#include <QListView>
Launcher::PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
{
setObjectName ("PlayPage");
setupUi(this);
profilesComboBox->setView(new QListView());
connect(profilesComboBox, qOverload<int>(&QComboBox::activated), this, &PlayPage::signalProfileChanged);
connect(playButton, &QPushButton::clicked, this, &PlayPage::slotPlayClicked);
}
void Launcher::PlayPage::setProfilesModel(QAbstractItemModel *model)
{
profilesComboBox->setModel(model);
}
void Launcher::PlayPage::setProfilesIndex(int index)
{
profilesComboBox->setCurrentIndex(index);
}
void Launcher::PlayPage::slotPlayClicked()
{
emit playButtonClicked();
}