File indexing completed on 2025-01-05 04:49:28
0001 /* 0002 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <MessageComposer/PluginEditorInterface> 0010 #include <QHash> 0011 class ShortUrlEngineInterface; 0012 class InsertShorturlPluginEditorInterface : public MessageComposer::PluginEditorInterface 0013 { 0014 Q_OBJECT 0015 public: 0016 explicit InsertShorturlPluginEditorInterface(QObject *parent = nullptr); 0017 ~InsertShorturlPluginEditorInterface() override; 0018 0019 void createAction(KActionCollection *ac) override; 0020 void exec() override; 0021 0022 void loadEngine(); 0023 0024 private: 0025 void initializePlugins(); 0026 void slotActivated(); 0027 void slotShortUrlFailed(const QString &errMsg); 0028 QHash<QString, ShortUrlEngineInterface *> mLstInterface; 0029 ShortUrlEngineInterface *mCurrentEngine = nullptr; 0030 };