diff options
author | David Schulz <david.schulz@digia.com> | 2014-06-02 14:21:46 +0200 |
---|---|---|
committer | David Schulz <david.schulz@digia.com> | 2014-06-02 15:07:35 +0200 |
commit | 714d56a38108248984955248ef4cbec9b2615ddd (patch) | |
tree | fcd38a6c65fcf542e37a2fa470bef6fa3b942450 /src/plugins/texteditor/texteditoractionhandler.cpp | |
parent | 408150285d487dddd01fcd127c1f4dc06d4052d9 (diff) | |
download | qt-creator-714d56a38108248984955248ef4cbec9b2615ddd.tar.gz |
Editor: Add actions for view page/line up/down.
Task-number: QTCREATORBUG-4994
Change-Id: Ia6ce1a01cd78dd1987404d77f6b0c0da41b4929e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/texteditor/texteditoractionhandler.cpp')
-rw-r--r-- | src/plugins/texteditor/texteditoractionhandler.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index caced6764c..edfe3b5a42 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -87,6 +87,10 @@ TextEditorActionHandler::TextEditorActionHandler(QObject *parent, Core::Id conte m_gotoBlockEndWithSelectionAction(0), m_selectBlockUpAction(0), m_selectBlockDownAction(0), + m_viewPageUpAction(0), + m_viewPageDownAction(0), + m_viewLineUpAction(0), + m_viewLineDownAction(0), m_moveLineUpAction(0), m_moveLineDownAction(0), m_copyLineUpAction(0), @@ -192,6 +196,19 @@ void TextEditorActionHandler::createActions() SLOT(openLinkUnderCursorInNextSplit()), true, QKeySequence(Utils::HostOsInfo::isMacHost() ? tr("Meta+E, F2") : tr("Ctrl+E, F2"))); + m_viewPageUpAction = registerAction(VIEW_PAGE_UP, + SLOT(viewPageUp()), true, tr("Move the View a Page Up and Keep the Cursor Position"), + QKeySequence(tr("Ctrl+PgUp"))); + m_viewPageDownAction = registerAction(VIEW_PAGE_DOWN, + SLOT(viewPageDown()), true, tr("Move the View a Page Down and Keep the Cursor Position"), + QKeySequence(tr("Ctrl+PgDown"))); + m_viewLineUpAction = registerAction(VIEW_LINE_UP, + SLOT(viewLineUp()), true, tr("Move the View a Line Up and Keep the Cursor Position"), + QKeySequence(tr("Ctrl+Up"))); + m_viewLineDownAction = registerAction(VIEW_LINE_DOWN, + SLOT(viewLineDown()), true, tr("Move the View a Line Down and Keep the Cursor Position"), + QKeySequence(tr("Ctrl+Down"))); + // register "Edit" Menu Actions Core::ActionContainer *editMenu = Core::ActionManager::actionContainer(M_EDIT); m_selectEncodingAction = registerAction(SELECT_ENCODING, @@ -513,6 +530,10 @@ FUNCTION(indent) FUNCTION(unindent) FUNCTION(openLinkUnderCursor) FUNCTION(openLinkUnderCursorInNextSplit) +FUNCTION(viewPageUp) +FUNCTION(viewPageDown) +FUNCTION(viewLineUp) +FUNCTION(viewLineDown) FUNCTION(gotoLineStart) FUNCTION(gotoLineStartWithSelection) |