KTextEditor

interactivesedreplacemode.h
1/*
2 SPDX-FileCopyrightText: 2013-2016 Simon St James <kdedevel@etotheipiplusone.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KATEVI_EMULATED_COMMAND_BAR_INTERACTIVESEDREPLACEMODE_H
8#define KATEVI_EMULATED_COMMAND_BAR_INTERACTIVESEDREPLACEMODE_H
9
10#include "activemode.h"
11
12#include "../cmds.h"
13
14class QKeyEvent;
15class QLabel;
16
17namespace KateVi
18{
19class EmulatedCommandBar;
20class MatchHighlighter;
21
22class InteractiveSedReplaceMode : public ActiveMode
23{
24public:
25 InteractiveSedReplaceMode(EmulatedCommandBar *emulatedCommandBar,
26 MatchHighlighter *matchHighlighter,
27 InputModeManager *viInputModeManager,
28 KTextEditor::ViewPrivate *view);
29 ~InteractiveSedReplaceMode() override
30 {
31 }
32 void activate(std::shared_ptr<SedReplace::InteractiveSedReplacer> interactiveSedReplace);
33 bool isActive() const
34 {
35 return m_isActive;
36 }
37 bool handleKeyPress(const QKeyEvent *keyEvent) override;
38 void deactivate(bool wasAborted) override;
39 QWidget *label();
40
41private:
42 void updateInteractiveSedReplaceLabelText();
43 void finishInteractiveSedReplace();
44 std::shared_ptr<SedReplace::InteractiveSedReplacer> m_interactiveSedReplacer;
45 bool m_isActive;
46 QLabel *m_interactiveSedReplaceLabel;
47};
48}
49
50#endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:44 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.