15 for (QWidget* widget : qApp->topLevelWidgets())
17 if (widget->inherits(
"QMainWindow"))
27 static std::vector<const char*> extensions = {
"ulg" };
34 const auto& filename = fileload_info->
filename;
38 if (!file.open(QIODevice::ReadOnly))
40 throw std::runtime_error(
"ULog: Failed to open file");
42 QByteArray file_array = file.readAll();
47 const auto& timeseries_map =
parser.getTimeseriesMap();
48 auto min_msg_time = std::numeric_limits<double>::max();
49 for (
const auto& it : timeseries_map)
51 const std::string& sucsctiption_name = it.first;
54 for (
const auto&
data : timeseries.
data)
56 std::string series_name = sucsctiption_name +
data.first;
58 auto series = plot_data.
addNumeric(series_name);
60 for (
size_t i = 0; i <
data.second.size(); i++)
62 double msg_time =
static_cast<double>(timeseries.
timestamps[i]) * 0.000001;
63 min_msg_time = std::min(min_msg_time, msg_time);
65 series->second.pushBack(point);
75 double(
param.value.val_int);
76 series->second.pushBack({ min_msg_time, value });
80 dialog->setWindowTitle(QString(
"ULog file %1").
arg(filename));
81 dialog->setAttribute(Qt::WA_DeleteOnClose);