1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 20:29:57 +00:00
openmw/apps/launcher/playpage.cpp
2022-09-22 21:35:26 +03:00

30 lines
705 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();
}