source: trunk/doc/html/qlineedit-h.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 9.2 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qlineedit.h:1 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>qlineedit.h Include File</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qlineedit.h</h1>
33
34<p>This is the verbatim text of the qlineedit.h include file. It is provided only for illustration; the copyright remains with Trolltech.
35<hr>
36<pre>
37/**********************************************************************
38** $Id: qlineedit-h.html 2051 2007-02-21 10:04:20Z chehrlic $
39**
40** Definition of QLineEdit widget class
41**
42** Created : 941011
43**
44** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
45**
46** This file is part of the widgets module of the Qt GUI Toolkit.
47**
48** This file may be distributed under the terms of the Q Public License
49** as defined by Trolltech ASA of Norway and appearing in the file
50** LICENSE.QPL included in the packaging of this file.
51**
52** This file may be distributed and/or modified under the terms of the
53** GNU General Public License version 2 as published by the Free Software
54** Foundation and appearing in the file LICENSE.GPL included in the
55** packaging of this file.
56**
57** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
58** licenses may use this file in accordance with the Qt Commercial License
59** Agreement provided with the Software.
60**
61** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
62** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
63**
64** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
65** information about Qt Commercial License Agreements.
66** See http://www.trolltech.com/qpl/ for QPL licensing information.
67** See http://www.trolltech.com/gpl/ for GPL licensing information.
68**
69** Contact info@trolltech.com if any conditions of this licensing are
70** not clear to you.
71**
72**********************************************************************/
73
74#ifndef QLINEEDIT_H
75#define QLINEEDIT_H
76
77struct QLineEditPrivate;
78
79class QValidator;
80class QPopupMenu;
81
82#ifndef QT_H
83#include "qframe.h"
84#include "qstring.h"
85#endif // QT_H
86
87#ifndef QT_NO_LINEEDIT
88
89class QTextParagraph;
90class QTextCursor;
91
92class Q_EXPORT QLineEdit : public QFrame
93{
94 Q_OBJECT
95 Q_ENUMS( EchoMode )
96 Q_PROPERTY( QString text READ text WRITE setText )
97 Q_PROPERTY( int maxLength READ maxLength WRITE setMaxLength )
98 Q_PROPERTY( bool frame READ frame WRITE setFrame )
99 Q_PROPERTY( EchoMode echoMode READ echoMode WRITE setEchoMode )
100 Q_PROPERTY( QString displayText READ displayText )
101 Q_PROPERTY( int cursorPosition READ cursorPosition WRITE setCursorPosition )
102 Q_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
103 Q_PROPERTY( bool edited READ edited WRITE setEdited DESIGNABLE false )
104 Q_PROPERTY( bool modified READ isModified )
105 Q_PROPERTY( bool hasMarkedText READ hasMarkedText DESIGNABLE false )
106 Q_PROPERTY( bool hasSelectedText READ hasSelectedText )
107 Q_PROPERTY( QString markedText READ markedText DESIGNABLE false )
108 Q_PROPERTY( QString selectedText READ selectedText )
109 Q_PROPERTY( bool dragEnabled READ dragEnabled WRITE setDragEnabled )
110 Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
111 Q_PROPERTY( bool undoAvailable READ isUndoAvailable )
112 Q_PROPERTY( bool redoAvailable READ isRedoAvailable )
113 Q_PROPERTY( QString inputMask READ inputMask WRITE setInputMask )
114 Q_PROPERTY( bool acceptableInput READ hasAcceptableInput )
115
116public:
117 QLineEdit( QWidget* parent, const char* name=0 );
118 QLineEdit( const QString &amp;, QWidget* parent, const char* name=0 );
119 QLineEdit( const QString &amp;, const QString &amp;, QWidget* parent, const char* name=0 );
120 ~QLineEdit();
121
122 QString text() const;
123
124 QString displayText() const;
125
126 int maxLength() const;
127
128 bool frame() const;
129
130 enum EchoMode { Normal, NoEcho, Password };
131 EchoMode echoMode() const;
132
133 bool isReadOnly() const;
134
135 const QValidator * validator() const;
136
137 QSize sizeHint() const;
138 QSize minimumSizeHint() const;
139
140 int cursorPosition() const;
141 bool validateAndSet( const QString &amp;, int, int, int ); // obsolete
142
143 int alignment() const;
144
145#ifndef QT_NO_COMPAT
146 void cursorLeft( bool mark, int steps = 1 ) { cursorForward( mark, -steps ); }
147 void cursorRight( bool mark, int steps = 1 ) { cursorForward( mark, steps ); }
148#endif
149 void cursorForward( bool mark, int steps = 1 );
150 void cursorBackward( bool mark, int steps = 1 );
151 void cursorWordForward( bool mark );
152 void cursorWordBackward( bool mark );
153 void backspace();
154 void del();
155 void home( bool mark );
156 void end( bool mark );
157
158 bool isModified() const;
159 void clearModified();
160
161 bool edited() const; // obsolete, use isModified()
162 void setEdited( bool ); // obsolete, use clearModified()
163
164 bool hasSelectedText() const;
165 QString selectedText() const;
166 int selectionStart() const;
167
168 bool isUndoAvailable() const;
169 bool isRedoAvailable() const;
170
171#ifndef QT_NO_COMPAT
172 bool hasMarkedText() const { return hasSelectedText(); }
173 QString markedText() const { return selectedText(); }
174#endif
175
176 bool dragEnabled() const;
177
178 QString inputMask() const;
179 void setInputMask( const QString &amp;inputMask );
180 bool hasAcceptableInput() const;
181
182public slots:
183 virtual void setText( const QString &amp;);
184 virtual void selectAll();
185 virtual void deselect();
186 virtual void clearValidator();
187 virtual void insert( const QString &amp;);
188 virtual void clear();
189 virtual void undo();
190 virtual void redo();
191 virtual void setMaxLength( int );
192 virtual void setFrame( bool );
193 virtual void setEchoMode( EchoMode );
194 virtual void setReadOnly( bool );
195 virtual void setValidator( const QValidator * );
196 virtual void setFont( const QFont &amp; );
197 virtual void setPalette( const QPalette &amp; );
198 virtual void setSelection( int, int );
199 virtual void setCursorPosition( int );
200 virtual void setAlignment( int flag );
201#ifndef QT_NO_CLIPBOARD
202 virtual void cut();
203 virtual void copy() const;
204 virtual void paste();
205#endif
206 virtual void setDragEnabled( bool b );
207
208signals:
209 void textChanged( const QString &amp;);
210 void returnPressed();
211 void lostFocus();
212 void selectionChanged();
213
214protected:
215 bool event( QEvent * );
216 void mousePressEvent( QMouseEvent * );
217 void mouseMoveEvent( QMouseEvent * );
218 void mouseReleaseEvent( QMouseEvent * );
219 void mouseDoubleClickEvent( QMouseEvent * );
220 void keyPressEvent( QKeyEvent * );
221 void imStartEvent( QIMEvent * );
222 void imComposeEvent( QIMEvent * );
223 void imEndEvent( QIMEvent * );
224 void focusInEvent( QFocusEvent * );
225 void focusOutEvent( QFocusEvent * );
226 void resizeEvent( QResizeEvent * );
227 void drawContents( QPainter * );
228#ifndef QT_NO_DRAGANDDROP
229 void dragEnterEvent( QDragEnterEvent * );
230 void dragMoveEvent( QDragMoveEvent *e );
231 void dragLeaveEvent( QDragLeaveEvent *e );
232 void dropEvent( QDropEvent * );
233#endif
234 void contextMenuEvent( QContextMenuEvent * );
235 virtual QPopupMenu *createPopupMenu();
236 void windowActivationChange( bool );
237#ifndef QT_NO_COMPAT
238 void repaintArea( int, int ) { update(); }
239#endif
240
241private slots:
242 void clipboardChanged();
243
244public:
245 void setPasswordChar( QChar c ); // internal obsolete
246 QChar passwordChar() const; // obsolete internal
247 int characterAt( int, QChar* ) const; // obsolete
248 bool getSelection( int *, int * ); // obsolete
249
250private:
251 friend struct QLineEditPrivate;
252 QLineEditPrivate * d;
253
254private: // Disabled copy constructor and operator=
255#if defined(Q_DISABLE_COPY)
256 QLineEdit( const QLineEdit &amp; );
257 QLineEdit &amp;operator=( const QLineEdit &amp; );
258#endif
259};
260
261
262#endif // QT_NO_LINEEDIT
263
264#endif // QLINEEDIT_H
265</pre>
266<!-- eof -->
267<p><address><hr><div align=center>
268<table width=100% cellspacing=0 border=0><tr>
269<td>Copyright &copy; 2007
270<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
271<td align=right><div align=right>Qt 3.3.8</div>
272</table></div></address></body>
273</html>
Note: See TracBrowser for help on using the repository browser.