author | harlekin <harlekin> | 2002-07-05 13:00:41 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-05 13:00:41 (UTC) |
commit | 60238d4e9781ad18475a3b45bceaad1d30ea1b8b (patch) (side-by-side diff) | |
tree | f4aac0b3daab54d8cb004879a91c51fd1f619a55 /noncore/apps/checkbook/qcheckname.cpp | |
parent | a332e5e111b0c9ef8eb0836876a4ff386c660514 (diff) | |
download | opie-60238d4e9781ad18475a3b45bceaad1d30ea1b8b.zip opie-60238d4e9781ad18475a3b45bceaad1d30ea1b8b.tar.gz opie-60238d4e9781ad18475a3b45bceaad1d30ea1b8b.tar.bz2 |
spendings tracking app by Nick Betcher (who quit qte development .-( )
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 @@ +#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>"); + } +} |