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

Method populateTransforms

pj_plotting/widget/src/FilterEditorPanel.cpp:248–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void FilterEditorPanel::populateTransforms() {
249 ui_->transform_list->clear();
250 auto* none_item = new QListWidgetItem(tr("-- No Transform --"), ui_->transform_list);
251 none_item->setData(Qt::UserRole, QString("none"));
252
253 for (const auto& [id, label] : session_->dataProcessorService().availableFilters()) {
254 if (id == "none") {
255 continue;
256 }
257 auto* item = new QListWidgetItem(QString::fromStdString(label), ui_->transform_list);
258 item->setData(Qt::UserRole, QString::fromStdString(id));
259 }
260
261 // (The freeform "Lua Function" custom-function entry returns once it ships as a
262 // Luau filter class — until then it would be an inert, empty-form selection.)
263
264 // Default to "-- No Transform --" (row 0): a freshly-opened source shows its
265 // original signal, not a filter the user didn't ask for.
266 ui_->transform_list->setCurrentRow(0);
267}
268
269std::string FilterEditorPanel::currentFilterId() const {
270 const QListWidgetItem* item = ui_->transform_list->currentItem();

Callers

nothing calls this directly

Calls 5

trFunction · 0.85
availableFiltersMethod · 0.80
QStringClass · 0.50
clearMethod · 0.45
setDataMethod · 0.45

Tested by

no test coverage detected