KTextEditor

katescriptaction.h
1 /*
2  SPDX-FileCopyrightText: 2010-2018 Dominik Haumann <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef KATE_SCRIPT_ACTION_H
8 #define KATE_SCRIPT_ACTION_H
9 
10 #include "katecommandlinescript.h"
11 
12 #include <KActionMenu>
13 
14 #include <QAction>
15 
16 namespace KTextEditor
17 {
18 class ViewPrivate;
19 }
20 
25 class KateScriptAction : public QAction
26 {
27  Q_OBJECT
28 
29 public:
30  KateScriptAction(const QString &cmd, const QJsonObject &action, KTextEditor::ViewPrivate *view);
31  virtual ~KateScriptAction();
32 
33 public Q_SLOTS:
34  void exec();
35 
36 private:
37  KTextEditor::ViewPrivate *m_view;
38  QString m_command;
39  bool m_interactive;
40 };
41 
48 {
49  Q_OBJECT
50 
51 public:
52  KateScriptActionMenu(KTextEditor::ViewPrivate *view, const QString &text);
54 
55  void cleanup();
56 
57 public Q_SLOTS:
58  void repopulate();
59 
60 private:
61  KTextEditor::ViewPrivate *m_view;
62  QList<QMenu *> m_menus;
63  QList<QAction *> m_actions;
64 };
65 
66 #endif
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition: katetextblock.h:21
Tools > Scripts menu This menu is filled with the command line scripts exported via the scripting sup...
KateScriptAction is an action that executes a commandline-script if triggered.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 26 2021 22:57:32 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.