MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / TypeName

Method TypeName

Src/Plugin.cpp:36–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36const QString CPlugin::TypeName(const TYPE t) const
37{
38 if(t >= TYPE::Custom) {
39 qWarning(log) << "Please override `const QString CPlugin::TypeName(const TYPE t) const` with "
40 + QString(metaObject()->className()) + "::TypeName(const Type t)" ;
41 return tr("Custom");
42 }
43 switch(t)
44 {
45 case TYPE::Client:
46 return tr("Client");
47 case TYPE::Service:
48 return tr("Service");
49 case TYPE::RemoteDesktop:
50 return tr("Remote Desktop");
51 case TYPE::Terminal:
52 return tr("Terminal");
53 case TYPE::Tools:
54 return tr("Tools");
55 case TYPE::FileTransfers:
56 return tr("File Transfer");
57 case TYPE::NetworkTools:
58 return tr("Network Tools");
59 case TYPE::Custom:
60 qWarning(log) << "Please override `const QString CPlugin::TypeName(const TYPE t) const` with "
61 + QString(metaObject()->className()) + "::TypeName(const Type t)" ;
62 return tr("Custom");
63 default:
64 qCritical(log) << "Don't support type:" << (int)t;
65 QMetaEnum me = QMetaEnum::fromType<CPlugin::TYPE>();
66 return me.valueToKey((quint64)t);
67 }
68 return QString();
69}
70
71const QString CPlugin::Id() const
72{

Callers 5

onProcessMethod · 0.80
onProcessMethod · 0.80
AppendPluginMethod · 0.80
GetTypeNameMethod · 0.80
AddItemMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected