Diffstat (limited to 'noncore/apps/opie-sheet/textdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/textdlg.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/noncore/apps/opie-sheet/textdlg.cpp b/noncore/apps/opie-sheet/textdlg.cpp new file mode 100644 index 0000000..8245fe4 --- a/dev/null +++ b/noncore/apps/opie-sheet/textdlg.cpp | |||
@@ -0,0 +1,32 @@ | |||
1 | #include "textdlg.h" | ||
2 | |||
3 | TextDialog::TextDialog(QWidget *parent=0) | ||
4 | :QDialog(parent, 0, TRUE) | ||
5 | { | ||
6 | edit=new QLineEdit(this); | ||
7 | edit->setGeometry(90, 10, 100, 25); | ||
8 | |||
9 | label=new QLabel(this); | ||
10 | label->setGeometry(10, 10, 70, 25); | ||
11 | label->setBuddy(edit); | ||
12 | |||
13 | resize(200, 45); | ||
14 | } | ||
15 | |||
16 | TextDialog::~TextDialog() | ||
17 | { | ||
18 | } | ||
19 | |||
20 | int TextDialog::exec(const QString &caption, const QString &text, const QString &value="") | ||
21 | { | ||
22 | setCaption(caption); | ||
23 | label->setText(text); | ||
24 | edit->setText(value); | ||
25 | |||
26 | return QDialog::exec(); | ||
27 | } | ||
28 | |||
29 | QString TextDialog::getValue() | ||
30 | { | ||
31 | return edit->text(); | ||
32 | } | ||