summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument.h
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2009-10-26 11:40:33 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2009-11-03 15:00:08 (GMT)
commitd1a1d5df2ec9e34cdbed340685fc8e8dd8e9bece (patch)
tree14cb1d55124951f4c88a2694fb0fb945176c2e38 /src/gui/text/qtextdocument.h
parente8c547f283cdedfeacb056e672020a2dbe4157ff (diff)
downloadQt-d1a1d5df2ec9e34cdbed340685fc8e8dd8e9bece.zip
Qt-d1a1d5df2ec9e34cdbed340685fc8e8dd8e9bece.tar.gz
Qt-d1a1d5df2ec9e34cdbed340685fc8e8dd8e9bece.tar.bz2
introduce int QTextDocument::available{Undo,Redo}Steps() const;
Formerly, QTextDocument::revision() could be used to guesstimate the number of available undo steps that was used in Qt Creator to store cursor positions in parallel to the actual text contents. Now that revision() is strictly increasing, another means is needed, therefore the new functions providing the needed data. Reviewed-by: mae
Diffstat (limited to 'src/gui/text/qtextdocument.h')
-rw-r--r--src/gui/text/qtextdocument.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h
index e52716a..d217a4d 100644
--- a/src/gui/text/qtextdocument.h
+++ b/src/gui/text/qtextdocument.h
@@ -142,6 +142,9 @@ public:
bool isUndoAvailable() const;
bool isRedoAvailable() const;
+ int availableUndoSteps() const;
+ int availableRedoSteps() const;
+
int revision() const;
void setDocumentLayout(QAbstractTextDocumentLayout *layout);