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

Method Description

Plugins/SerialPort/OperateSerialPort.cpp:133–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133const QString COperateSerialPort::Description()
134{
135 QString szDescription;
136 if(!Name().isEmpty())
137 szDescription = tr("Name: ") + Name() + "\n";
138
139 if(!GetTypeName().isEmpty())
140 szDescription += tr("Type: ") + GetTypeName() + "\n";
141
142 if(!Protocol().isEmpty()) {
143 szDescription += tr("Protocol: ") + Protocol();
144#ifdef DEBUG
145 if(!GetPlugin()->DisplayName().isEmpty())
146 szDescription += " - " + GetPlugin()->DisplayName();
147#endif
148 szDescription += "\n";
149 }
150
151 if(!m_Parameter.GetSerialPortName().isEmpty())
152 szDescription += tr("Serial port: ") + m_Parameter.GetSerialPortName() + "\n";
153
154 CSecurityLevel sl(GetSecurityLevel());
155 if(GetSecurityLevel() != CSecurityLevel::Level::No) {
156 szDescription += tr("Security level: ");
157 if(!sl.GetUnicodeIcon().isEmpty())
158 szDescription += sl.GetUnicodeIcon() + " ";
159 szDescription += sl.GetString() + "\n";
160 }
161
162 if(!GetPlugin()->Description().isEmpty())
163 szDescription += tr("Description: ") + GetPlugin()->Description();
164
165 return szDescription;
166}

Callers

nothing calls this directly

Calls 6

ProtocolEnum · 0.85
GetSerialPortNameMethod · 0.80
GetUnicodeIconMethod · 0.80
GetStringMethod · 0.80
isEmptyMethod · 0.45
DisplayNameMethod · 0.45

Tested by

no test coverage detected