summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextcontrol_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-11-11 15:59:37 (GMT)
committerEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-11-11 16:02:17 (GMT)
commitfab1ce65da8bacfce92b1df7656780e729d31b74 (patch)
tree5a18285c4a506ba778b018f52f8f8500ee0b4456 /src/gui/text/qtextcontrol_p.h
parent06baf7f173b0331a5192616b8ecf9611130f278b (diff)
downloadQt-fab1ce65da8bacfce92b1df7656780e729d31b74.zip
Qt-fab1ce65da8bacfce92b1df7656780e729d31b74.tar.gz
Qt-fab1ce65da8bacfce92b1df7656780e729d31b74.tar.bz2
Add option to ingore unused navigation events in QTextControl
QFxTextEdit, as well as systems with keypad navigation, needs the text control to ignore navigation events that have no effect (like hitting the right navigation key at the end of the text.) Previously, we would only support this for keypad navigation. This patch introduces a flag that you can set to tell the QTextControl to ignore these events. If the flag is not explicitly set, behavior should remain as before. The if-test has been refactored to make it more readable. Done-with: Alan Alpert Reviewed-by: Samuel
Diffstat (limited to 'src/gui/text/qtextcontrol_p.h')
-rw-r--r--src/gui/text/qtextcontrol_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/text/qtextcontrol_p.h b/src/gui/text/qtextcontrol_p.h
index 263af31..bc8e063 100644
--- a/src/gui/text/qtextcontrol_p.h
+++ b/src/gui/text/qtextcontrol_p.h
@@ -95,6 +95,7 @@ class Q_GUI_EXPORT QTextControl : public QObject
Q_PROPERTY(int cursorWidth READ cursorWidth WRITE setCursorWidth)
Q_PROPERTY(Qt::TextInteractionFlags textInteractionFlags READ textInteractionFlags WRITE setTextInteractionFlags)
Q_PROPERTY(bool openExternalLinks READ openExternalLinks WRITE setOpenExternalLinks)
+ Q_PROPERTY(bool ignoreUnusedNavigationEvents READ ignoreUnusedNavigationEvents WRITE setIgnoreUnusedNavigationEvents)
public:
explicit QTextControl(QObject *parent = 0);
explicit QTextControl(const QString &text, QObject *parent = 0);
@@ -163,6 +164,9 @@ public:
void setOpenExternalLinks(bool open);
bool openExternalLinks() const;
+ void setIgnoreUnusedNavigationEvents(bool ignore);
+ bool ignoreUnusedNavigationEvents() const;
+
void moveCursor(QTextCursor::MoveOperation op, QTextCursor::MoveMode mode = QTextCursor::MoveAnchor);
bool canPaste() const;