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

Method Name

Src/OperateDesktop.cpp:86–113  ·  view source on GitHub ↗

[The name of the desktop operate]

Source from the content-addressed store, hash-verified

84
85//! [The name of the desktop operate]
86const QString COperateDesktop::Name()
87{
88 QString szName;
89 // Show the name of parameter
90 if(GetParameter() && !(GetParameter()->GetName().isEmpty()))
91 szName += GetParameter()->GetName();
92 else {
93 // Show the prefix of protocol
94 if(GetParameter() && GetParameter()->GetPluginParameters()
95 && (GetParameter()->GetPluginParameters()->GetNameStyles()
96 & CParameterPlugin::NameStyle::Protocol)
97 && !Protocol().isEmpty())
98 szName = Protocol() + ": ";
99 // Show the server name
100 szName += ServerName();
101 }
102
103 // Show the prefix of security level
104 QString szSecurityLevel;
105 CSecurityLevel sl(GetSecurityLevel());
106 if((GetParameter()->GetPluginParameters()->GetNameStyles()
107 & CParameterPlugin::NameStyle::SecurityLevel)
108 && !(GetSecurityLevel() & CSecurityLevel::Level::No)
109 && !sl.GetUnicodeIcon().isEmpty())
110 szSecurityLevel = sl.GetUnicodeIcon().left(2);
111
112 return szSecurityLevel + szName;
113}
114//! [The name of the desktop operate]
115
116//! [The description of the desktop operate]

Callers

nothing calls this directly

Calls 6

ProtocolEnum · 0.85
GetPluginParametersMethod · 0.80
GetNameStylesMethod · 0.80
GetUnicodeIconMethod · 0.80
isEmptyMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected