author | kergoth <kergoth> | 2002-09-15 17:23:20 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-09-15 17:23:20 (UTC) |
commit | 9bd6edd077df796677c9d069200172f930ac1304 (patch) (unidiff) | |
tree | 3b473d4280249b5ade8e5276758cc8f9aa3c2822 /noncore/apps/checkbook/qcheckname.cpp | |
parent | 33ec9ead7ce30bf9450b9048506f0bda49ba4791 (diff) | |
download | opie-9bd6edd077df796677c9d069200172f930ac1304.zip opie-9bd6edd077df796677c9d069200172f930ac1304.tar.gz opie-9bd6edd077df796677c9d069200172f930ac1304.tar.bz2 |
Reverting to checkbook in its previous state, hopefully i got everything.
Diffstat (limited to 'noncore/apps/checkbook/qcheckname.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/qcheckname.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/noncore/apps/checkbook/qcheckname.cpp b/noncore/apps/checkbook/qcheckname.cpp new file mode 100644 index 0000000..0e4d71c --- a/dev/null +++ b/noncore/apps/checkbook/qcheckname.cpp | |||
@@ -0,0 +1,36 @@ | |||
1 | #include "qcheckname.h" | ||
2 | #include <qmessagebox.h> | ||
3 | #include <qdialog.h> | ||
4 | #include <qpushbutton.h> | ||
5 | #include <qlineedit.h> | ||
6 | #include "qrestrictedline.h" | ||
7 | |||
8 | QCheckName::QCheckName() | ||
9 | : QCheckNameBase() | ||
10 | { | ||
11 | connect(cmdDone, SIGNAL(clicked()), this, SLOT(clicked())); | ||
12 | } | ||
13 | |||
14 | QString QCheckName::getName() | ||
15 | { | ||
16 | QCheckName qcn; | ||
17 | qcn.setWFlags(Qt::WType_Modal); | ||
18 | qcn.leText->setValidChars("abcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"); | ||
19 | if (qcn.exec() == QDialog::Accepted) | ||
20 | { | ||
21 | return qcn.leText->text(); | ||
22 | } else { | ||
23 | return QString(""); | ||
24 | } | ||
25 | } | ||
26 | |||
27 | void QCheckName::clicked() | ||
28 | { | ||
29 | if (leText->text().isEmpty() == false) | ||
30 | { | ||
31 | hide(); | ||
32 | accept(); | ||
33 | } else { | ||
34 | QMessageBox::critical(this, "Missing Information", "<qt>Please enter the name of your Check Book and try again.</qt>"); | ||
35 | } | ||
36 | } | ||