mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-01 05:44:43 +08:00
frontend: Add renamed Qt UI dialogs
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#include "OBSUpdate.hpp"
|
||||
|
||||
#include <OBSApp.hpp>
|
||||
|
||||
#include "ui_OBSUpdate.h"
|
||||
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user