summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext/textedit/textedit.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2019-05-04 08:48:41 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2019-05-06 19:24:32 +0000
commitb922c97c9c65ce28f4ea18106f384adf1bbf605a (patch)
treeefbb443d1098d1bbe191097e6ea78173c262b365 /examples/widgets/richtext/textedit/textedit.h
parent5146582b8d0bb0cde518d57c379e5b97047c6c27 (diff)
TextEdit example: add indent/unindent feature
It was not possible to interactively create the example text without this feature; and in general it's necessary to work with nested lists. But currently it does not deal with all possible changes of list nesting, because the API seems incomplete for that purpose. Task-number: QTBUG-75589 Change-Id: I3e29ca15a2e7c37300a0103ceb90670716472ffb Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'examples/widgets/richtext/textedit/textedit.h')
-rw-r--r--examples/widgets/richtext/textedit/textedit.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/widgets/richtext/textedit/textedit.h b/examples/widgets/richtext/textedit/textedit.h
index c253548a4f..9e50166c6f 100644
--- a/examples/widgets/richtext/textedit/textedit.h
+++ b/examples/widgets/richtext/textedit/textedit.h
@@ -97,6 +97,8 @@ private slots:
void textColor();
void textAlign(QAction *a);
void setChecked(bool checked);
+ void indent();
+ void unindent();
void currentCharFormatChanged(const QTextCharFormat &format);
void cursorPositionChanged();
@@ -111,6 +113,7 @@ private:
void setupTextActions();
bool maybeSave();
void setCurrentFileName(const QString &fileName);
+ void modifyIndentation(int amount);
void mergeFormatOnWordOrSelection(const QTextCharFormat &format);
void fontChanged(const QFont &f);
@@ -126,6 +129,8 @@ private:
QAction *actionAlignCenter;
QAction *actionAlignRight;
QAction *actionAlignJustify;
+ QAction *actionIndentLess;
+ QAction *actionIndentMore;
QAction *actionToggleCheckState;
QAction *actionUndo;
QAction *actionRedo;