KTextEditor

katescriptaction.h
1/*
2 SPDX-FileCopyrightText: 2010-2018 Dominik Haumann <dhaumann@kde.org>
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
16namespace KTextEditor
17{
18class ViewPrivate;
19}
20
21/**
22 * KateScriptAction is an action that executes a commandline-script
23 * if triggered. It is shown in Tools > Scripts.
24 */
26{
27public:
28 KateScriptAction(const QString &cmd, const QJsonObject &action, KTextEditor::ViewPrivate *view);
29
30public:
31 void exec();
32
33private:
34 KTextEditor::ViewPrivate *m_view;
35 QString m_command;
36 bool m_interactive;
37};
38
39/**
40 * Tools > Scripts menu
41 * This menu is filled with the command line scripts exported
42 * via the scripting support.
43 */
45{
46public:
47 KateScriptActionMenu(KTextEditor::ViewPrivate *view, const QString &text);
48 ~KateScriptActionMenu() override;
49
50 void cleanup();
51
52public:
53 void repopulate();
54
55private:
56 KTextEditor::ViewPrivate *m_view;
57 QList<QMenu *> m_menus;
58 QList<QAction *> m_actions;
59};
60
61#endif
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.
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:53:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.