2013-08-09 06:57:18 +02:00
|
|
|
#include "lc_global.h"
|
2023-04-30 05:04:58 +02:00
|
|
|
#include "lc_groupdialog.h"
|
|
|
|
#include "ui_lc_groupdialog.h"
|
2013-08-09 06:57:18 +02:00
|
|
|
#include "group.h"
|
|
|
|
|
2023-04-30 05:04:58 +02:00
|
|
|
lcGroupDialog::lcGroupDialog(QWidget* Parent, const QString& Name)
|
|
|
|
: QDialog(Parent), ui(new Ui::lcGroupDialog)
|
2013-08-09 06:57:18 +02:00
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
2015-10-21 17:03:45 +02:00
|
|
|
ui->name->setText(Name);
|
2013-08-09 06:57:18 +02:00
|
|
|
}
|
|
|
|
|
2023-04-30 05:04:58 +02:00
|
|
|
lcGroupDialog::~lcGroupDialog()
|
2013-08-09 06:57:18 +02:00
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
2023-04-30 05:04:58 +02:00
|
|
|
void lcGroupDialog::accept()
|
2013-08-09 06:57:18 +02:00
|
|
|
{
|
2015-10-21 17:03:45 +02:00
|
|
|
QString Name = ui->name->text();
|
2013-08-09 06:57:18 +02:00
|
|
|
|
2015-10-21 17:03:45 +02:00
|
|
|
if (Name.isEmpty())
|
2013-08-09 06:57:18 +02:00
|
|
|
{
|
|
|
|
QMessageBox::information(this, "LeoCAD", tr("Name cannot be empty."));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-10-21 17:03:45 +02:00
|
|
|
mName = Name;
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
QDialog::accept();
|
|
|
|
}
|