2017-02-20 04:46:29 -08:00
|
|
|
#include "update-window.hpp"
|
|
|
|
#include "obs-app.hpp"
|
|
|
|
|
|
|
|
OBSUpdate::OBSUpdate(QWidget *parent, bool manualUpdate, const QString &text)
|
2019-06-22 22:13:45 -07:00
|
|
|
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint |
|
|
|
|
Qt::WindowCloseButtonHint),
|
|
|
|
ui(new Ui_OBSUpdate)
|
2017-02-20 04:46:29 -08:00
|
|
|
{
|
|
|
|
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);
|
|
|
|
}
|