| 62 | } |
| 63 | |
| 64 | bool add1DChromLayers(const std::vector<int>& indices, |
| 65 | Plot1DWidget* target, |
| 66 | const LayerDataDefs::ExperimentSharedPtrType& chrom_exp_sptr, |
| 67 | const LayerDataDefs::ODExperimentSharedPtrType& ondisc_sptr, |
| 68 | const OSWDataSharedPtrType& chrom_annotation, |
| 69 | const String& layer_basename, |
| 70 | const String& filename) |
| 71 | { |
| 72 | // |
| 73 | for (const auto& index : indices) |
| 74 | { |
| 75 | // get caption (either chromatogram idx or peptide sequence, if available) |
| 76 | String basename_suffix; |
| 77 | if (chrom_exp_sptr->metaValueExists("peptide_sequence")) |
| 78 | { |
| 79 | basename_suffix = String(chrom_exp_sptr->getMetaValue("peptide_sequence")); |
| 80 | } |
| 81 | ((basename_suffix += "[") += index) += "]"; |
| 82 | |
| 83 | // add chromatogram data |
| 84 | if (!target->canvas()->addChromLayer(chrom_exp_sptr, ondisc_sptr, chrom_annotation, index, filename, layer_basename, basename_suffix)) |
| 85 | { |
| 86 | return false; |
| 87 | } |
| 88 | } |
| 89 | return true; |
| 90 | } |
| 91 | |
| 92 | void TVSpectraViewController::showChromatogramsAsNew1D(const std::vector<int>& indices) |
| 93 | { |
no test coverage detected