Qt 4.8
Public Functions | Public Variables | List of all members
QDeclarativeTextEditPrivate Class Reference

#include <qdeclarativetextedit_p_p.h>

Inheritance diagram for QDeclarativeTextEditPrivate:
QDeclarativeImplicitSizePaintedItemPrivate QDeclarativePaintedItemPrivate QDeclarativeItemPrivate QGraphicsItemPrivate

Public Functions

bool determineHorizontalAlignment ()
 
void focusChanged (bool)
 
qreal implicitWidth () const
 
void init ()
 
void mirrorChange ()
 
 QDeclarativeTextEditPrivate ()
 
void relayoutDocument ()
 
bool setHAlign (QDeclarativeTextEdit::HAlignment, bool forceAlign=false)
 
void updateDefaultTextOption ()
 
void updateSelection ()
 
- Public Functions inherited from QDeclarativeImplicitSizePaintedItemPrivate
virtual void implicitHeightChanged ()
 
virtual void implicitWidthChanged ()
 
 QDeclarativeImplicitSizePaintedItemPrivate ()
 
- Public Functions inherited from QDeclarativePaintedItemPrivate
 QDeclarativePaintedItemPrivate ()
 
- Public Functions inherited from QDeclarativeItemPrivate
QDeclarativeStateGroup_states ()
 
void addItemChangeListener (QDeclarativeItemChangeListener *listener, ChangeTypes types)
 
AnchorLinesanchorLines () const
 
QDeclarativeAnchorsanchors ()
 
QDeclarativeAnchorLine baseline () const
 
QDeclarativeAnchorLine bottom () const
 
QPointF computeTransformOrigin () const
 
QDeclarativeListProperty< QObjectdata ()
 
virtual void focusScopeItemChange (bool isSubFocusItem)
 Subclasses can reimplement this function to be notified when an item becomes a focusScopeItem (or is no longer a focusScopeItem). More...
 
qreal height () const
 
QDeclarativeAnchorLine horizontalCenter () const
 
virtual qreal implicitHeight () const
 
void init (QDeclarativeItem *parent)
 
bool isMirrored () const
 
QDeclarativeAnchorLine left () const
 
 QDeclarativeItemPrivate ()
 
void removeItemChangeListener (QDeclarativeItemChangeListener *, ChangeTypes types)
 
void resetHeight ()
 
void resetWidth ()
 
void resolveLayoutMirror ()
 
QDeclarativeListProperty< QObjectresources ()
 
QDeclarativeAnchorLine right () const
 
void setHeight (qreal)
 
void setImplicitLayoutMirror (bool mirror, bool inherit)
 
void setLayoutMirror (bool mirror)
 
virtual void setPosHelper (const QPointF &pos)
 Sets the position pos. More...
 
void setState (const QString &)
 
void setWidth (qreal)
 
virtual void siblingOrderChange ()
 Subclasses can reimplement this function to be notified when its siblingIndex order is changed. More...
 
QString state () const
 
QDeclarativeListProperty< QDeclarativeStatestates ()
 
QDeclarativeAnchorLine top () const
 
virtual void transformChanged ()
 
QDeclarativeListProperty< QDeclarativeTransitiontransitions ()
 
QDeclarativeAnchorLine verticalCenter () const
 
qreal width () const
 
- Public Functions inherited from QGraphicsItemPrivate
void addChild (QGraphicsItem *child)
 QGraphicsScenePrivate::registerTopLevelItem(). More...
 
void appendGraphicsTransform (QGraphicsTransform *t)
 
qreal calcEffectiveOpacity () const
 
void childrenBoundingRectHelper (QTransform *x, QRectF *rect, QGraphicsItem *topMostEffectItem)
 Returns the bounding rect of this item's children (excluding itself). More...
 
bool childrenClippedToShape () const
 
bool childrenCombineOpacity () const
 
QDeclarativeListProperty< QGraphicsObjectchildrenList ()
 Returns a list of this item's children. More...
 
void clearFocusHelper (bool giveFocusToParent)
 
void clearSubFocus (QGraphicsItem *rootItem=0, QGraphicsItem *stopItem=0)
 
qreal combineOpacityFromParent (qreal parentOpacity) const
 
void combineTransformFromParent (QTransform *x, const QTransform *viewTransform=0) const
 Combines this item's position and transform onto transform. More...
 
void combineTransformToParent (QTransform *x, const QTransform *viewTransform=0) const
 Combines this item's position and transform onto transform. More...
 
int depth () const
 
bool discardUpdateRequest (bool ignoreVisibleBit=false, bool ignoreDirtyBit=false, bool ignoreOpacity=false) const
 Returns true if we can discard an update request; otherwise false. More...
 
QRectF effectiveBoundingRect (QGraphicsItem *topMostEffectItem=0) const
 Returns the effective bounding rect of the item. More...
 
QRectF effectiveBoundingRect (const QRectF &rect) const
 Returns the effective bounding rect of the given item space rect. More...
 
qreal effectiveOpacity () const
 
void ensureSceneTransform ()
 
void ensureSceneTransformRecursive (QGraphicsItem **topMostDirtyItem)
 
void ensureSequentialSiblingIndex ()
 Ensures that the list of children is sorted by insertion order, and that the siblingIndexes are packed (no gaps), and start at 0. More...
 
void ensureSortedChildren ()
 
QVariant extra (Extra type) const
 
QGraphicsItemCacheextraItemCache () const
 
QPointF genericMapFromScene (const QPointF &pos, const QWidget *viewport) const
 Maps the point pos from scene to item coordinates. More...
 
bool hasTranslateOnlySceneTransform ()
 
void initStyleOption (QStyleOptionGraphicsItem *option, const QTransform &worldTransform, const QRegion &exposedRegion, bool allItems=false) const
 
virtual QVariant inputMethodQueryHelper (Qt::InputMethodQuery query) const
 This helper function helped us add input method query support in Qt 4. More...
 
void invalidateChildGraphicsEffectsRecursively (InvalidateReason reason)
 
void invalidateChildrenSceneTransform ()
 
void invalidateDepthRecursively ()
 
void invalidateParentGraphicsEffectsRecursively ()
 
bool isFullyTransparent () const
 
bool isInvisible () const
 
bool isOpacityNull () const
 
virtual bool isProxyWidget () const
 
bool itemIsUntransformable () const
 
void markParentDirty (bool updateBoundingRect=false)
 
QGraphicsItemCachemaybeExtraItemCache () const
 
void prependGraphicsTransform (QGraphicsTransform *t)
 
 QGraphicsItemPrivate ()
 
void remapItemPos (QEvent *event, QGraphicsItem *item)
 Maps any item pos properties of event to item's coordinate system. More...
 
void removeChild (QGraphicsItem *child)
 QGraphicsScenePrivate::unregisterTopLevelItem(). More...
 
void removeExtraItemCache ()
 
void resetFocusProxy ()
 Sets the focusProxy pointer to 0 for all items that have this item as their focusProxy. More...
 
void resolveDepth ()
 Resolves the stacking depth of this object and all its ancestors. More...
 
virtual void resolveFont (uint inheritedMask)
 
virtual void resolvePalette (uint inheritedMask)
 
QRectF sceneEffectiveBoundingRect () const
 Returns the effective bounding rect of this item in scene coordinates, by combining sceneTransform() with boundingRect(), taking into account the effect that the item might have. More...
 
void sendScenePosChange ()
 
void setEnabledHelper (bool newEnabled, bool explicitly, bool update=true)
 Sets this item's visibility to newEnabled. More...
 
void setExtra (Extra type, const QVariant &value)
 
void setFocusHelper (Qt::FocusReason focusReason, bool climb, bool focusFromHide)
 
void setIsMemberOfGroup (bool enabled)
 Propagates item group membership. More...
 
void setParentItemHelper (QGraphicsItem *parent, const QVariant *newParentVariant, const QVariant *thisPointerVariant)
 Make sure not to trigger any pure virtual function calls (e. More...
 
void setSubFocus (QGraphicsItem *rootItem=0, QGraphicsItem *stopItem=0)
 
void setTransformHelper (const QTransform &transform)
 Sets the transform transform. More...
 
void setVisibleHelper (bool newVisible, bool explicitly, bool update=true)
 Sets this item's visibility to newVisible. More...
 
virtual void subFocusItemChange ()
 Subclasses can reimplement this function to be notified when subFocusItem changes. More...
 
QTransform transformToParent () const
 
void unsetExtra (Extra type)
 
void updateAncestorFlag (QGraphicsItem::GraphicsItemFlag childFlag, AncestorFlag flag=NoFlag, bool enabled=false, bool root=true)
 Propagates the ancestor flag flag with value enabled to all this item's children. More...
 
void updateAncestorFlags ()
 
void updateChildWithGraphicsEffectFlagRecursively ()
 
void updatePaintedViewBoundingRects (bool updateChildren)
 
virtual void updateSceneTransformFromParent ()
 
virtual ~QGraphicsItemPrivate ()
 

Public Variables

bool canPaste
 
bool clickCausedFocus: 1
 
QColor color
 
QTextControlcontrol
 
QDeclarativeItemcursor
 
QDeclarativeComponentcursorComponent
 
bool cursorVisible: 1
 
bool dirty: 1
 
QTextDocumentdocument
 
bool focusOnPress: 1
 
QFont font
 
QDeclarativeTextEdit::TextFormat format
 
QDeclarativeTextEdit::HAlignment hAlign
 
bool hAlignImplicit:1
 
QPixmap imgCache
 
bool imgDirty: 1
 
QPixmap imgStyleCache
 
int lastSelectionEnd
 
int lastSelectionStart
 
int lineCount
 
QDeclarativeTextEdit::SelectionMode mouseSelectionMode
 
QSize paintedSize
 
bool persistentSelection: 1
 
bool requireImplicitWidth:1
 
bool richText: 1
 
bool rightToLeftText:1
 
bool selectByMouse
 
QColor selectedTextColor
 
QColor selectionColor
 
bool showInputPanelOnFocus: 1
 
QFont sourceFont
 
QString style
 
QColor styleColor
 
QString text
 
qreal textMargin
 
QDeclarativeTextEdit::VAlignment vAlign
 
QDeclarativeTextEdit::WrapMode wrapMode
 
int yoff
 
- Public Variables inherited from QDeclarativePaintedItemPrivate
bool cachefrozen
 
qreal contentsScale
 
QSize contentsSize
 
QColor fillColor
 
QList< ImageCacheItem * > imagecache
 
int max_imagecache_size
 
bool smoothCache
 
- Public Variables inherited from QDeclarativeItemPrivate
AnchorLines_anchorLines
 
QDeclarativeAnchors_anchors
 
QDeclarativeContents_contents
 
QDeclarativeStateGroup_stateGroup
 
QDeclarativeLayoutMirroringAttachedattachedLayoutDirection
 
QDeclarativeNullableValue< qrealbaselineOffset
 
QPODVector< ChangeListener, 4 > changeListeners
 
bool componentComplete:1
 
bool doneEventPreHandler: 1
 
bool effectiveLayoutMirror:1
 
bool hadActiveFocus:1
 
bool hadFocus:1
 
bool heightValid:1
 
bool inheritedLayoutMirror:1
 
bool inheritMirrorFromItem:1
 
bool inheritMirrorFromParent:1
 
bool isMirrorImplicit:1
 
bool keepMouse:1
 
QDeclarativeItemKeyFilterkeyHandler
 
qreal mHeight
 
qreal mImplicitHeight
 
qreal mImplicitWidth
 
qreal mWidth
 
QDeclarativeItem::TransformOrigin origin:5
 
QDeclarativeNotifier parentNotifier
 
bool smooth:1
 
bool transformOriginDirty: 1
 
bool widthValid:1
 
- Public Variables inherited from QGraphicsItemPrivate
quint32 acceptDrops: 1
 
quint32 acceptedMouseButtons: 5
 
quint32 acceptedTouchBeginEvent: 1
 
quint32 acceptsHover: 1
 
quint32 acceptTouchEvents: 1
 
quint32 allChildrenDirty: 1
 
quint32 ancestorFlags: 4
 
quint32 cacheMode: 2
 
QList< QGraphicsItem * > children
 
QRectF childrenBoundingRect
 
quint32 dirty: 1
 
quint32 dirtyChildren: 1
 
quint32 dirtyChildrenBoundingRect: 1
 
quint32 dirtySceneTransform: 1
 
quint32 enabled: 1
 
quint32 explicitActivate: 1
 
quint32 explicitlyDisabled: 1
 
quint32 explicitlyHidden: 1
 
QList< ExtraStructextras
 
quint32 filtersDescendantEvents: 1
 
quint32 flags: 19
 
QGraphicsItemfocusProxy
 
QList< QGraphicsItem ** > focusProxyRefs
 
QGraphicsItemfocusScopeItem
 
quint32 fullUpdatePending: 1
 
quint32 geometryChanged: 1
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
int globalStackingOrder
 
QGraphicsEffectgraphicsEffect
 
quint32 handlesChildEvents: 1
 
quint32 hasBoundingRegionGranularity: 1
 
quint32 hasCursor: 1
 
quint32 holesInSiblingIndex: 1
 
quint32 ignoreOpacity: 1
 
quint32 ignoreVisible: 1
 
Qt::InputMethodHints imHints
 
quint32 inDestructor: 1
 
int index
 
quint32 inSetPosHelper: 1
 
quint32 isDeclarativeItem: 1
 
quint32 isMemberOfGroup: 1
 
quint32 isObject: 1
 
quint32 isWidget: 1
 
int itemDepth
 
quint32 itemDiscovered: 1
 
quint32 localCollisionHack: 1
 
quint32 mayHaveChildWithGraphicsEffect: 1
 
quint32 mouseSetsFocus: 1
 
quint32 needSortChildren: 1
 
QRectF needsRepaint
 
quint32 notifyBoundingRectChanged: 1
 
quint32 notifyInvalidated: 1
 
qreal opacity
 
quint32 padding: 21
 
QMap< QWidget *, QRectpaintedViewBoundingRects
 
quint32 paintedViewBoundingRectsNeedRepaint: 1
 
QGraphicsItem::PanelModality panelModality
 
QGraphicsItemparent
 
quint32 pendingPolish: 1
 
QPointF pos
 
QGraphicsItemq_ptr
 
QGraphicsScenescene
 
quint32 scenePosDescendants: 1
 
QTransform sceneTransform
 
quint32 sceneTransformTranslateOnly: 1
 
quint32 selected: 1
 
quint32 sendParentChangeNotification: 1
 
quint32 sequentialOrdering: 1
 
int siblingIndex
 
QGraphicsItemsubFocusItem
 
TransformDatatransformData
 
quint32 updateDueToGraphicsEffect: 1
 
quint32 visible: 1
 
quint32 wantsActive: 1
 
qreal z
 

Additional Inherited Members

- Public Types inherited from QDeclarativeItemPrivate
enum  ChangeType {
  Geometry = 0x01, SiblingOrder = 0x02, Visibility = 0x04, Opacity = 0x08,
  Destroyed = 0x10
}
 
- Public Types inherited from QGraphicsItemPrivate
enum  AncestorFlag {
  NoFlag = 0, AncestorHandlesChildEvents = 0x1, AncestorClipsChildren = 0x2, AncestorIgnoresTransformations = 0x4,
  AncestorFiltersChildEvents = 0x8
}
 
enum  Extra {
  ExtraToolTip, ExtraCursor, ExtraCacheData, ExtraMaxDeviceCoordCacheSize,
  ExtraBoundingRegionGranularity
}
 
enum  InvalidateReason { OpacityChanged }
 
- Static Public Functions inherited from QDeclarativeItemPrivate
static void data_append (QDeclarativeListProperty< QObject > *, QObject *)
 
static QObjectdata_at (QDeclarativeListProperty< QObject > *, int)
 
static void data_clear (QDeclarativeListProperty< QObject > *)
 
static int data_count (QDeclarativeListProperty< QObject > *)
 
static qint64 elapsed (QElapsedTimer &)
 
static QDeclarativeItemPrivateget (QDeclarativeItem *item)
 
static void parentProperty (QObject *o, void *rv, QDeclarativeNotifierEndpoint *e)
 
static void resources_append (QDeclarativeListProperty< QObject > *, QObject *)
 
static QObjectresources_at (QDeclarativeListProperty< QObject > *, int)
 
static void resources_clear (QDeclarativeListProperty< QObject > *)
 
static int resources_count (QDeclarativeListProperty< QObject > *)
 
static qint64 restart (QElapsedTimer &)
 
static void setConsistentTime (qint64 t)
 
static void start (QElapsedTimer &)
 
static void transform_append (QDeclarativeListProperty< QGraphicsTransform > *list, QGraphicsTransform *)
 
static QGraphicsTransformtransform_at (QDeclarativeListProperty< QGraphicsTransform > *list, int)
 
static void transform_clear (QDeclarativeListProperty< QGraphicsTransform > *list)
 
static int transform_count (QDeclarativeListProperty< QGraphicsTransform > *list)
 
- Static Public Functions inherited from QGraphicsItemPrivate
static void children_append (QDeclarativeListProperty< QGraphicsObject > *list, QGraphicsObject *item)
 
static QGraphicsObjectchildren_at (QDeclarativeListProperty< QGraphicsObject > *list, int)
 
static void children_clear (QDeclarativeListProperty< QGraphicsObject > *list)
 
static int children_count (QDeclarativeListProperty< QGraphicsObject > *list)
 
static const QGraphicsItemPrivateget (const QGraphicsItem *item)
 
static QGraphicsItemPrivateget (QGraphicsItem *item)
 
static bool insertionOrder (QGraphicsItem *a, QGraphicsItem *b)
 
static bool isOpacityNull (qreal opacity)
 
static bool movableAncestorIsSelected (const QGraphicsItem *item)
 
- Static Public Variables inherited from QDeclarativeItemPrivate
static qint64 consistentTime = -1
 

Detailed Description

Definition at line 65 of file qdeclarativetextedit_p_p.h.

Constructors and Destructors

◆ QDeclarativeTextEditPrivate()

QDeclarativeTextEditPrivate::QDeclarativeTextEditPrivate ( )
inline

Definition at line 70 of file qdeclarativetextedit_p_p.h.

72  imgDirty(true), dirty(false), richText(false), cursorVisible(false), focusOnPress(true),
77  yoff(0)
78  {
79 #ifdef Q_OS_SYMBIAN
80  if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_1) {
81  showInputPanelOnFocus = false;
82  }
83 #endif
84  }
QDeclarativeComponent * cursorComponent
QDeclarativeTextEdit::SelectionMode mouseSelectionMode
QDeclarativeTextEdit::HAlignment hAlign
QDeclarativeTextEdit::TextFormat format
QDeclarativeTextEdit::WrapMode wrapMode
QDeclarativeTextEdit::VAlignment vAlign

Functions

◆ determineHorizontalAlignment()

bool QDeclarativeTextEditPrivate::determineHorizontalAlignment ( )

Definition at line 600 of file qdeclarativetextedit.cpp.

Referenced by QDeclarativeTextEditPrivate().

601 {
603  if (hAlignImplicit && q->isComponentComplete()) {
604  bool alignToRight;
605  if (text.isEmpty() && !control->textCursor().isNull()) {
606  const QString preeditText = control->textCursor().block().layout()->preeditAreaText();
607  alignToRight = preeditText.isEmpty()
609  : preeditText.isRightToLeft();
610  } else {
611  alignToRight = rightToLeftText;
612  }
614  }
615  return false;
616 }
The QString class provides a Unicode character string.
Definition: qstring.h:83
QTextCursor textCursor() const
#define Q_Q(Class)
Definition: qglobal.h:2483
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
bool isRightToLeft() const
Returns true if the string is read right to left.
Definition: qstring.cpp:7528
bool setHAlign(QDeclarativeTextEdit::HAlignment, bool forceAlign=false)
QTextBlock block() const
Returns the block that contains the cursor.
QString preeditAreaText() const
Returns the text that is inserted in the layout before editing occurs.
bool isNull() const
Returns true if the cursor is null; otherwise returns false.
static Qt::LayoutDirection keyboardInputDirection()
Returns the current keyboard input direction.
QTextLayout * layout() const
Returns the QTextLayout that is used to lay out and display the block&#39;s contents. ...

◆ focusChanged()

void QDeclarativeTextEditPrivate::focusChanged ( bool  hasFocus)
virtual

Reimplemented from QDeclarativeItemPrivate.

Definition at line 1334 of file qdeclarativetextedit.cpp.

Referenced by QDeclarativeTextEditPrivate().

1335 {
1337  q->setCursorVisible(hasFocus && scene && scene->hasFocus());
1339 }
QGraphicsScene * scene
#define Q_Q(Class)
Definition: qglobal.h:2483
virtual void focusChanged(bool)
bool hasFocus() const
Returns true if the scene has focus; otherwise returns false.

◆ implicitWidth()

qreal QDeclarativeTextEditPrivate::implicitWidth ( ) const
virtual

Reimplemented from QDeclarativeItemPrivate.

Definition at line 1793 of file qdeclarativetextedit.cpp.

Referenced by QDeclarativeTextEditPrivate().

1794 {
1795  Q_Q(const QDeclarativeTextEdit);
1796  if (!requireImplicitWidth) {
1797  // We don't calculate implicitWidth unless it is required.
1798  // We need to force a size update now to ensure implicitWidth is calculated
1799  const_cast<QDeclarativeTextEditPrivate*>(this)->requireImplicitWidth = true;
1800  const_cast<QDeclarativeTextEdit*>(q)->updateSize();
1801  }
1802  return mImplicitWidth;
1803 }
#define Q_Q(Class)
Definition: qglobal.h:2483

◆ init()

void QDeclarativeTextEditPrivate::init ( )

Definition at line 1676 of file qdeclarativetextedit.cpp.

Referenced by QDeclarativeTextEditPrivate().

1677 {
1679 
1680  q->setSmooth(smooth);
1681  q->setAcceptedMouseButtons(Qt::LeftButton);
1682  q->setFlag(QGraphicsItem::ItemHasNoContents, false);
1684 
1685  control = new QTextControl(q);
1688  control->setDragEnabled(false);
1689 
1690  // QTextControl follows the default text color
1691  // defined by the platform, declarative text
1692  // should be black by default
1693  QPalette pal = control->palette();
1694  if (pal.color(QPalette::Text) != color) {
1696  control->setPalette(pal);
1697  }
1698 
1699  QObject::connect(control, SIGNAL(updateRequest(QRectF)), q, SLOT(updateImgCache(QRectF)));
1700 
1701  QObject::connect(control, SIGNAL(textChanged()), q, SLOT(q_textChanged()));
1702  QObject::connect(control, SIGNAL(selectionChanged()), q, SIGNAL(selectionChanged()));
1703  QObject::connect(control, SIGNAL(selectionChanged()), q, SLOT(updateSelectionMarkers()));
1704  QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SLOT(updateSelectionMarkers()));
1705  QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged()));
1706  QObject::connect(control, SIGNAL(microFocusChanged()), q, SLOT(moveCursorDelegate()));
1707  QObject::connect(control, SIGNAL(linkActivated(QString)), q, SIGNAL(linkActivated(QString)));
1708 #ifndef QT_NO_CLIPBOARD
1709  QObject::connect(q, SIGNAL(readOnlyChanged(bool)), q, SLOT(q_canPasteChanged()));
1710  QObject::connect(QApplication::clipboard(), SIGNAL(dataChanged()), q, SLOT(q_canPasteChanged()));
1711  canPaste = control->canPaste();
1712 #endif
1713 
1714  document = control->document();
1717  document->setUndoRedoEnabled(false); // flush undo buffer.
1720 }
void setTextInteractionFlags(Qt::TextInteractionFlags flags)
void setPalette(const QPalette &pal)
#define SLOT(a)
Definition: qobjectdefs.h:226
The QString class provides a Unicode character string.
Definition: qstring.h:83
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
Definition: qpalette.h:107
#define Q_Q(Class)
Definition: qglobal.h:2483
#define SIGNAL(a)
Definition: qobjectdefs.h:227
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511
static QClipboard * clipboard()
Returns a pointer to the application global clipboard.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
QPalette palette() const
void setIgnoreUnusedNavigationEvents(bool ignore)
void setDragEnabled(bool enabled)
QTextDocument * document() const
void setDefaultFont(const QFont &font)
Sets the default font to use in the document layout.
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
Sets the color in the specified color group, used for the given color role, to the specified solid co...
Definition: qpalette.h:201
void setUndoRedoEnabled(bool enable)
void setDocumentMargin(qreal margin)
bool canPaste() const
The QPalette class contains color groups for each widget state.
Definition: qpalette.h:61

◆ mirrorChange()

void QDeclarativeTextEditPrivate::mirrorChange ( )
virtual

◆ relayoutDocument()

void QDeclarativeTextEditPrivate::relayoutDocument ( )

◆ setHAlign()

bool QDeclarativeTextEditPrivate::setHAlign ( QDeclarativeTextEdit::HAlignment  alignment,
bool  forceAlign = false 
)

Definition at line 589 of file qdeclarativetextedit.cpp.

Referenced by QDeclarativeTextEditPrivate().

590 {
592  if (hAlign != alignment || forceAlign) {
593  hAlign = alignment;
594  emit q->horizontalAlignmentChanged(alignment);
595  return true;
596  }
597  return false;
598 }
#define Q_Q(Class)
Definition: qglobal.h:2483
#define emit
Definition: qobjectdefs.h:76
QDeclarativeTextEdit::HAlignment hAlign

◆ updateDefaultTextOption()

void QDeclarativeTextEditPrivate::updateDefaultTextOption ( )

Definition at line 1894 of file qdeclarativetextedit.cpp.

Referenced by QDeclarativeTextEditPrivate().

1895 {
1898  int oldAlignment = opt.alignment();
1899 
1900  QDeclarativeTextEdit::HAlignment horizontalAlignment = q->effectiveHAlign();
1901  if (rightToLeftText) {
1902  if (horizontalAlignment == QDeclarativeTextEdit::AlignLeft)
1903  horizontalAlignment = QDeclarativeTextEdit::AlignRight;
1904  else if (horizontalAlignment == QDeclarativeTextEdit::AlignRight)
1905  horizontalAlignment = QDeclarativeTextEdit::AlignLeft;
1906  }
1907  opt.setAlignment((Qt::Alignment)(int)(horizontalAlignment | vAlign));
1908 
1909  QTextOption::WrapMode oldWrapMode = opt.wrapMode();
1911 
1912  if (oldWrapMode == opt.wrapMode() && oldAlignment == opt.alignment())
1913  return;
1915 }
WrapMode
This enum describes how text is wrapped in a document.
Definition: qtextoption.h:102
void setDefaultTextOption(const QTextOption &option)
Sets the default text option.
#define Q_Q(Class)
Definition: qglobal.h:2483
void setAlignment(Qt::Alignment alignment)
Sets the option&#39;s text alignment to the specified alignment.
Definition: qtextoption.h:148
WrapMode wrapMode() const
Returns the text wrap mode defined by the option.
Definition: qtextoption.h:110
The QTextOption class provides a description of general rich text properties.
Definition: qtextoption.h:59
QDeclarativeTextEdit::WrapMode wrapMode
Qt::Alignment alignment() const
Returns the text alignment defined by the option.
Definition: qtextoption.h:97
void setWrapMode(WrapMode wrap)
Sets the option&#39;s text wrap mode to the given mode.
Definition: qtextoption.h:109
QTextOption defaultTextOption() const
the default text option will be set on all QTextLayout in the document.
QDeclarativeTextEdit::VAlignment vAlign

◆ updateSelection()

void QDeclarativeTextEditPrivate::updateSelection ( )

Definition at line 1747 of file qdeclarativetextedit.cpp.

Referenced by QDeclarativeTextEditPrivate().

1748 {
1751  bool startChange = (lastSelectionStart != cursor.selectionStart());
1752  bool endChange = (lastSelectionEnd != cursor.selectionEnd());
1753  cursor.beginEditBlock();
1756  cursor.endEditBlock();
1757  control->setTextCursor(cursor);
1758  if(startChange)
1759  q->selectionStartChanged();
1760  if(endChange)
1761  q->selectionEndChanged();
1762 }
void endEditBlock()
Indicates the end of a block of editing operations on the document that should appear as a single ope...
void setTextCursor(const QTextCursor &cursor)
int selectionEnd() const
Returns the end of the selection or position() if the cursor doesn&#39;t have a selection.
QTextCursor textCursor() const
#define Q_Q(Class)
Definition: qglobal.h:2483
The QTextCursor class offers an API to access and modify QTextDocuments.
Definition: qtextcursor.h:70
void beginEditBlock()
Indicates the start of a block of editing operations on the document that should appear as a single o...
void setPosition(int pos, MoveMode mode=MoveAnchor)
Moves the cursor to the absolute position in the document specified by pos using a MoveMode specified...
int selectionStart() const
Returns the start of the selection or position() if the cursor doesn&#39;t have a selection.

Properties

◆ canPaste

bool QDeclarativeTextEditPrivate::canPaste

Definition at line 132 of file qdeclarativetextedit_p_p.h.

◆ clickCausedFocus

bool QDeclarativeTextEditPrivate::clickCausedFocus

Definition at line 115 of file qdeclarativetextedit_p_p.h.

◆ color

QColor QDeclarativeTextEditPrivate::color

Definition at line 100 of file qdeclarativetextedit_p_p.h.

◆ control

QTextControl* QDeclarativeTextEditPrivate::control

Definition at line 127 of file qdeclarativetextedit_p_p.h.

◆ cursor

QDeclarativeItem* QDeclarativeTextEditPrivate::cursor

Definition at line 124 of file qdeclarativetextedit_p_p.h.

◆ cursorComponent

QDeclarativeComponent* QDeclarativeTextEditPrivate::cursorComponent

Definition at line 123 of file qdeclarativetextedit_p_p.h.

◆ cursorVisible

bool QDeclarativeTextEditPrivate::cursorVisible

Definition at line 112 of file qdeclarativetextedit_p_p.h.

◆ dirty

bool QDeclarativeTextEditPrivate::dirty

Definition at line 110 of file qdeclarativetextedit_p_p.h.

◆ document

QTextDocument* QDeclarativeTextEditPrivate::document

Definition at line 126 of file qdeclarativetextedit_p_p.h.

◆ focusOnPress

bool QDeclarativeTextEditPrivate::focusOnPress

Definition at line 113 of file qdeclarativetextedit_p_p.h.

◆ font

QFont QDeclarativeTextEditPrivate::font

Definition at line 98 of file qdeclarativetextedit_p_p.h.

◆ format

QDeclarativeTextEdit::TextFormat QDeclarativeTextEditPrivate::format

Definition at line 125 of file qdeclarativetextedit_p_p.h.

◆ hAlign

QDeclarativeTextEdit::HAlignment QDeclarativeTextEditPrivate::hAlign

Definition at line 107 of file qdeclarativetextedit_p_p.h.

◆ hAlignImplicit

bool QDeclarativeTextEditPrivate::hAlignImplicit

Definition at line 118 of file qdeclarativetextedit_p_p.h.

◆ imgCache

QPixmap QDeclarativeTextEditPrivate::imgCache

Definition at line 105 of file qdeclarativetextedit_p_p.h.

◆ imgDirty

bool QDeclarativeTextEditPrivate::imgDirty

Definition at line 109 of file qdeclarativetextedit_p_p.h.

◆ imgStyleCache

QPixmap QDeclarativeTextEditPrivate::imgStyleCache

Definition at line 106 of file qdeclarativetextedit_p_p.h.

◆ lastSelectionEnd

int QDeclarativeTextEditPrivate::lastSelectionEnd

Definition at line 122 of file qdeclarativetextedit_p_p.h.

◆ lastSelectionStart

int QDeclarativeTextEditPrivate::lastSelectionStart

Definition at line 121 of file qdeclarativetextedit_p_p.h.

◆ lineCount

int QDeclarativeTextEditPrivate::lineCount

Definition at line 130 of file qdeclarativetextedit_p_p.h.

◆ mouseSelectionMode

QDeclarativeTextEdit::SelectionMode QDeclarativeTextEditPrivate::mouseSelectionMode

Definition at line 129 of file qdeclarativetextedit_p_p.h.

◆ paintedSize

QSize QDeclarativeTextEditPrivate::paintedSize

Definition at line 134 of file qdeclarativetextedit_p_p.h.

◆ persistentSelection

bool QDeclarativeTextEditPrivate::persistentSelection

Definition at line 116 of file qdeclarativetextedit_p_p.h.

◆ requireImplicitWidth

bool QDeclarativeTextEditPrivate::requireImplicitWidth

Definition at line 117 of file qdeclarativetextedit_p_p.h.

◆ richText

bool QDeclarativeTextEditPrivate::richText

Definition at line 111 of file qdeclarativetextedit_p_p.h.

◆ rightToLeftText

bool QDeclarativeTextEditPrivate::rightToLeftText

Definition at line 119 of file qdeclarativetextedit_p_p.h.

◆ selectByMouse

bool QDeclarativeTextEditPrivate::selectByMouse

Definition at line 131 of file qdeclarativetextedit_p_p.h.

◆ selectedTextColor

QColor QDeclarativeTextEditPrivate::selectedTextColor

Definition at line 102 of file qdeclarativetextedit_p_p.h.

◆ selectionColor

QColor QDeclarativeTextEditPrivate::selectionColor

Definition at line 101 of file qdeclarativetextedit_p_p.h.

◆ showInputPanelOnFocus

bool QDeclarativeTextEditPrivate::showInputPanelOnFocus

Definition at line 114 of file qdeclarativetextedit_p_p.h.

Referenced by QDeclarativeTextEditPrivate().

◆ sourceFont

QFont QDeclarativeTextEditPrivate::sourceFont

Definition at line 99 of file qdeclarativetextedit_p_p.h.

◆ style

QString QDeclarativeTextEditPrivate::style

Definition at line 103 of file qdeclarativetextedit_p_p.h.

◆ styleColor

QColor QDeclarativeTextEditPrivate::styleColor

Definition at line 104 of file qdeclarativetextedit_p_p.h.

◆ text

QString QDeclarativeTextEditPrivate::text

Definition at line 97 of file qdeclarativetextedit_p_p.h.

◆ textMargin

qreal QDeclarativeTextEditPrivate::textMargin

Definition at line 120 of file qdeclarativetextedit_p_p.h.

◆ vAlign

QDeclarativeTextEdit::VAlignment QDeclarativeTextEditPrivate::vAlign

Definition at line 108 of file qdeclarativetextedit_p_p.h.

◆ wrapMode

QDeclarativeTextEdit::WrapMode QDeclarativeTextEditPrivate::wrapMode

Definition at line 128 of file qdeclarativetextedit_p_p.h.

◆ yoff

int QDeclarativeTextEditPrivate::yoff

Definition at line 133 of file qdeclarativetextedit_p_p.h.


The documentation for this class was generated from the following files: