Rabbit Remote Control 0.1.0-bate10
Loading...
Searching...
No Matches
PluginTemplateQtEvent.cpp
1// Author: Kang Lin <kl222@126.com>
2
3#include <QLoggingCategory>
4#include "OperateTemplateQtEvent.h"
5#include "PluginTemplateQtEvent.h"
6
7static Q_LOGGING_CATEGORY(log, "TemplateQtEvent.Plugin")
10{
11 qDebug(log) << Q_FUNC_INFO;
12}
13
14CPluginTemplateQtEvent::~CPluginTemplateQtEvent()
15{
16 qDebug(log) << Q_FUNC_INFO;
17}
18
19const CPlugin::TYPE CPluginTemplateQtEvent::Type() const
20{
21 // TODO: Modify type. See: CPlugin::TYPE
22 return TYPE::Custom;
23}
24
26{
27 // TODO: Modify protocol
28 return QString();
29}
30
31const QString CPluginTemplateQtEvent::Name() const
32{
33 // TODO: Modify plugin name
34 return "TemplateQtEvent";
35}
36
38{
39 // TODO: Modify description
40 return tr("TemplateQtEvent plugin");
41}
42
44{
45#ifdef TemplateQtEvent_VERSION
46 return TemplateQtEvent_VERSION;
47#else
48 return QString();
49#endif
50}
51
52const QIcon CPluginTemplateQtEvent::Icon() const
53{
54 // TODO: add icon
55 return QIcon();
56}
57
59{
60 // TODO: add details
61 return QString();
62}
63
64COperate *CPluginTemplateQtEvent::OnCreateOperate(const QString &szId)
65{
66 if(szId != Id()) {
67 qCritical(log) << "Invalid ID:" << szId;
68 return nullptr;
69 }
70 return new COperateTemplateQtEvent(this);
71}
The operate is not block.
Operate interface.
Definition Operate.h:51
The plugin has a background thread, and all backend of the operations run on this background thread.
The plugin has a background thread, and all backend of the operations run on this background thread.
virtual const QString Details() const override
Display more information in About dialog or log.
virtual const QString Description() const override
Plugin description.
virtual const QString Name() const override
This name must be the same as the project name (${PROJECT_NAME}). The translation file (${PROJECT_NAM...
virtual const QString Protocol() const override
Plugin Protocol.
virtual const QString Version() const override
Version.
virtual const QString Id() const
ID. Default: Type() + ":" + Protocol() + ":" + Name()
Definition Plugin.cpp:71