File indexing completed on 2024-12-22 05:14:59
0001 /* 0002 SPDX-FileCopyrightText: 2014-2015 Sebastian Kügler <sebas@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef CUTTLEFISHPLUGIN_H 0008 #define CUTTLEFISHPLUGIN_H 0009 0010 #include <KTextEditor/Document> 0011 #include <KTextEditor/MainWindow> 0012 #include <KTextEditor/Plugin> 0013 #include <KTextEditor/View> 0014 0015 #include <QList> 0016 #include <QMenu> 0017 #include <QProcess> 0018 #include <QVariant> 0019 0020 class CuttleFishPlugin : public KTextEditor::Plugin 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 explicit CuttleFishPlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>()); 0026 ~CuttleFishPlugin() override; 0027 0028 QObject *createView(KTextEditor::MainWindow *mainWindow) override; 0029 0030 private Q_SLOTS: 0031 void contextMenuAboutToShow(KTextEditor::View *view, QMenu *menu); 0032 void documentCreated(KTextEditor::Document *document); 0033 void viewCreated(KTextEditor::Document *document, KTextEditor::View *view); 0034 0035 private: 0036 QList<QMenu *> m_decorated; 0037 }; 0038 0039 #endif // CUTTLEFISHPLUGIN_H