MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / pluginDisplayName

Method pluginDisplayName

app/src/IO/Drivers/CANBus.cpp:494–521  ·  view source on GitHub ↗

* @brief Converts a Qt CAN plugin name to a user-friendly display name. */

Source from the content-addressed store, hash-verified

492 * @brief Converts a Qt CAN plugin name to a user-friendly display name.
493 */
494QString IO::Drivers::CANBus::pluginDisplayName(const QString& plugin) const
495{
496 if (const auto* backend = IO::Drivers::CanBackends::find(plugin))
497 return backend->displayName;
498
499 if (plugin == "socketcan")
500 return "SocketCAN";
501
502 if (plugin == "peakcan")
503 return "PEAK CAN";
504
505 if (plugin == "passthroughcan" || plugin == "passthrucan")
506 return "PassThru CAN";
507
508 if (plugin == "virtualcan")
509 return "Virtual CAN";
510
511 if (plugin == "systeccan")
512 return "SysTec CAN";
513
514 if (plugin == "tinycan")
515 return "Tiny CAN";
516
517 if (plugin == "vectorcan")
518 return "Vector CAN";
519
520 return plugin;
521}
522
523//--------------------------------------------------------------------------------------------------
524// Property setters

Callers 1

getPluginListMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected