MCPcopy Create free account
hub / github.com/AntiMicroX/antimicrox / generateLabel

Method generateLabel

src/joysensorbuttonpushbutton.cpp:77–97  ·  view source on GitHub ↗

* @brief Generate the string that will be displayed on the button * @return Display string */

Source from the content-addressed store, hash-verified

75 * @return Display string
76 */
77QString JoySensorButtonPushButton::generateLabel()
78{
79 QString temp = QString();
80 if (m_button != nullptr)
81 {
82 if (!m_button->getActionName().isEmpty() && ifDisplayNames())
83 {
84 qDebug() << "Action name was not empty";
85 temp = m_button->getActionName().replace("&", "&&");
86
87 } else
88 {
89 qDebug() << "Action name was empty";
90 temp = m_button->getCalculatedActiveZoneSummary().replace("&", "&&");
91 }
92 }
93
94 qDebug() << "Here is name of action for pushed sensor button: " << temp;
95
96 return temp;
97}
98
99/**
100 * @brief Shows sensor context menu

Callers

nothing calls this directly

Calls 3

isEmptyMethod · 0.80
getActionNameMethod · 0.80

Tested by

no test coverage detected