Rabbit Remote Control 0.0.33
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
91protected:
113 Q_INVOKABLE virtual CConnecter* CreateConnecter(const QString& szId, CParameterClient* para);
114 virtual CConnecter* OnCreateConnecter(const QString& szId) = 0;
118 Q_INVOKABLE virtual int DeleteConnecter(CConnecter* p);
119
120private:
121 QSharedPointer<QTranslator> m_Translator;
133 Q_INVOKABLE int InitTranslator();
134};
135
136QT_BEGIN_NAMESPACE
137#define CPluginClient_iid "KangLinStudio.Rabbit.RemoteControl.CPluginClient"
138Q_DECLARE_INTERFACE(CPluginClient, CPluginClient_iid)
139QT_END_NAMESPACE
140
141#endif // CPLUGINCLIENT_H_KL_2021_07_23
Connecter interface.
Definition Connecter.h:62
The parameters of client.
The plugin interface.
virtual const QString Description() const =0
Plugin description.
virtual const QString Version() const =0
Version.
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.