diff --git a/src/gui/protein_view/proteinwindow.cpp b/src/gui/protein_view/proteinwindow.cpp index 782e9aa2666386496cc5ff24c3f3d64c8e885457..0a84f2b3698e59e9e57dd9989ef83831db389253 100644 --- a/src/gui/protein_view/proteinwindow.cpp +++ b/src/gui/protein_view/proteinwindow.cpp @@ -233,7 +233,7 @@ ProteinWindow::doSaveSvg() // https://bugreports.qt.io/browse/QTBUG-52538 QPrinter printer(QPrinter::PrinterResolution); printer.setOutputFormat(QPrinter::PdfFormat); - printer.setPaperSize(QPrinter::A4); + printer.setPageSize(QPageSize(QPageSize::A4)); printer.setOutputFileName(filename); /* QSvgGenerator generator; @@ -279,59 +279,15 @@ ProteinWindow::doSaveSvg() doc->setUndoRedoEnabled(false); // doc->setHtml("<p><span style=\"color:#000000; // font-weight:600\">"+text_x+"</span></p>"); - doc->setTextWidth(printer.pageRect().size().width()); + doc->setTextWidth(QPageSize(QPageSize::A4).sizePoints().width()); doc->setDefaultFont(font); - doc->setPageSize(printer.pageRect().size()); + doc->setPageSize(QPageSize(QPageSize::A4).size(QPageSize::Unit::Point)); + //// height from doc QTextDocument //// /// http://fop-miniscribus.googlecode.com/svn/trunk/fop_miniscribus.1.0.0/src/floating_box/floatdiagram.cpp //////setMaximumHeight(DocumentHighgtActual()); - doc->setPageSize( - printer.pageRect() - .size()); // This is necessary if you want to hide the page number doc->print(&printer); - - /* - QPainter *painter = new QPainter(&generator); - painter->setRenderHint(QPainter::Antialiasing, true); - painter->setFont(font); - doc->drawContents(painter); - painter->end(); - */ - - - /* - QSvgGenerator svg; - svg.setFileName(filename); - QTextDocument *doc = ui->sequenceTextEdit->document()->clone(); - QRect rectSize(0, 0, (int) doc->size().width(), (int) - doc->size().height()); QPainter painter(&svg); - //painter.setViewport(rectSize); - //doc->documentLayout()->setPaintDevice(&svg); - doc->drawContents(&painter); - */ - - /* - QtWebEngine::initialize(); - QWebEnginePage page; - QEventLoop loop; - loop.connect(&page, &QWebEnginePage::loadFinished, [&page, &loop, - &filename]() { page.printToPdf([&loop, &filename] (QByteArray ba) { QFile - f(filename); if (f.open(QIODevice::WriteOnly)) - { - f.write(ba); - f.close(); - } else { - qDebug() << "Error opening file for writing" << filename - << f.errorString(); - } - loop.exit(); - }); - }); - qDebug() << ui->sequenceTextEdit->toHtml(); - page.setHtml(ui->sequenceTextEdit->toHtml()); - loop.exec(); - */ } catch(pappso::PappsoException &error) { diff --git a/src/input/tandem/tandeminfoparser.cpp b/src/input/tandem/tandeminfoparser.cpp index 4ff741896ac60b540c6a72708c154ab8e36cd16f..588d89ee782e2c3d12d7d675af6366c2a43bec2e 100644 --- a/src/input/tandem/tandeminfoparser.cpp +++ b/src/input/tandem/tandeminfoparser.cpp @@ -36,6 +36,9 @@ TandemInfoParser::TandemInfoParser() TandemInfoParser::TandemInfoParser(const TandemInfoParser &other) { + m_spectrum_path = other.m_spectrum_path; + m_modelCount = other.m_modelCount; + m_mzFormat = other.m_mzFormat; } TandemInfoParser::~TandemInfoParser() diff --git a/src/output/mcqr/mcqrdata.cpp b/src/output/mcqr/mcqrdata.cpp index b8eb49dbca3183e511a134be4384798e28287117..bb704ae66953383cabedb266080c77a354f8b397 100644 --- a/src/output/mcqr/mcqrdata.cpp +++ b/src/output/mcqr/mcqrdata.cpp @@ -312,10 +312,10 @@ McqrRdata::writeSpectraCountTable(const QFileInfo &sctable_datafile) rdata_begin_column(mp_rdataWriter, col_msrun, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { - for(const ProteinMatch *protein_match : + for(const ProteinMatch *protein_match [[maybe_unused]] : group_pair.second.get()->getProteinMatchList()) { for(MsRunSp msrun_sp : @@ -333,10 +333,10 @@ McqrRdata::writeSpectraCountTable(const QFileInfo &sctable_datafile) rdata_begin_column(mp_rdataWriter, col_msrunfile, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { - for(const ProteinMatch *protein_match : + for(const ProteinMatch *protein_match [[maybe_unused]] : group_pair.second.get()->getProteinMatchList()) { for(MsRunSp msrun_sp : @@ -354,7 +354,7 @@ McqrRdata::writeSpectraCountTable(const QFileInfo &sctable_datafile) rdata_begin_column(mp_rdataWriter, col_acc, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { for(const ProteinMatch *protein_match : @@ -378,7 +378,7 @@ McqrRdata::writeSpectraCountTable(const QFileInfo &sctable_datafile) rdata_begin_column(mp_rdataWriter, col_desc, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { for(const ProteinMatch *protein_match : @@ -402,7 +402,7 @@ McqrRdata::writeSpectraCountTable(const QFileInfo &sctable_datafile) rdata_begin_column(mp_rdataWriter, col_sc, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { for(const ProteinMatch *protein_match : @@ -424,7 +424,7 @@ McqrRdata::writeSpectraCountTable(const QFileInfo &sctable_datafile) rdata_begin_column(mp_rdataWriter, col_specific_sc, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { for(const ProteinMatch *protein_match : @@ -456,7 +456,7 @@ McqrRdata::getNumberOfRow(bool is_spectral_count) std::size_t row_count = 0; for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { std::size_t nb_msrun; @@ -501,7 +501,7 @@ McqrRdata::writeQuantiInfoTable(const QFileInfo &quanti_info_datafile) rdata_begin_column(mp_rdataWriter, col_protein, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { for(const ProteinMatch *protein_match : @@ -519,7 +519,7 @@ McqrRdata::writeQuantiInfoTable(const QFileInfo &quanti_info_datafile) rdata_begin_column(mp_rdataWriter, col_nbaa, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { for(const ProteinMatch *protein_match : @@ -536,7 +536,7 @@ McqrRdata::writeQuantiInfoTable(const QFileInfo &quanti_info_datafile) rdata_begin_column(mp_rdataWriter, col_nbpepth, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { for(const ProteinMatch *protein_match : @@ -554,7 +554,7 @@ McqrRdata::writeQuantiInfoTable(const QFileInfo &quanti_info_datafile) rdata_begin_column(mp_rdataWriter, col_mass, row_count); for(IdentificationGroup *ident : msp_project->getIdentificationGroupList()) { - for(const std::pair<unsigned int, GroupingGroupSp> &group_pair : + for(const std::pair<unsigned int, GroupingGroupSp> group_pair : ident->getGroupStore().getGroupMap()) { for(const ProteinMatch *protein_match :