Skip to content
Snippets Groups Projects
Commit f822f79f authored by Langella Olivier's avatar Langella Olivier
Browse files

contaminant checkbox added in protein view

parent d26ad900
No related branches found
No related tags found
No related merge requests found
...@@ -19,10 +19,11 @@ QT5_ADD_RESOURCES(xtpcpp_RCC_SRCS ${xtpcpp_RCCS}) ...@@ -19,10 +19,11 @@ QT5_ADD_RESOURCES(xtpcpp_RCC_SRCS ${xtpcpp_RCCS})
FIND_PACKAGE( ZLIB REQUIRED ) FIND_PACKAGE( ZLIB REQUIRED )
if (QCustomPlot_FOUND) if (QCustomPlot_FOUND)
MESSAGE("QCustomPlot_INCLUDES found ${QCustomPlot_INCLUDES}")
else (QCustomPlot_FOUND) else (QCustomPlot_FOUND)
FIND_PACKAGE( QCustomPlot REQUIRED ) FIND_PACKAGE( QCustomPlot REQUIRED )
endif (QCustomPlot_FOUND) endif (QCustomPlot_FOUND)
if (ODSSTREAM_QT5_FOUND) if (ODSSTREAM_QT5_FOUND)
else (ODSSTREAM_QT5_FOUND) else (ODSSTREAM_QT5_FOUND)
FIND_PACKAGE( Odsstream REQUIRED ) #ODSSTREAM_INCLUDE_DIR AND ODSSTREAM_LIBRARY FIND_PACKAGE( Odsstream REQUIRED ) #ODSSTREAM_INCLUDE_DIR AND ODSSTREAM_LIBRARY
......
...@@ -105,11 +105,34 @@ ...@@ -105,11 +105,34 @@
</property> </property>
</widget> </widget>
</item> </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> <item>
<widget class="QCheckBox" name="decoy_checkbox"> <widget class="QCheckBox" name="decoy_checkbox">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>decoy</string> <string>decoy</string>
</property> </property>
......
...@@ -39,8 +39,8 @@ DbXrefButton::DbXrefButton(QWidget *parent, DbXref dbxref) : QPushButton(parent) ...@@ -39,8 +39,8 @@ DbXrefButton::DbXrefButton(QWidget *parent, DbXref dbxref) : QPushButton(parent)
_dbxref = dbxref; _dbxref = dbxref;
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
// Qt5 code // Qt5 code
QObject::connect(this, &DbXrefButton::clicked, this, QObject::connect(
&DbXrefButton::clickedSlot); this, &DbXrefButton::clicked, this, &DbXrefButton::clickedSlot);
#else #else
// Qt4 code // Qt4 code
QObject::connect(this, SIGNAL(clicked()), this, SLOT(clickedSlot())); QObject::connect(this, SIGNAL(clicked()), this, SLOT(clickedSlot()));
...@@ -67,16 +67,23 @@ ProteinWindow::ProteinWindow(ProjectWindow *parent) ...@@ -67,16 +67,23 @@ ProteinWindow::ProteinWindow(ProjectWindow *parent)
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
// Qt5 code // Qt5 code
connect(_p_project_window, &ProjectWindow::identificationGroupGrouped, this, connect(_p_project_window,
&ProjectWindow::identificationGroupGrouped,
this,
&ProteinWindow::doIdentificationGroupGrouped); &ProteinWindow::doIdentificationGroupGrouped);
connect(_p_project_window, &ProjectWindow::peptideEvidenceSelected, this, connect(_p_project_window,
&ProjectWindow::peptideEvidenceSelected,
this,
&ProteinWindow::doPeptideEvidenceSelected); &ProteinWindow::doPeptideEvidenceSelected);
#else #else
// Qt4 code // Qt4 code
connect(_p_project_window, connect(_p_project_window,
SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this, SIGNAL(identificationGroupGrouped(IdentificationGroup *)),
this,
SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); SLOT(doIdentificationGroupGrouped(IdentificationGroup *)));
connect(_p_project_window, SIGNAL(peptideMatchSelected(PeptideMatch *)), this, connect(_p_project_window,
SIGNAL(peptideMatchSelected(PeptideMatch *)),
this,
SLOT(doPeptideMatchSelected(PeptideMatch *))); SLOT(doPeptideMatchSelected(PeptideMatch *)));
// connect(_protein_table_model_p, SIGNAL(layoutChanged()), this, // connect(_protein_table_model_p, SIGNAL(layoutChanged()), this,
...@@ -123,9 +130,17 @@ ProteinWindow::updateDisplay() ...@@ -123,9 +130,17 @@ ProteinWindow::updateDisplay()
try try
{ {
clearDbXrefLayout(); clearDbXrefLayout();
// valid protein
ui->valid_checkbox->setCheckState(Qt::Unchecked); ui->valid_checkbox->setCheckState(Qt::Unchecked);
if(_p_protein_match->isValid()) if(_p_protein_match->isValid())
ui->valid_checkbox->setCheckState(Qt::Checked); 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); ui->decoy_checkbox->setCheckState(Qt::Unchecked);
if(_p_protein_match->getProteinXtpSp().get()->isDecoy()) if(_p_protein_match->getProteinXtpSp().get()->isDecoy())
ui->decoy_checkbox->setCheckState(Qt::Checked); ui->decoy_checkbox->setCheckState(Qt::Checked);
...@@ -135,9 +150,10 @@ ProteinWindow::updateDisplay() ...@@ -135,9 +150,10 @@ ProteinWindow::updateDisplay()
_p_protein_match->getProteinXtpSp().get()->getDbxrefList()) _p_protein_match->getProteinXtpSp().get()->getDbxrefList())
{ {
QString accession = ui->accession_label->text().replace( QString accession = ui->accession_label->text().replace(
dbxref.accession, QString("<span style=\"color:%2;\">%1</span>") dbxref.accession,
.arg(dbxref.accession) QString("<span style=\"color:%2;\">%1</span>")
.arg("blue")); .arg(dbxref.accession)
.arg("blue"));
ui->accession_label->setText(accession); ui->accession_label->setText(accession);
qDebug() << "ProteinWindow::updateDisplay " << accession; qDebug() << "ProteinWindow::updateDisplay " << accession;
...@@ -163,13 +179,14 @@ ProteinWindow::updateDisplay() ...@@ -163,13 +179,14 @@ ProteinWindow::updateDisplay()
} }
catch(pappso::PappsoException exception_pappso) 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()); exception_pappso.qwhat());
} }
catch(std::exception exception_std) catch(std::exception exception_std)
{ {
QMessageBox::warning(this, tr("Unable to display protein details :"), QMessageBox::warning(
exception_std.what()); this, tr("Unable to display protein details :"), exception_std.what());
} }
} }
...@@ -253,7 +270,7 @@ ProteinWindow::doSaveSvg() ...@@ -253,7 +270,7 @@ ProteinWindow::doSaveSvg()
doc->setPageSize(printer.pageRect().size()); doc->setPageSize(printer.pageRect().size());
//// height from doc QTextDocument //// 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()); //////setMaximumHeight(DocumentHighgtActual());
doc->setPageSize( doc->setPageSize(
printer.pageRect() printer.pageRect()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment