45 #include <QtGui/qframe.h> 46 #include <QtGui/qtextcursor.h> 47 #include <QtCore/qstring.h> 48 #include <QtCore/qmargins.h> 56 #ifndef QT_NO_LINEEDIT 78 Qt::Alignment alignment;
96 QT3_SUPPORT_CONSTRUCTOR
QLineEdit(
const QString &,
const QString &,
QWidget* parent=0,
const char*
name=0);
100 QString
text()
const;
102 QString displayText()
const;
104 QString placeholderText()
const;
105 void setPlaceholderText(
const QString &);
107 int maxLength()
const;
108 void setMaxLength(
int);
111 bool hasFrame()
const;
113 enum EchoMode { Normal, NoEcho, Password, PasswordEchoOnEdit };
117 bool isReadOnly()
const;
118 void setReadOnly(
bool);
120 #ifndef QT_NO_VALIDATOR 125 #ifndef QT_NO_COMPLETER 133 int cursorPosition()
const;
134 void setCursorPosition(
int);
135 int cursorPositionAt(
const QPoint &pos);
137 void setAlignment(Qt::Alignment flag);
138 Qt::Alignment alignment()
const;
140 void cursorForward(
bool mark,
int steps = 1);
141 void cursorBackward(
bool mark,
int steps = 1);
142 void cursorWordForward(
bool mark);
143 void cursorWordBackward(
bool mark);
146 void home(
bool mark);
149 bool isModified()
const;
150 void setModified(
bool);
152 void setSelection(
int,
int);
153 bool hasSelectedText()
const;
154 QString selectedText()
const;
155 int selectionStart()
const;
157 bool isUndoAvailable()
const;
158 bool isRedoAvailable()
const;
160 void setDragEnabled(
bool b);
161 bool dragEnabled()
const;
166 QString inputMask()
const;
167 void setInputMask(
const QString &inputMask);
168 bool hasAcceptableInput()
const;
170 void setTextMargins(
int left,
int top,
int right,
int bottom);
171 void setTextMargins(
const QMargins &margins);
172 void getTextMargins(
int *left,
int *top,
int *right,
int *bottom)
const;
176 void setText(
const QString &);
181 #ifndef QT_NO_CLIPBOARD 189 void insert(
const QString &);
190 #ifndef QT_NO_CONTEXTMENU 191 QMenu *createStandardContextMenu();
195 void textChanged(
const QString &);
196 void textEdited(
const QString &);
197 void cursorPositionChanged(
int,
int);
198 void returnPressed();
199 void editingFinished();
200 void selectionChanged();
211 #ifndef QT_NO_DRAGANDDROP 218 #ifndef QT_NO_CONTEXTMENU 222 inline QT3_SUPPORT
void repaintArea(
int,
int) {
update(); }
231 QRect cursorRect()
const;
235 inline QT3_SUPPORT
void clearModified() { setModified(
false); }
236 inline QT3_SUPPORT
void cursorLeft(
bool mark,
int steps = 1) { cursorForward(mark, -steps); }
237 inline QT3_SUPPORT
void cursorRight(
bool mark,
int steps = 1) { cursorForward(mark, steps); }
238 QT3_SUPPORT
bool validateAndSet(
const QString &,
int,
int,
int);
239 inline QT3_SUPPORT
bool frame()
const {
return hasFrame(); }
240 #ifndef QT_NO_VALIDATOR 241 inline QT3_SUPPORT
void clearValidator() { setValidator(0); }
243 inline QT3_SUPPORT
bool hasMarkedText()
const {
return hasSelectedText(); }
244 inline QT3_SUPPORT QString markedText()
const {
return selectedText(); }
245 QT3_SUPPORT
bool edited()
const;
246 QT3_SUPPORT
void setEdited(
bool);
247 QT3_SUPPORT
int characterAt(
int,
QChar*)
const;
248 QT3_SUPPORT
bool getSelection(
int *,
int *);
250 QT3_SUPPORT
void setFrameRect(
QRect) {}
251 QT3_SUPPORT
QRect frameRect()
const {
return QRect(); }
252 enum DummyFrame { Box, Sunken, Plain, Raised, MShadow, NoFrame, Panel, StyledPanel,
253 HLine, VLine, GroupBoxPanel, WinPanel, ToolBarPanel, MenuBarPanel,
254 PopupPanel, LineEditPanel, TabWidgetPanel, MShape };
255 QT3_SUPPORT
void setFrameShadow(DummyFrame) {}
256 QT3_SUPPORT DummyFrame frameShadow()
const {
return Plain; }
257 QT3_SUPPORT
void setFrameShape(DummyFrame) {}
258 QT3_SUPPORT DummyFrame frameShape()
const {
return NoFrame; }
259 QT3_SUPPORT
void setFrameStyle(
int) {}
260 QT3_SUPPORT
int frameStyle()
const {
return 0; }
261 QT3_SUPPORT
int frameWidth()
const {
return 0; }
262 QT3_SUPPORT
void setLineWidth(
int) {}
263 QT3_SUPPORT
int lineWidth()
const {
return 0; }
264 QT3_SUPPORT
void setMargin(
int margin) {
setContentsMargins(margin, margin, margin, margin); }
265 QT3_SUPPORT
int margin()
const 266 {
int margin;
int dummy;
getContentsMargins(&margin, &dummy, &dummy, &dummy);
return margin; }
267 QT3_SUPPORT
void setMidLineWidth(
int) {}
268 QT3_SUPPORT
int midLineWidth()
const {
return 0; }
277 #ifdef QT_KEYPAD_NAVIGATION 285 #ifndef QT_NO_COMPLETER 288 #ifdef QT_KEYPAD_NAVIGATION 295 #endif // QT_NO_LINEEDIT 301 #endif // QLINEEDIT_H The QVariant class acts like a union for the most common Qt data types.
The QKeyEvent class describes a key event.
#define QT_END_NAMESPACE
This macro expands to.
The QAccessibleLineEdit class implements the QAccessibleInterface for widgets with editable text...
static void clear(QVariant::Private *d)
The QCompleter class provides completions based on an item model.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
The QString class provides a Unicode character string.
The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress...
The QChar class provides a 16-bit Unicode character.
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
The QDateTimeEdit class provides a widget for editing dates and times.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QValidator class provides validation of input text.
EchoMode
This enum type describes how a line edit should display its contents.
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
The QDragLeaveEvent class provides an event that is sent to a widget when a drag and drop action leav...
The QAbstractSpinBox class provides a spinbox and a line edit to display values.
The QMouseEvent class contains parameters that describe a mouse event.
The QDropEvent class provides an event which is sent when a drag and drop action is completed...
CursorMoveStyle
This enum describes the movement style available to text cursors.
The QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action ent...
The QPoint class defines a point in the plane using integer precision.
The QRect class defines a rectangle in the plane using integer precision.
The QLineEdit widget is a one-line text editor.
The QSize class defines the size of a two-dimensional object using integer point precision.
#define Q_DECLARE_PRIVATE(Class)
The QMargins class defines the four margins of a rectangle.
The QPaintEvent class contains event parameters for paint events.
static const KeyPair *const end
The QEvent class is the base class of all event classes.
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
The QFocusEvent class contains event parameters for widget focus events.