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

Method question

pj_widgets/src/MessageBox.cpp:331–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331int MessageBox::question(
332 QWidget* parent, const QString& title, const QString& text, std::initializer_list<ButtonSpec> buttons,
333 bool* dont_show_again) {
334 MessageBox dlg(parent);
335 dlg.setTitle(title);
336 dlg.setText(text);
337 if (dont_show_again != nullptr) {
338 dlg.setShowDontShowAgain(true);
339 }
340 for (const auto& spec : buttons) {
341 dlg.addButton(spec.label, spec.role);
342 }
343 dlg.exec();
344 if (dont_show_again != nullptr) {
345 *dont_show_again = dlg.dontShowAgainChecked();
346 }
347 return dlg.clickedIndex();
348}
349
350} // namespace PJ

Callers

nothing calls this directly

Calls 6

setShowDontShowAgainMethod · 0.80
addButtonMethod · 0.80
dontShowAgainCheckedMethod · 0.80
clickedIndexMethod · 0.80
setTitleMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected