37class EmulatedCommandBar :
public KateViewBarWidget
46 explicit EmulatedCommandBar(KateViInputMode *viInputMode, InputModeManager *viInputModeManager,
QWidget *
parent =
nullptr);
47 ~EmulatedCommandBar()
override;
49 bool isActive()
const;
50 KTEXTEDITOR_EXPORT
void setCommandResponseMessageTimeout(
long commandResponseMessageTimeOutMS);
51 bool handleKeyPress(
const QKeyEvent *keyEvent);
52 bool isSendingSyntheticSearchCompletedKeypress();
54 void startInteractiveSearchAndReplace(std::shared_ptr<SedReplace::InteractiveSedReplacer> interactiveSedReplace);
55 KTEXTEDITOR_EXPORT
QString executeCommand(
const QString &commandToExecute);
57 void setViInputModeManager(InputModeManager *viInputModeManager);
60 KateViInputMode *m_viInputMode;
61 InputModeManager *m_viInputModeManager;
62 bool m_isActive =
false;
63 bool m_wasAborted =
true;
65 KTextEditor::ViewPrivate *m_view =
nullptr;
68 QLabel *m_barTypeIndicator =
nullptr;
69 void showBarTypeIndicator(Mode mode);
71 bool m_suspendEditEventFiltering =
false;
73 bool m_waitingForRegister =
false;
74 QLabel *m_waitingForRegisterIndicator;
75 bool m_insertedTextShouldBeEscapedForSearchingAsLiteral =
false;
77 void hideAllWidgetsExcept(
QWidget *widgetToKeepVisible);
79 friend class ActiveMode;
80 std::unique_ptr<MatchHighlighter> m_matchHighligher;
82 std::unique_ptr<Completer> m_completer;
84 std::unique_ptr<InteractiveSedReplaceMode> m_interactiveSedReplaceMode;
85 std::unique_ptr<SearchMode> m_searchMode;
86 std::unique_ptr<CommandMode> m_commandMode;
88 void switchToMode(ActiveMode *newMode);
89 ActiveMode *m_currentMode =
nullptr;
91 bool barHandledKeypress(
const QKeyEvent *keyEvent);
92 void insertRegisterContents(
const QKeyEvent *keyEvent);
94 void deleteSpacesToLeftOfCursor();
95 void deleteWordCharsToLeftOfCursor();
96 bool deleteNonWordCharsToLeftOfCursor();
98 void closed()
override;
99 void closeWithStatusMessage(
const QString &exitStatusMessage);
100 QTimer *m_exitStatusMessageDisplayHideTimer;
101 QLabel *m_exitStatusMessageDisplay;
102 long m_exitStatusMessageHideTimeOutMS = 4000;
107 void createAndInitExitStatusMessageDisplayTimer();
108 void createAndAddWaitingForRegisterIndicator(
QLayout *
layout);
111 void editTextChanged(
const QString &newText);
112 void startHideExitStatusMessageTimer();
An Editor command line command.
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...