42 #ifndef QDECLARATIVETEXTEDIT_H 43 #define QDECLARATIVETEXTEDIT_H 45 #include "private/qdeclarativetext_p.h" 46 #include "private/qdeclarativeimplicitsizeitem_p.h" 48 #include <QtGui/qtextdocument.h> 49 #include <QtGui/qtextoption.h> 50 #include <QtGui/qtextcursor.h> 51 #include <QtGui/qtextformat.h> 90 bool activeFocusOnPress;
91 bool persistentSelection;
93 Qt::InputMethodHints inputMethodHints;
97 bool inputMethodComposing;
143 void setFont(
const QFont &font);
146 void setColor(
const QColor &
c);
148 QColor selectionColor()
const;
149 void setSelectionColor(
const QColor &
c);
151 QColor selectedTextColor()
const;
152 void setSelectedTextColor(
const QColor &
c);
165 int lineCount()
const;
167 bool isCursorVisible()
const;
168 void setCursorVisible(
bool on);
170 int cursorPosition()
const;
171 void setCursorPosition(
int pos);
176 int selectionStart()
const;
177 int selectionEnd()
const;
181 bool focusOnPress()
const;
182 void setFocusOnPress(
bool on);
184 bool persistentSelection()
const;
185 void setPersistentSelection(
bool on);
187 qreal textMargin()
const;
188 void setTextMargin(
qreal margin);
190 bool selectByMouse()
const;
191 void setSelectByMouse(
bool);
196 bool canPaste()
const;
201 void setReadOnly(
bool);
202 bool isReadOnly()
const;
204 void setTextInteractionFlags(Qt::TextInteractionFlags flags);
205 Qt::TextInteractionFlags textInteractionFlags()
const;
207 QRect cursorRectangle()
const;
211 qreal paintedWidth()
const;
212 qreal paintedHeight()
const;
221 bool isInputMethodComposing() const;
224 void textChanged(const
QString &);
225 void paintedSizeChanged();
226 void cursorPositionChanged();
227 void cursorRectangleChanged();
228 void selectionStartChanged();
229 void selectionEndChanged();
230 void selectionChanged();
231 void colorChanged(const
QColor &color);
232 void selectionColorChanged(const
QColor &color);
233 void selectedTextColorChanged(const
QColor &color);
234 void fontChanged(const
QFont &font);
235 void horizontalAlignmentChanged(
HAlignment alignment);
236 void verticalAlignmentChanged(
VAlignment alignment);
237 void wrapModeChanged();
238 void lineCountChanged();
239 void textFormatChanged(
TextFormat textFormat);
240 void readOnlyChanged(
bool isReadOnly);
241 void cursorVisibleChanged(
bool isCursorVisible);
242 void cursorDelegateChanged();
243 void activeFocusOnPressChanged(
bool activeFocusOnPressed);
244 void persistentSelectionChanged(
bool isPersistentSelection);
245 void textMarginChanged(
qreal textMargin);
246 void selectByMouseChanged(
bool selectByMouse);
247 Q_REVISION(1)
void mouseSelectionModeChanged(
SelectionMode mode);
248 Q_REVISION(1)
void linkActivated(const QString &link);
249 Q_REVISION(1)
void canPasteChanged();
250 Q_REVISION(1)
void inputMethodComposingChanged();
256 Q_REVISION(1)
void deselect();
257 Q_REVISION(1)
bool isRightToLeft(
int start,
int end);
258 #ifndef QT_NO_CLIPBOARD 265 void updateImgCache(
const QRectF &rect);
266 void q_textChanged();
267 void updateSelectionMarkers();
268 void moveCursorDelegate();
269 void loadCursorDelegate();
270 void q_canPasteChanged();
274 void updateTotalLines();
278 const QRectF &oldGeometry);
The QVariant class acts like a union for the most common Qt data types.
The QPainter class performs low-level painting on widgets and other paint devices.
The QColor class provides colors based on RGB, HSV or CMYK values.
The QKeyEvent class describes a key event.
#define QT_END_NAMESPACE
This macro expands to.
QScopedPointer< QGraphicsItemPrivate > d_ptr
#define QML_DECLARE_TYPE(TYPE)
virtual bool event(QEvent *)
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
virtual void keyPressEvent(QKeyEvent *event)
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
This event handler, for event event, can be reimplemented to receive mouse doubleclick events for thi...
The QString class provides a Unicode character string.
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
This event handler, for event event, can be reimplemented to receive mouse press events for this item...
virtual void focusInEvent(QFocusEvent *event)
This event handler, for event event, can be reimplemented to receive focus in events for this item...
static const QRectF boundingRect(const QPointF *points, int pointCount)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
The QDeclarativeComponent class encapsulates a QML component definition.
The QDeclarativeItem class provides the most basic of all visual items in QML.
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
This event handler, for event event, can be reimplemented to receive mouse move events for this item...
QVariant data(int key) const
Returns this item's custom data for the key key as a QVariant.
#define Q_DECLARE_PRIVATE_D(Dptr, Class)
virtual void keyReleaseEvent(QKeyEvent *event)
virtual void drawContents(QPainter *, const QRect &)
This function is called when the cache needs to be refreshed.
virtual void inputMethodEvent(QInputMethodEvent *)
The QFont class specifies a font used for drawing text.
virtual void componentComplete()
The QRect class defines a rectangle in the plane using integer precision.
#define Q_AUTOTEST_EXPORT
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const
static const KeyPair *const end
The QEvent class is the base class of all event classes.
virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
This function is called to handle this item's changes in geometry from oldGeometry to newGeometry...
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
This event handler, for event event, can be reimplemented to receive mouse release events for this it...
The QFocusEvent class contains event parameters for widget focus events.