Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
PluginPlayer.cpp
1// Author: Kang Lin <kl222@126.com>
2
3#include "PluginPlayer.h"
4#include "ConnecterPlayer.h"
5
6CPluginPlayer::CPluginPlayer(QObject *parent)
7 : CPluginClient{parent}
8{}
9
10const QString CPluginPlayer::Protocol() const
11{
12 return "Tool";
13}
14
15const QString CPluginPlayer::Name() const
16{
17 return "Player";
18}
19
20const QString CPluginPlayer::DisplayName() const
21{
22 return tr("Player");
23}
24
25const QString CPluginPlayer::Description() const
26{
27 QString szText = tr("Player: play media files or camera.");
28 #ifdef HAVE_QT6_RECORD
29 szText += tr(" Record camera or media stream.");
30 #endif
31 return szText;
32}
33
34const QString CPluginPlayer::Version() const
35{
36 return PLayer_VERSION;
37}
38
40{
41 CConnecter* p = nullptr;
42 if(this->Id() == szId)
43 p = new CConnecterPlayer(this);
44 return p;
45}
46
47const QIcon CPluginPlayer::Icon() const
48{
49 return QIcon::fromTheme("multimedia-player");
50}
51
52const QString CPluginPlayer::Details() const
53{
54 QString szDetails;
55 szDetails = "- " + tr("Qt version:") + "\n";
56 szDetails += " - " + tr("Compile version: ") + QT_VERSION_STR + "\n";
57 szDetails += " - " + tr("Runtime version: ") + qVersion() + "\n";
58#ifdef HAVE_QVideoWidget
59 szDetails += "- " + tr("Use QVideoWidget");
60#endif
61 return szDetails;
62}
Connecter interface.
Definition Connecter.h:62
The plugin interface.
virtual const QString Id() const
ID. Default: Protocol() + ":" + Name()
virtual CConnecter * CreateConnecter(const QString &szId) override
New CConnecter instance.
virtual const QString Description() const override
Plugin description.
virtual const QString Details() const override
Display more information in About dialog or log.
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 DisplayName() const override
The plugin display name.
virtual const QString Protocol() const override
Plugin Protocol.
virtual const QString Version() const override
Version.