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

Function execFieldDialog

pj_app/src/ui/Scene3DConfigPanel.cpp:108–117  ·  view source on GitHub ↗

Small modal prompt on the shared Dialog chrome: a single field + OK/Cancel. The field is parented into the dialog; values must be read before `dialog` leaves scope, which is why each picker below returns the value, not a bool.

Source from the content-addressed store, hash-verified

106// The field is parented into the dialog; values must be read before `dialog`
107// leaves scope, which is why each picker below returns the value, not a bool.
108bool execFieldDialog(Dialog& dialog, const QString& title, QWidget* field) {
109 dialog.setDialogTitle(title);
110 auto* layout = new QVBoxLayout(dialog.contentWidget());
111 layout->addWidget(field);
112 auto* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, dialog.contentWidget());
113 layout->addWidget(buttons);
114 QObject::connect(buttons, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
115 QObject::connect(buttons, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
116 return dialog.exec() == QDialog::Accepted;
117}
118
119// Topic mode: pick one of the dataset's robot_description topics.
120std::optional<std::pair<ObjectTopicId, QString>> pickRobotDescriptionTopic(

Callers 2

promptUrdfUrlFunction · 0.85

Calls 2

setDialogTitleMethod · 0.80
contentWidgetMethod · 0.80

Tested by

no test coverage detected