equal
deleted
inserted
replaced
130 BlockInserted = 4, |
130 BlockInserted = 4, |
131 BlockRemoved = 5, |
131 BlockRemoved = 5, |
132 BlockAdded = 6, |
132 BlockAdded = 6, |
133 BlockDeleted = 7, |
133 BlockDeleted = 7, |
134 GroupFormatChange = 8, |
134 GroupFormatChange = 8, |
|
135 CursorMoved = 9, |
135 Custom = 256 |
136 Custom = 256 |
136 }; |
137 }; |
137 enum Operation { |
138 enum Operation { |
138 KeepCursor = 0, |
139 KeepCursor = 0, |
139 MoveCursor = 1 |
140 MoveCursor = 1 |
274 |
275 |
275 public: |
276 public: |
276 void documentChange(int from, int length); |
277 void documentChange(int from, int length); |
277 |
278 |
278 inline void addCursor(QTextCursorPrivate *c) { cursors.append(c); } |
279 inline void addCursor(QTextCursorPrivate *c) { cursors.append(c); } |
279 inline void removeCursor(QTextCursorPrivate *c) { cursors.removeAll(c); changedCursors.removeAll(c); } |
280 inline void removeCursor(QTextCursorPrivate *c) { cursors.removeAll(c); } |
280 |
281 |
281 QTextFrame *frameAt(int pos) const; |
282 QTextFrame *frameAt(int pos) const; |
282 QTextFrame *rootFrame() const; |
283 QTextFrame *rootFrame() const; |
283 |
284 |
284 QTextObject *objectForIndex(int objectIndex) const; |
285 QTextObject *objectForIndex(int objectIndex) const; |
313 // position in undo stack of the last setModified(false) call |
314 // position in undo stack of the last setModified(false) call |
314 int modifiedState; |
315 int modifiedState; |
315 bool modified; |
316 bool modified; |
316 |
317 |
317 int editBlock; |
318 int editBlock; |
|
319 int editBlockCursorPosition; |
318 int docChangeFrom; |
320 int docChangeFrom; |
319 int docChangeOldLength; |
321 int docChangeOldLength; |
320 int docChangeLength; |
322 int docChangeLength; |
321 bool framesDirty; |
323 bool framesDirty; |
322 |
324 |
325 QAbstractTextDocumentLayout *lout; |
327 QAbstractTextDocumentLayout *lout; |
326 FragmentMap fragments; |
328 FragmentMap fragments; |
327 BlockMap blocks; |
329 BlockMap blocks; |
328 int initialBlockCharFormatIndex; |
330 int initialBlockCharFormatIndex; |
329 |
331 |
330 QList<QTextCursorPrivate*> cursors; |
332 QList<QTextCursorPrivate *> cursors; |
331 QList<QTextCursorPrivate*> changedCursors; |
|
332 QMap<int, QTextObject *> objects; |
333 QMap<int, QTextObject *> objects; |
333 QMap<QUrl, QVariant> resources; |
334 QMap<QUrl, QVariant> resources; |
334 QMap<QUrl, QVariant> cachedResources; |
335 QMap<QUrl, QVariant> cachedResources; |
335 QString defaultStyleSheet; |
336 QString defaultStyleSheet; |
336 |
337 |
342 QCss::StyleSheet parsedDefaultStyleSheet; |
343 QCss::StyleSheet parsedDefaultStyleSheet; |
343 #endif |
344 #endif |
344 int maximumBlockCount; |
345 int maximumBlockCount; |
345 uint needsEnsureMaximumBlockCount : 1; |
346 uint needsEnsureMaximumBlockCount : 1; |
346 uint inContentsChange : 1; |
347 uint inContentsChange : 1; |
|
348 uint blockCursorAdjustment : 1; |
347 QSizeF pageSize; |
349 QSizeF pageSize; |
348 QString title; |
350 QString title; |
349 QString url; |
351 QString url; |
350 qreal indentWidth; |
352 qreal indentWidth; |
351 qreal documentMargin; |
353 qreal documentMargin; |