ukui-search/libsearch/plugininterface/search-plugin-iface.h

41 lines
997 B
C
Raw Normal View History

#ifndef SEARCHPLUGINIFACE_H
#define SEARCHPLUGINIFACE_H
#define SearchPluginIface_iid "org.ukui.ukui-search.plugin-iface.SearchPluginInterface"
#include <QString>
#include <QIcon>
#include <QMap>
#include "plugin-iface.h"
namespace Zeeker {
class SearchPluginIface : public PluginInterface
{
public:
struct DescriptionInfo
{
QString key;
QString value;
};
2021-05-03 00:21:36 +08:00
/**
* @brief The ResultInfo struct
2021-05-03 00:21:36 +08:00
*/
struct ResultInfo
{
QIcon icon;
QString name;
QVector<DescriptionInfo> description;
2021-05-19 14:29:26 +08:00
QStringList actionList; //all actions, take fist for double click action.
QString key;
};
2021-05-03 00:21:36 +08:00
virtual ~SearchPluginIface() {}
virtual QString getPluginName() = 0;
virtual void KeywordSearch(QString keyword,QQueue<ResultInfo> *searchResult) = 0;
2021-05-19 14:29:26 +08:00
virtual void openAction(QString action, QString key) = 0;
};
}
2021-05-06 20:23:36 +08:00
2021-05-03 00:21:36 +08:00
Q_DECLARE_INTERFACE(Zeeker::SearchPluginIface, SearchPluginIface_iid)
#endif // SEARCHPLUGINIFACE_H