equal
deleted
inserted
replaced
210 inline bool isUndoRedoEnabled() const { return undoEnabled; } |
210 inline bool isUndoRedoEnabled() const { return undoEnabled; } |
211 |
211 |
212 inline bool isUndoAvailable() const { return undoEnabled && undoState > 0; } |
212 inline bool isUndoAvailable() const { return undoEnabled && undoState > 0; } |
213 inline bool isRedoAvailable() const { return undoEnabled && undoState < undoStack.size(); } |
213 inline bool isRedoAvailable() const { return undoEnabled && undoState < undoStack.size(); } |
214 |
214 |
|
215 inline int availableUndoSteps() const { return undoEnabled ? undoState : 0; } |
|
216 inline int availableRedoSteps() const { return undoEnabled ? qMax(undoStack.size() - undoState - 1, 0) : 0; } |
|
217 |
215 inline QString buffer() const { return text; } |
218 inline QString buffer() const { return text; } |
216 QString plainText() const; |
219 QString plainText() const; |
217 inline int length() const { return fragments.length(); } |
220 inline int length() const { return fragments.length(); } |
218 |
221 |
219 inline QTextFormatCollection *formatCollection() { return &formats; } |
222 inline QTextFormatCollection *formatCollection() { return &formats; } |