blob: 0e4d71c23eed314b648d156e27edee3518dc39ba (
plain)
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
33
34
35
36
|
#include "qcheckname.h"
#include <qmessagebox.h>
#include <qdialog.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include "qrestrictedline.h"
QCheckName::QCheckName()
: QCheckNameBase()
{
connect(cmdDone, SIGNAL(clicked()), this, SLOT(clicked()));
}
QString QCheckName::getName()
{
QCheckName qcn;
qcn.setWFlags(Qt::WType_Modal);
qcn.leText->setValidChars("abcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ");
if (qcn.exec() == QDialog::Accepted)
{
return qcn.leText->text();
} else {
return QString("");
}
}
void QCheckName::clicked()
{
if (leText->text().isEmpty() == false)
{
hide();
accept();
} else {
QMessageBox::critical(this, "Missing Information", "<qt>Please enter the name of your Check Book and try again.</qt>");
}
}
|