2013-08-09 06:57:18 +02:00
|
|
|
#include "lc_global.h"
|
|
|
|
#include "lc_qgroupdialog.h"
|
|
|
|
#include "ui_lc_qgroupdialog.h"
|
|
|
|
#include "group.h"
|
|
|
|
|
2015-10-21 17:03:45 +02:00
|
|
|
lcQGroupDialog::lcQGroupDialog(QWidget *parent, const QString& Name) :
|
2013-08-09 06:57:18 +02:00
|
|
|
QDialog(parent),
|
|
|
|
ui(new Ui::lcQGroupDialog)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
2015-10-21 17:03:45 +02:00
|
|
|
ui->name->setText(Name);
|
2013-08-09 06:57:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
lcQGroupDialog::~lcQGroupDialog()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
|
|
|
void lcQGroupDialog::accept()
|
|
|
|
{
|
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();
|
|
|
|
}
|