0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
obs-studio/UI/win-update/update-window.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
698 B
C++
Raw Normal View History

2017-02-20 13:46:29 +01:00
#include "update-window.hpp"
#include "obs-app.hpp"
OBSUpdate::OBSUpdate(QWidget *parent, bool manualUpdate, const QString &text)
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint |
Qt::WindowCloseButtonHint),
ui(new Ui_OBSUpdate)
{
ui->setupUi(this);
ui->text->setHtml(text);
if (manualUpdate) {
delete ui->skip;
ui->skip = nullptr;
ui->no->setText(QTStr("Cancel"));
}
}
void OBSUpdate::on_yes_clicked()
{
done(OBSUpdate::Yes);
}
void OBSUpdate::on_no_clicked()
{
done(OBSUpdate::No);
}
void OBSUpdate::on_skip_clicked()
{
done(OBSUpdate::Skip);
}
void OBSUpdate::accept()
{
done(OBSUpdate::Yes);
}
void OBSUpdate::reject()
{
done(OBSUpdate::No);
}