KTextEditor
katescriptaction.cpp
26KateScriptAction::KateScriptAction(const QString &cmd, const QJsonObject &action, KTextEditor::ViewPrivate *view)
27 : QAction(i18nc("Script command name", action.value(QStringLiteral("name")).toString().toUtf8().data()), view)
63 connect(KTextEditor::EditorPrivate::self()->scriptManager(), &KateScriptManager::reloaded, this, &KateScriptActionMenu::repopulate);
115 m_view->actionCollection()->addAction(QLatin1String("tools_scripts_") + category, m->menuAction());
125 m_view->actionCollection()->setDefaultShortcut(a, QKeySequence(shortcut, QKeySequence::PortableText));
Q_INVOKABLE QAction * action(const QString &name) const
QAction * addAction(const QString &name, const QObject *receiver=nullptr, const char *member=nullptr)
static void setDefaultShortcut(QAction *action, const QKeySequence &shortcut)
virtual bool exec(KTextEditor::View *view, const QString &cmd, QString &msg, const KTextEditor::Range &range=KTextEditor::Range::invalid())=0
Execute the command for the given view and cmd string.
virtual KActionCollection * actionCollection() const
KXMLGUIFactory * factory() const
void removeClient(KXMLGUIClient *client)
void addClient(KXMLGUIClient *client)
A specialized class for scripts that are of type ScriptType::Indentation.
Definition katecommandlinescript.h:55
KateScriptAction is an action that executes a commandline-script if triggered.
Definition katescriptaction.h:26
void reloaded()
this signal is emitted when all scripts are deleted and reloaded again.
const QList< KateCommandLineScript * > & commandLineScripts()
Get all scripts available in the command line.
Definition katescriptmanager.h:37
QString i18nc(const char *context, const char *text, const TYPE &arg...)
char * toString(const EngineQuery &query)
Category category(StandardShortcut id)
QAction(QObject *parent)
shortcut
void triggered(bool checked)
iterator insert(const Key &key, const T &value)
QJsonValue value(QLatin1StringView key) const const
QString toString() const const
PortableText
void append(QList< T > &&value)
void clear()
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool isEmpty() const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
InstantPopup
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.