diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e4de9a708af5615c451b544018d012f7264b4ef6..97ef748ffacde260396903ee1acf7a943876bd29 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,10 +19,11 @@ QT5_ADD_RESOURCES(xtpcpp_RCC_SRCS ${xtpcpp_RCCS}) FIND_PACKAGE( ZLIB REQUIRED ) if (QCustomPlot_FOUND) + MESSAGE("QCustomPlot_INCLUDES found ${QCustomPlot_INCLUDES}") else (QCustomPlot_FOUND) FIND_PACKAGE( QCustomPlot REQUIRED ) endif (QCustomPlot_FOUND) - + if (ODSSTREAM_QT5_FOUND) else (ODSSTREAM_QT5_FOUND) FIND_PACKAGE( Odsstream REQUIRED ) #ODSSTREAM_INCLUDE_DIR AND ODSSTREAM_LIBRARY diff --git a/src/gui/protein_view/protein_detail_view.ui b/src/gui/protein_view/protein_detail_view.ui index 685ae9f5ea3e829dffc7f4755ec64cde5427fd5d..b9d5707dd766386519c1351c90d5d611a0b6bd51 100644 --- a/src/gui/protein_view/protein_detail_view.ui +++ b/src/gui/protein_view/protein_detail_view.ui @@ -105,11 +105,34 @@ </property> </widget> </item> + <item> + <widget class="QCheckBox" name="contaminant_checkbox"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="font"> + <font> + <pointsize>9</pointsize> + </font> + </property> + <property name="text"> + <string>contaminant</string> + </property> + <property name="checked"> + <bool>false</bool> + </property> + </widget> + </item> <item> <widget class="QCheckBox" name="decoy_checkbox"> <property name="enabled"> <bool>false</bool> </property> + <property name="font"> + <font> + <pointsize>9</pointsize> + </font> + </property> <property name="text"> <string>decoy</string> </property> diff --git a/src/gui/protein_view/proteinwindow.cpp b/src/gui/protein_view/proteinwindow.cpp index 0e69385626f0834edfb0da01fffb16ea19c61246..9b17a774131f682d834fc69f17021a984c3ae7ee 100644 --- a/src/gui/protein_view/proteinwindow.cpp +++ b/src/gui/protein_view/proteinwindow.cpp @@ -39,8 +39,8 @@ DbXrefButton::DbXrefButton(QWidget *parent, DbXref dbxref) : QPushButton(parent) _dbxref = dbxref; #if QT_VERSION >= 0x050000 // Qt5 code - QObject::connect(this, &DbXrefButton::clicked, this, - &DbXrefButton::clickedSlot); + QObject::connect( + this, &DbXrefButton::clicked, this, &DbXrefButton::clickedSlot); #else // Qt4 code QObject::connect(this, SIGNAL(clicked()), this, SLOT(clickedSlot())); @@ -67,16 +67,23 @@ ProteinWindow::ProteinWindow(ProjectWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(_p_project_window, &ProjectWindow::identificationGroupGrouped, this, + connect(_p_project_window, + &ProjectWindow::identificationGroupGrouped, + this, &ProteinWindow::doIdentificationGroupGrouped); - connect(_p_project_window, &ProjectWindow::peptideEvidenceSelected, this, + connect(_p_project_window, + &ProjectWindow::peptideEvidenceSelected, + this, &ProteinWindow::doPeptideEvidenceSelected); #else // Qt4 code connect(_p_project_window, - SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this, + SIGNAL(identificationGroupGrouped(IdentificationGroup *)), + this, SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); - connect(_p_project_window, SIGNAL(peptideMatchSelected(PeptideMatch *)), this, + connect(_p_project_window, + SIGNAL(peptideMatchSelected(PeptideMatch *)), + this, SLOT(doPeptideMatchSelected(PeptideMatch *))); // connect(_protein_table_model_p, SIGNAL(layoutChanged()), this, @@ -123,9 +130,17 @@ ProteinWindow::updateDisplay() try { clearDbXrefLayout(); + // valid protein ui->valid_checkbox->setCheckState(Qt::Unchecked); if(_p_protein_match->isValid()) ui->valid_checkbox->setCheckState(Qt::Checked); + + // contaminant protein + ui->contaminant_checkbox->setCheckState(Qt::Unchecked); + if(_p_protein_match->getProteinXtpSp().get()->isContaminant()) + ui->contaminant_checkbox->setCheckState(Qt::Checked); + + // decoy protein (reversed) ui->decoy_checkbox->setCheckState(Qt::Unchecked); if(_p_protein_match->getProteinXtpSp().get()->isDecoy()) ui->decoy_checkbox->setCheckState(Qt::Checked); @@ -135,9 +150,10 @@ ProteinWindow::updateDisplay() _p_protein_match->getProteinXtpSp().get()->getDbxrefList()) { QString accession = ui->accession_label->text().replace( - dbxref.accession, QString("<span style=\"color:%2;\">%1</span>") - .arg(dbxref.accession) - .arg("blue")); + dbxref.accession, + QString("<span style=\"color:%2;\">%1</span>") + .arg(dbxref.accession) + .arg("blue")); ui->accession_label->setText(accession); qDebug() << "ProteinWindow::updateDisplay " << accession; @@ -163,13 +179,14 @@ ProteinWindow::updateDisplay() } catch(pappso::PappsoException exception_pappso) { - QMessageBox::warning(this, tr("Unable to display protein details :"), + QMessageBox::warning(this, + tr("Unable to display protein details :"), exception_pappso.qwhat()); } catch(std::exception exception_std) { - QMessageBox::warning(this, tr("Unable to display protein details :"), - exception_std.what()); + QMessageBox::warning( + this, tr("Unable to display protein details :"), exception_std.what()); } } @@ -253,7 +270,7 @@ ProteinWindow::doSaveSvg() doc->setPageSize(printer.pageRect().size()); //// height from doc QTextDocument //// - ///http://fop-miniscribus.googlecode.com/svn/trunk/fop_miniscribus.1.0.0/src/floating_box/floatdiagram.cpp + /// http://fop-miniscribus.googlecode.com/svn/trunk/fop_miniscribus.1.0.0/src/floating_box/floatdiagram.cpp //////setMaximumHeight(DocumentHighgtActual()); doc->setPageSize( printer.pageRect()