KTextEditor

katehighlightingcmds.h
1 /*
2  SPDX-FileCopyrightText: 2014 Christoph Rüßler <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef KATE_HIGHLIGHTING_CMDS_H
8 #define KATE_HIGHLIGHTING_CMDS_H
9 
10 #include <KTextEditor/Command>
11 
12 namespace KateCommands
13 {
14 class Highlighting : public KTextEditor::Command
15 {
16  Highlighting()
17  : KTextEditor::Command({QStringLiteral("reload-highlighting"), QStringLiteral("edit-highlighting")})
18  {
19  }
20 
21  static Highlighting *m_instance;
22 
23 public:
24  ~Highlighting() override
25  {
26  m_instance = nullptr;
27  }
28 
29  static Highlighting *self()
30  {
31  if (m_instance == nullptr) {
32  m_instance = new Highlighting();
33  }
34  return m_instance;
35  }
36 
44  bool exec(class KTextEditor::View *view, const QString &cmd, QString &errorMsg, const KTextEditor::Range &range = KTextEditor::Range::invalid()) override;
45 
47  bool help(class KTextEditor::View *, const QString &, QString &) override;
48 };
49 
50 }
51 
52 #endif
An object representing a section of text, from one Cursor to another.
An Editor command line command.
static constexpr Range invalid() Q_DECL_NOEXCEPT
Returns an invalid range.
The KateCommands namespace collects subclasses of KTextEditor::Command for specific use in kate...
A text widget with KXMLGUIClient that represents a Document.
Definition: view.h:143
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Oct 28 2020 23:02:31 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.