[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [ktexteditor] src/vimode: Create new CommandMode - all of the Command-mode type stuff with ultimatel
From: Simon St James <kdedevel () etotheipiplusone ! com>
Date: 2016-06-17 8:18:09
Message-ID: E1bDoyf-0002ZN-S9 () scm ! kde ! org
[Download RAW message or body]
Git commit 88f5ab5f1cf7479fe5749c9bddf74adb400b69fb by Simon St James.
Committed on 17/06/2016 at 08:14.
Pushed by sstjames into branch 'master'.
Create new CommandMode - all of the Command-mode type stuff with ultimately be moved \
into here.
M +14 -0 src/vimode/emulatedcommandbar.cpp
M +11 -0 src/vimode/emulatedcommandbar.h
http://commits.kde.org/ktexteditor/88f5ab5f1cf7479fe5749c9bddf74adb400b69fb
diff --git a/src/vimode/emulatedcommandbar.cpp b/src/vimode/emulatedcommandbar.cpp
index b0a4427..1ecf91d 100644
--- a/src/vimode/emulatedcommandbar.cpp
+++ b/src/vimode/emulatedcommandbar.cpp
@@ -335,6 +335,8 @@ EmulatedCommandBar::EmulatedCommandBar(InputModeManager \
*viInputModeManager, QWi
m_searchMode.reset(new SearchMode(this, m_matchHighligher.data(), m_view, \
m_edit)); m_searchMode->setViInputModeManager(viInputModeManager);
+ m_commandMode.reset(new CommandMode(this, m_matchHighligher.data()));
+
m_edit->installEventFilter(this);
connect(m_edit, SIGNAL(textChanged(QString)), this, \
SLOT(editTextChanged(QString)));
@@ -1432,6 +1434,18 @@ void EmulatedCommandBar::SearchMode::setBarBackground ( \
EmulatedCommandBar::Sear m_edit->setPalette(barBackground);
}
+EmulatedCommandBar::CommandMode::CommandMode ( EmulatedCommandBar* \
emulatedCommandBar, EmulatedCommandBar::MatchHighlighter* matchHighlighter ) + : \
ActiveMode ( emulatedCommandBar, matchHighlighter ) +{
+
+}
+
+bool EmulatedCommandBar::CommandMode::handleKeyPress ( const QKeyEvent* keyEvent )
+{
+ Q_UNUSED(keyEvent);
+ return false;
+}
+
EmulatedCommandBar::MatchHighlighter::MatchHighlighter ( KTextEditor::ViewPrivate* \
view ) : m_view(view)
{
diff --git a/src/vimode/emulatedcommandbar.h b/src/vimode/emulatedcommandbar.h
index 27b2cf0..20f491a 100644
--- a/src/vimode/emulatedcommandbar.h
+++ b/src/vimode/emulatedcommandbar.h
@@ -173,8 +173,19 @@ private:
void setBarBackground(BarBackgroundStatus status);
bool m_isSendingSyntheticSearchCompletedKeypress = false;
};
+
+ class CommandMode : public ActiveMode
+ {
+ public:
+ CommandMode(EmulatedCommandBar* emulatedCommandBar, MatchHighlighter* \
matchHighlighter); + virtual ~CommandMode()
+ {
+ }
+ virtual bool handleKeyPress ( const QKeyEvent* keyEvent );
+ };
QScopedPointer<InteractiveSedReplaceMode> m_interactiveSedReplaceMode;
QScopedPointer<SearchMode> m_searchMode;
+ QScopedPointer<CommandMode> m_commandMode;
void moveCursorTo(const KTextEditor::Cursor &cursorPos);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic