-rw-r--r-- | libqtaux/qinputdialog.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libqtaux/qinputdialog.cpp b/libqtaux/qinputdialog.cpp index 821c74d..43e243f 100644 --- a/libqtaux/qinputdialog.cpp +++ b/libqtaux/qinputdialog.cpp | |||
@@ -1,90 +1,89 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Implementation of QInputDialog class | 4 | ** Implementation of QInputDialog class |
5 | ** | 5 | ** |
6 | ** Created : 991212 | 6 | ** Created : 991212 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the dialogs module of the Qt GUI Toolkit. | 10 | ** This file is part of the dialogs module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #include "qinputdialog.h" | 38 | #include "qinputdialog.h" |
39 | 39 | ||
40 | #include <qlayout.h> | 40 | #include <qlayout.h> |
41 | #include <qlabel.h> | 41 | #include <qlabel.h> |
42 | #include <qlineedit.h> | ||
43 | #include <qpushbutton.h> | 42 | #include <qpushbutton.h> |
44 | #include <qspinbox.h> | 43 | #include <qspinbox.h> |
45 | #include <qcombobox.h> | 44 | #include <qcombobox.h> |
46 | #include <qwidgetstack.h> | 45 | #include <qwidgetstack.h> |
47 | #include <qvalidator.h> | 46 | #include <qvalidator.h> |
48 | #include <qapplication.h> | 47 | #include <qapplication.h> |
49 | 48 | ||
50 | class QInputDialogPrivate | 49 | class QInputDialogPrivate |
51 | { | 50 | { |
52 | public: | 51 | public: |
53 | friend class QInputDialog; | 52 | friend class QInputDialog; |
54 | QLineEdit *lineEdit; | 53 | QLineEdit *lineEdit; |
55 | QSpinBox *spinBox; | 54 | QSpinBox *spinBox; |
56 | QComboBox *comboBox, *editComboBox; | 55 | QComboBox *comboBox, *editComboBox; |
57 | QPushButton *ok; | 56 | QPushButton *ok; |
58 | QWidgetStack *stack; | 57 | QWidgetStack *stack; |
59 | QInputDialog::Type type; | 58 | QInputDialog::Type type; |
60 | }; | 59 | }; |
61 | 60 | ||
62 | /*! | 61 | /*! |
63 | \class QInputDialog qinputdialog.h | 62 | \class QInputDialog qinputdialog.h |
64 | \brief A convenience dialog to get a simple input from the user | 63 | \brief A convenience dialog to get a simple input from the user |
65 | \ingroup dialogs | 64 | \ingroup dialogs |
66 | 65 | ||
67 | The QInputDialog is a simple dialog which can be used if you | 66 | The QInputDialog is a simple dialog which can be used if you |
68 | need a simple input from the user. This can be text, a number or | 67 | need a simple input from the user. This can be text, a number or |
69 | an item from a list. Also a label has to be set to tell the user | 68 | an item from a list. Also a label has to be set to tell the user |
70 | what he/she should input. | 69 | what he/she should input. |
71 | 70 | ||
72 | In this Qt version only the 4 static convenience functions | 71 | In this Qt version only the 4 static convenience functions |
73 | getText(), getInteger(), getDouble() and getItem() of QInputDialog | 72 | getText(), getInteger(), getDouble() and getItem() of QInputDialog |
74 | are available. | 73 | are available. |
75 | 74 | ||
76 | Use it like this: | 75 | Use it like this: |
77 | 76 | ||
78 | \code | 77 | \code |
79 | bool ok = FALSE; | 78 | bool ok = FALSE; |
80 | QString text = QInputDialog::getText( tr( "Make an input" ), tr( "Please enter your name" ), QString::null, &ok, this ); | 79 | QString text = QInputDialog::getText( tr( "Make an input" ), tr( "Please enter your name" ), QString::null, &ok, this ); |
81 | if ( ok && !text.isEmpty() ) | 80 | if ( ok && !text.isEmpty() ) |
82 | ;// user entered something and pressed ok | 81 | ;// user entered something and pressed ok |
83 | else | 82 | else |
84 | ;// user entered nothing or pressed cancel | 83 | ;// user entered nothing or pressed cancel |
85 | \endcode | 84 | \endcode |
86 | 85 | ||
87 | There are more static convenience methods! | 86 | There are more static convenience methods! |
88 | 87 | ||
89 | \sa getText(), getInteger(), getDouble(), getItem() | 88 | \sa getText(), getInteger(), getDouble(), getItem() |
90 | */ | 89 | */ |