MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / openFile

Method openFile

app/src/MDF4/Player.cpp:396–414  ·  view source on GitHub ↗

* @brief Opens a file selection dialog for MDF4 files */

Source from the content-addressed store, hash-verified

394 * @brief Opens a file selection dialog for MDF4 files
395 */
396void MDF4::Player::openFile()
397{
398 auto* dialog = new QFileDialog(qApp->activeWindow(),
399 tr("Select MDF4 file"),
400 Misc::WorkspaceManager::instance().path("MDF4"),
401 tr("MDF4 files (*.mf4 *.dat)"));
402
403 dialog->setFileMode(QFileDialog::ExistingFile);
404 dialog->setAttribute(Qt::WA_DeleteOnClose);
405
406 connect(dialog, &QFileDialog::fileSelected, this, [this](const QString& path) {
407 if (path.isEmpty())
408 return;
409
410 QMetaObject::invokeMethod(this, [this, path]() { openFile(path); }, Qt::QueuedConnection);
411 });
412
413 dialog->open();
414}
415
416/**
417 * @brief Opens an MDF4 file from the specified path

Callers

nothing calls this directly

Calls 11

isEmptyMethod · 0.80
disconnectDeviceMethod · 0.80
emptyMethod · 0.80
activeWindowMethod · 0.45
pathMethod · 0.45
openMethod · 0.45
isConnectedMethod · 0.45
IsOkMethod · 0.45
ReadEverythingButDataMethod · 0.45
GetHeaderMethod · 0.45
AuthorMethod · 0.45

Tested by

no test coverage detected