mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-17 09:27:17 +00:00
GH-336 New rename UI with optional folder rename
This commit is contained in:
41
application/dialogs/CheckableInputDialog.cpp
Normal file
41
application/dialogs/CheckableInputDialog.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "CheckableInputDialog.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QDebug>
|
||||
|
||||
#include "ui_CheckableInputDialog.h"
|
||||
|
||||
CheckableInputDialog::CheckableInputDialog(QWidget *parent) : QDialog(parent), ui(new Ui::CheckableInputDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok), &QPushButton::clicked, this, &QDialog::accept);
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::StandardButton::Cancel), &QPushButton::clicked, this,
|
||||
&QDialog::reject);
|
||||
}
|
||||
|
||||
void CheckableInputDialog::setText(QString text)
|
||||
{
|
||||
ui->label->setText(text);
|
||||
}
|
||||
|
||||
void CheckableInputDialog::setExtraText(QString text)
|
||||
{
|
||||
ui->extraText->setText(text);
|
||||
}
|
||||
|
||||
|
||||
void CheckableInputDialog::setCheckboxText(QString checkboxText)
|
||||
{
|
||||
ui->checkBox->setText(checkboxText);
|
||||
}
|
||||
|
||||
bool CheckableInputDialog::checkboxChecked()
|
||||
{
|
||||
return ui->checkBox->checkState();
|
||||
}
|
||||
|
||||
QString CheckableInputDialog::getInput()
|
||||
{
|
||||
return ui->lineEdit->text();
|
||||
}
|
||||
Reference in New Issue
Block a user