MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / catalogKeyForItem

Function catalogKeyForItem

pj_widgets/src/CurveTreeView.cpp:177–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177QString catalogKeyForItem(const QTreeWidgetItem* item) {
178 if (item == nullptr) {
179 return {};
180 }
181 QString key = item->data(kNameColumn, kCatalogItemRole).toString();
182 if (!key.isEmpty()) {
183 return key;
184 }
185 key = item->data(kNameColumn, Qt::UserRole).toString();
186 if (!key.isEmpty()) {
187 return key;
188 }
189 return item->data(kNameColumn, kObjectTopicRole).toString();
190}
191
192void setTopicIconDecoration(QTreeWidgetItem* item, bool is_image_topic, bool is_3d_object_topic, const QString& theme) {
193 if (item == nullptr) {

Callers 3

mousePressEventMethod · 0.85

Calls 3

toStringMethod · 0.80
dataMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected