00001 /* 00002 This file is part of the OPIE Project 00003 00004 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> 00005 .=l. Dan Williams <drw@handhelds.org> 00006 .>+-= 00007 _;:, .> :=|. This file is free software; you can 00008 .> <`_, > . <= redistribute it and/or modify it under 00009 :`=1 )Y*s>-.-- : the terms of the GNU General Public 00010 .="- .-=="i, .._ License as published by the Free Software 00011 - . .-<_> .<> Foundation; either version 2 of the License, 00012 ._= =} : or (at your option) any later version. 00013 .%`+i> _;_. 00014 .i_,=:_. -<s. This file is distributed in the hope that 00015 + . -:. = it will be useful, but WITHOUT ANY WARRANTY; 00016 : .. .:, . . . without even the implied warranty of 00017 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A 00018 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General 00019 ..}^=.= = ; Public License for more details. 00020 ++= -. .` .: 00021 : = ...= . :.=- You should have received a copy of the GNU 00022 -. .:....=;==+<; General Public License along with this file; 00023 -_. . . )=. = see the file COPYING. If not, write to the 00024 -- :-=` Free Software Foundation, Inc., 00025 59 Temple Place - Suite 330, 00026 Boston, MA 02111-1307, USA. 00027 00028 */ 00029 00030 #ifndef INPUTDIALOG_H 00031 #define INPUTDIALOG_H 00032 00033 #include <qdialog.h> 00034 #include <qstring.h> 00035 #include <qlineedit.h> 00036 #include <qpushbutton.h> 00037 00038 class InputDialog : public QDialog 00039 { 00040 Q_OBJECT 00041 00042 public: 00043 static QString getText( const QString &caption, const QString &label, const QString &text = QString::null, 00044 bool *ok = 0, QWidget *parent = 0, const char *name = 0 ); 00045 00046 InputDialog( const QString &label, QWidget* parent = 0, const char* name = 0, 00047 bool modal = TRUE ); 00048 ~InputDialog(); 00049 00050 void setText( const QString &text ); 00051 QString getText(); 00052 00053 private slots: 00054 void textChanged( const QString &s ); 00055 void tryAccept(); 00056 00057 private: 00058 QLineEdit *lineEdit; 00059 QPushButton *ok; 00060 }; 00061 00062 #endif // INPUTDIALOG_H
1.4.2