Qt 4.8
qlineedit_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QLINEEDIT_P_H
43 #define QLINEEDIT_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists purely as an
50 // implementation detail. This header file may change from version to
51 // version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 
56 #include "QtCore/qglobal.h"
57 
58 #ifndef QT_NO_LINEEDIT
59 #include "private/qwidget_p.h"
60 #include "QtGui/qlineedit.h"
61 #include "QtGui/qtextlayout.h"
62 #include "QtGui/qstyleoption.h"
63 #include "QtCore/qbasictimer.h"
64 #include "QtGui/qcompleter.h"
65 #include "QtCore/qpointer.h"
66 #include "QtGui/qlineedit.h"
67 
68 #include "private/qlinecontrol_p.h"
69 
71 
73 {
75 public:
76 
82  {
83  }
84 
86  {
87  }
88 
90 
91 #ifndef QT_NO_CONTEXTMENU
93 #endif
94  void init(const QString&);
95 
96  QRect adjustedControlRect(const QRect &) const;
97 
99  QRect cursorRect() const;
100  void setCursorVisible(bool visible);
101 
102  void updatePasswordEchoEditing(bool);
103 
104  inline bool shouldEnableInputMethod() const
105  {
106  return !control->isReadOnly();
107  }
108 
111  uint frame : 1;
116  int hscroll;
117  int vscroll;
119  static const int verticalMargin;
120  static const int horizontalMargin;
121 
123 
124  QRect adjustedContentsRect() const;
125 
127  void _q_textEdited(const QString &);
128  void _q_cursorPositionChanged(int, int);
129 #ifdef QT_KEYPAD_NAVIGATION
130  void _q_editFocusChange(bool);
131 #endif
132  void _q_selectionChanged();
133  void _q_updateNeeded(const QRect &);
134 #ifndef QT_NO_COMPLETER
136 #endif
137 #ifndef QT_NO_DRAGANDDROP
140  void drag();
141 #endif
142 
147 
149 };
150 
151 #endif // QT_NO_LINEEDIT
152 
154 
155 #endif // QLINEEDIT_P_H
void _q_completionHighlighted(QString)
Definition: qlineedit_p.cpp:84
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
void _q_selectionChanged()
The QString class provides a Unicode character string.
Definition: qstring.h:83
void updatePasswordEchoEditing(bool)
QRect cursorRect() const
Definition: qlineedit_p.cpp:77
QRect adjustedControlRect(const QRect &) const
Definition: qlineedit_p.cpp:62
void setCursorVisible(bool visible)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
int xToPos(int x, QTextLine::CursorPosition=QTextLine::CursorBetweenCharacters) const
Definition: qlineedit_p.cpp:70
QRect adjustedContentsRect() const
void _q_handleWindowActivate()
unsigned int uint
Definition: qglobal.h:996
static const int horizontalMargin
Definition: qlineedit_p.h:120
static const int verticalMargin
Definition: qlineedit_p.h:119
void _q_textEdited(const QString &)
The QMouseEvent class contains parameters that describe a mouse event.
Definition: qevent.h:85
bool shouldEnableInputMethod() const
Definition: qlineedit_p.h:104
bool isReadOnly() const
#define Q_DECLARE_PUBLIC(Class)
Definition: qglobal.h:2477
bool sendMouseEventToInputContext(QMouseEvent *e)
This function is not intended as polymorphic usage.
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
void _q_updateNeeded(const QRect &)
QString placeholderText
Definition: qlineedit_p.h:148
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
Definition: qnamespace.h:54
QPointer< QAction > selectAllAction
Definition: qlineedit_p.h:92
The QLineEdit widget is a one-line text editor.
Definition: qlineedit.h:66
QLineControl * control
Definition: qlineedit_p.h:89
The QBasicTimer class provides timer events for objects.
Definition: qbasictimer.h:55
QBasicTimer tripleClickTimer
Definition: qlineedit_p.h:110
void init(const QString &)
void _q_cursorPositionChanged(int, int)
QBasicTimer dndTimer
Definition: qlineedit_p.h:139