Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
PluginClient.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef CPLUGINCLIENT_H_KL_2021_07_23
4#define CPLUGINCLIENT_H_KL_2021_07_23
5
6#pragma once
7
8#include <QIcon>
9#include "Connecter.h"
10#include <QTranslator>
11
32class CLIENT_EXPORT CPluginClient : public QObject
33{
34 Q_OBJECT
35
36public:
48 explicit CPluginClient(QObject *parent = nullptr);
58 virtual ~CPluginClient();
59
62 virtual const QString Id() const;
65 virtual const QString Protocol() const = 0;
70 virtual const QString Name() const = 0;
73 virtual const QString DisplayName() const;
76 virtual const QString Description() const = 0;
78 virtual const QString Version() const = 0;
79 virtual const QIcon Icon() const;
89 virtual const QString Details() const;
90
91private:
113 Q_INVOKABLE virtual CConnecter* CreateConnecter(const QString& szId) = 0;
114
115private:
116 QSharedPointer<QTranslator> m_Translator;
128 Q_INVOKABLE int InitTranslator();
129};
130
131QT_BEGIN_NAMESPACE
132#define CPluginClient_iid "KangLinStudio.Rabbit.RemoteControl.CPluginClient"
133Q_DECLARE_INTERFACE(CPluginClient, CPluginClient_iid)
134QT_END_NAMESPACE
135
136#endif // CPLUGINCLIENT_H_KL_2021_07_23
Connecter interface.
Definition Connecter.h:62
The plugin interface.
virtual const QString Description() const =0
Plugin description.
virtual const QString Version() const =0
Version.
virtual Q_INVOKABLE CConnecter * CreateConnecter(const QString &szId)=0
New CConnecter instance.
virtual const QString Name() const =0
This name must be the same as the project name (${PROJECT_NAME}). The translation file (${PROJECT_NAM...
virtual const QString Protocol() const =0
Plugin Protocol.
CPluginClient(QObject *parent=nullptr)
When the derived class is implemented, The plugin global resources are initialized are loaded here.