File: lc_groupdialog.cpp

package info (click to toggle)
leocad 25.09-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,008 kB
  • sloc: cpp: 51,794; xml: 11,265; python: 81; sh: 52; makefile: 16
file content (32 lines) | stat: -rw-r--r-- 531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "lc_global.h"
#include "lc_groupdialog.h"
#include "ui_lc_groupdialog.h"
#include "group.h"

lcGroupDialog::lcGroupDialog(QWidget* Parent, const QString& Name)
	: QDialog(Parent), ui(new Ui::lcGroupDialog)
{
	ui->setupUi(this);

	ui->name->setText(Name);
}

lcGroupDialog::~lcGroupDialog()
{
	delete ui;
}

void lcGroupDialog::accept()
{
	QString Name = ui->name->text();

	if (Name.isEmpty())
	{
		QMessageBox::information(this, "LeoCAD", tr("Name cannot be empty."));
		return;
	}

	mName = Name;

	QDialog::accept();
}