| 1235 | } |
| 1236 | |
| 1237 | double PlotWidget::displayOffsetSeconds() const { |
| 1238 | if (session_ == nullptr) { |
| 1239 | return 0.0; |
| 1240 | } |
| 1241 | // The axis is shared across curves; in the common case they share a dataset |
| 1242 | // (hence one offset). When they don't, the first datastore-backed curve's |
| 1243 | // dataset is the representative — the same rule must hold at save and load so |
| 1244 | // the absolute<->display round-trip is stable. |
| 1245 | for (const CurveInfo& info : curveList()) { |
| 1246 | if (info.curve == nullptr) { |
| 1247 | continue; |
| 1248 | } |
| 1249 | if (const auto* adapter = dynamic_cast<const DatastoreCurveAdapter*>(info.curve->data())) { |
| 1250 | const DisplayOffset offset = session_->displayOffset(adapter->source().dataset_id); |
| 1251 | return std::chrono::duration<double>(offset.value).count(); |
| 1252 | } |
| 1253 | } |
| 1254 | return 0.0; |
| 1255 | } |
| 1256 | |
| 1257 | QStringList PlotWidget::decodeCurveDrop(const QMimeData* mime_data, const QString& format) const { |
| 1258 | QStringList curves; |
nothing calls this directly
no test coverage detected