Commit 363a2a00 authored by Olivier Langella's avatar Olivier Langella
Browse files

Merge branch 'master' of ssh://git.renater.fr:2222/masschroq

parents 7b6dc83e af25d087
......@@ -16,7 +16,7 @@ PROJECT(masschroq CXX C)
#depending on libpappsomspp version :
SET(LIBPAPPSOMSPP_VERSION "0.2.29-1")
SET(LIBPAPPSOMSPP_VERSION "0.2.30-1")
configure_file (${CMAKE_SOURCE_DIR}/debian/control.cmake ${CMAKE_SOURCE_DIR}/debian/control @ONLY)
# Project version
......
masschroq (2.2.0-15) jessie; urgency=medium
* qwt6 switch
-- Olivier Langella <Olivier.Langella@moulon.inra.fr> Wed, 19 Oct 2016 22:37:53 +0200
masschroq (2.2.0-14) jessie; urgency=medium
* new pappsomspp library
......
......@@ -6,8 +6,8 @@ Uploaders: Olivier Langella <olivier.langella@moulon.inra.fr>
DM-Upload-Allowed: yes
Standards-Version: 3.9.1.0
Build-Depends: debhelper (>= 5), cmake (>= 2.6), libx11-dev, libc6-dev, libqt4-dev (>= 4.6.3),
libqwt5-qt4-dev (>=5.2.0), texlive-latex-extra, texlive-latex-recommended, texlive-fonts-recommended,
texlive-science, hevea, inkscape, doxygen, libpappsomspp-dev (= 0.2.29-1), libodsstream-dev (>=0.4.4)
libqwt-dev (>=6.0.0), texlive-latex-extra, texlive-latex-recommended, texlive-fonts-recommended,
texlive-science, hevea, inkscape, doxygen, libpappsomspp-dev (= 0.2.30-1), libodsstream-dev (>=0.4.4)
Build-Conflicts: qt3-dev-tools
Homepage: http://pappso.inra.fr/bioinfo/masschroq/
......@@ -15,7 +15,7 @@ Homepage: http://pappso.inra.fr/bioinfo/masschroq/
Package: masschroq-common
Architecture: linux-any
Depends: ${shlibs:Depends}, libqtcore4 (>= 4.6.3), libpappsomspp-qt4 (= 0.2.29-1), libodsstream-qt4
Depends: ${shlibs:Depends}, libqtcore4 (>= 4.6.3), libpappsomspp-qt4 (= 0.2.30-1), libodsstream-qt4
Replaces: masschroq (<< 1.5.0)
Conflicts: masschroq (<< 1.5.0)
Suggests: masschroq, masschroq-gui, masschroq-studio
......@@ -62,7 +62,7 @@ Description: Mass Chromatogram Quantification graphical user interface
Package: masschroq-studio
Architecture: any
Depends: ${shlibs:Depends}, masschroq-common (= ${binary:Version}), libqt4-xml (>= 4.6.3), libqtgui4 (>= 4.6.3),libqwt5-qt4 (>= 5.2.0), libqt4-xml (>= 4.6.3)
Depends: ${shlibs:Depends}, masschroq-common (= ${binary:Version}), libqt4-xml (>= 4.6.3), libqtgui4 (>= 4.6.3),libqwt6 (>= 6.0.0), libqt4-xml (>= 4.6.3)
Suggests: masschroq-doc, masschroq-gui
Description: Mass Chromatogram Quantification graphical user interface to edit parameters
MassChroQ (Mass Chromatogram Quantification) software performs quantification
......
......@@ -6,7 +6,7 @@ Uploaders: Olivier Langella <olivier.langella@moulon.inra.fr>
DM-Upload-Allowed: yes
Standards-Version: 3.9.1.0
Build-Depends: debhelper (>= 5), cmake (>= 2.6), libx11-dev, libc6-dev, libqt4-dev (>= 4.6.3),
libqwt5-qt4-dev (>=5.2.0), texlive-latex-extra, texlive-latex-recommended, texlive-fonts-recommended,
libqwt-dev (>=6.0.0), texlive-latex-extra, texlive-latex-recommended, texlive-fonts-recommended,
texlive-science, hevea, inkscape, doxygen, libpappsomspp-dev (= @LIBPAPPSOMSPP_VERSION@), libodsstream-dev (>=0.4.4)
Build-Conflicts: qt3-dev-tools
Homepage: http://pappso.inra.fr/bioinfo/masschroq/
......@@ -62,7 +62,7 @@ Description: Mass Chromatogram Quantification graphical user interface
Package: masschroq-studio
Architecture: any
Depends: ${shlibs:Depends}, masschroq-common (= ${binary:Version}), libqt4-xml (>= 4.6.3), libqtgui4 (>= 4.6.3),libqwt5-qt4 (>= 5.2.0), libqt4-xml (>= 4.6.3)
Depends: ${shlibs:Depends}, masschroq-common (= ${binary:Version}), libqt4-xml (>= 4.6.3), libqtgui4 (>= 4.6.3),libqwt6 (>= 6.0.0), libqt4-xml (>= 4.6.3)
Suggests: masschroq-doc, masschroq-gui
Description: Mass Chromatogram Quantification graphical user interface to edit parameters
MassChroQ (Mass Chromatogram Quantification) software performs quantification
......
# Find the Qwt 6.x includes and library, either the version linked to Qt3 or
# the version linked to Qt4
#
# On Windows it makes these assumptions:
# - the Qwt DLL is where the other DLLs for Qt are (QT_DIR\bin) or in the path
# - the Qwt .h files are in QT_DIR\include\Qwt or in the path
# - the Qwt .lib is where the other LIBs for Qt are (QT_DIR\lib) or in the path
#
# Qwt6_INCLUDE_DIR - where to find qwt.h if Qwt
# Qwt6_Qt4_LIBRARY - The Qwt6 library linked against Qt4 (if it exists)
# Qwt6_Qt3_LIBRARY - The Qwt6 library linked against Qt4 (if it exists)
# Qwt6_Qt4_FOUND - Qwt6 was found and uses Qt4
# Qwt6_Qt3_FOUND - Qwt6 was found and uses Qt3
# Qwt6_FOUND - Set to TRUE if Qwt6 was found (linked either to Qt3 or Qt4)
# Copyright (c) 2007, Pau Garcia i Quiles, <pgquiles@elpauer.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Condition is "(A OR B) AND C", CMake does not support parentheses but it
# evaluates left to right
IF(Qwt6_Qt4_LIBRARY OR Qwt6_Qt3_LIBRARY AND Qwt6_INCLUDE_DIR)
SET(Qwt6_FIND_QUIETLY TRUE)
ENDIF(Qwt6_Qt4_LIBRARY OR Qwt6_Qt3_LIBRARY AND Qwt6_INCLUDE_DIR)
#IF(NOT QT4_FOUND)
#FIND_PACKAGE( Qt4 REQUIRED QUIET )
#ENDIF(NOT QT4_FOUND)
# keep QWT_ROOT variable
if ("$ENV{QWT_ROOT}" STREQUAL "")
if (NOT "${QWT_DIR}" STREQUAL "")
set(ENV{QWT_ROOT} ${QWT_DIR})
endif()
else()
set(QWT_DIR $ENV{QWT_ROOT} CACHE STRING "QWT directory")
endif()
#IF( QT4_FOUND )
# Is Qwt6 installed? Look for header files
FIND_PATH( Qwt6_INCLUDE_DIR qwt.h
PATHS ${QT_INCLUDE_DIR}
$ENV{QWT_ROOT}/include
/usr/local/qwt/include
/usr/include/qwt
/usr/local/qwt-6.0.2-svn/include/
/usr/local/qwt-6.0.1-svn/include/
/usr/local/qwt-6.0.0-rc1/include
/usr/local/qwt-6.0.0-rc3/include
PATH_SUFFIXES
qwt
qwt6
qwt-qt4
qwt6-qt4
qwt-qt3
qwt6-qt3
include
qwt/include
qwt6/include
qwt-qt4/include
qwt6-qt4/include
qwt-qt3/include
qwt6-qt3/include
ENV PATH)
# Find Qwt version
IF( Qwt6_INCLUDE_DIR )
FILE( READ ${Qwt6_INCLUDE_DIR}/qwt_global.h QWT_GLOBAL_H )
STRING( REGEX MATCH "#define *QWT_VERSION *(0x06*)" QWT_IS_VERSION_6 ${QWT_GLOBAL_H})
IF( QWT_IS_VERSION_6 )
STRING(REGEX REPLACE ".*#define[\\t\\ ]+QWT_VERSION_STR[\\t\\ ]+\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*" "\\1" Qwt_VERSION "${QWT_GLOBAL_H}")
# Find Qwt6 library linked to Qt4
FIND_LIBRARY( Qwt6_Qt4_TENTATIVE_LIBRARY
NAMES qwt6-qt4 qwt-qt4 qwt6 qwt
PATHS
/usr/local/qwt/lib
/usr/local/lib
/usr/local/qwt-6.0.1-svn/lib
/usr/local/qwt-6.0.2-svn/lib
/usr/local/qwt-6.0.0-rc1/lib
/usr/local/qwt-6.0.0-rc3/lib
$ENV{HOME}/local/qwt-6.0.2-svn/lib
/usr/lib
${QT_LIBRARY_DIR})
IF( UNIX AND NOT CYGWIN)
IF( Qwt6_Qt4_TENTATIVE_LIBRARY )
#MESSAGE("Qwt6_Qt4_TENTATIVE_LIBRARY = ${Qwt6_Qt4_TENTATIVE_LIBRARY}")
EXECUTE_PROCESS( COMMAND "ldd" ${Qwt6_Qt4_TENTATIVE_LIBRARY} OUTPUT_VARIABLE Qwt_Qt4_LIBRARIES_LINKED_TO )
STRING( REGEX MATCH ".*QtCore.*" Qwt6_IS_LINKED_TO_Qt4 ${Qwt_Qt4_LIBRARIES_LINKED_TO})
IF( Qwt6_IS_LINKED_TO_Qt4 )
SET( Qwt6_Qt4_LIBRARY ${Qwt6_Qt4_TENTATIVE_LIBRARY} )
SET( Qwt6_Qt4_FOUND TRUE )
IF (NOT Qwt6_FIND_QUIETLY)
MESSAGE( STATUS "Found Qwt: ${Qwt6_Qt4_LIBRARY}" )
ENDIF (NOT Qwt6_FIND_QUIETLY)
ENDIF( Qwt6_IS_LINKED_TO_Qt4 )
ENDIF( Qwt6_Qt4_TENTATIVE_LIBRARY )
ELSE( UNIX AND NOT CYGWIN)
# Assumes qwt.dll is in the Qt dir
SET( Qwt6_Qt4_LIBRARY ${Qwt6_Qt4_TENTATIVE_LIBRARY} )
SET( Qwt6_Qt4_FOUND TRUE )
IF (NOT Qwt6_FIND_QUIETLY)
MESSAGE( STATUS "Found Qwt version ${Qwt_VERSION} linked to Qt4" )
ENDIF (NOT Qwt6_FIND_QUIETLY)
ENDIF( UNIX AND NOT CYGWIN)
# Find Qwt6 library linked to Qt3
FIND_LIBRARY( Qwt6_Qt3_TENTATIVE_LIBRARY NAMES qwt-qt3 qwt qwt6-qt3 qwt6 )
IF( UNIX AND NOT CYGWIN)
IF( Qwt6_Qt3_TENTATIVE_LIBRARY )
#MESSAGE("Qwt6_Qt3_TENTATIVE_LIBRARY = ${Qwt6_Qt3_TENTATIVE_LIBRARY}")
EXECUTE_PROCESS( COMMAND "ldd" ${Qwt6_Qt3_TENTATIVE_LIBRARY} OUTPUT_VARIABLE Qwt-Qt3_LIBRARIES_LINKED_TO )
STRING( REGEX MATCH "qt-mt" Qwt6_IS_LINKED_TO_Qt3 ${Qwt-Qt3_LIBRARIES_LINKED_TO})
IF( Qwt6_IS_LINKED_TO_Qt3 )
SET( Qwt6_Qt3_LIBRARY ${Qwt6_Qt3_TENTATIVE_LIBRARY} )
SET( Qwt6_Qt3_FOUND TRUE )
IF (NOT Qwt6_FIND_QUIETLY)
MESSAGE( STATUS "Found Qwt version ${Qwt_VERSION} linked to Qt3" )
ENDIF (NOT Qwt6_FIND_QUIETLY)
ENDIF( Qwt6_IS_LINKED_TO_Qt3 )
ENDIF( Qwt6_Qt3_TENTATIVE_LIBRARY )
ELSE( UNIX AND NOT CYGWIN)
SET( Qwt6_Qt3_LIBRARY ${Qwt6_Qt3_TENTATIVE_LIBRARY} )
SET( Qwt6_Qt3_FOUND TRUE )
IF (NOT Qwt6_FIND_QUIETLY)
MESSAGE( STATUS "Found Qwt: ${Qwt6_Qt3_LIBRARY}" )
ENDIF (NOT Qwt6_FIND_QUIETLY)
ENDIF( UNIX AND NOT CYGWIN)
ENDIF( QWT_IS_VERSION_6 )
IF( Qwt6_Qt4_FOUND OR Qwt6_Qt3_FOUND )
SET( Qwt6_FOUND TRUE )
ENDIF( Qwt6_Qt4_FOUND OR Qwt6_Qt3_FOUND )
MARK_AS_ADVANCED( Qwt6_INCLUDE_DIR Qwt6_Qt4_LIBRARY Qwt6_Qt3_LIBRARY )
ENDIF( Qwt6_INCLUDE_DIR )
IF (NOT Qwt6_FOUND AND Qwt6_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Qwt 6.x")
ENDIF (NOT Qwt6_FOUND AND Qwt6_FIND_REQUIRED)
#ENDIF( QT4_FOUND )
......@@ -28,9 +28,9 @@ if (NOT PAPPSOMSPP_DIR)
FIND_PACKAGE( Pappsomspp REQUIRED )
endif (NOT PAPPSOMSPP_DIR)
#SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp")
# SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp")
# SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src")
# SET (PAPPSOMSPP_QT4_LIBRARY "${PAPPSOMSPP_DIR}/build/src/libpappsomspp-qt4.so")
# SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp")
# SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src")
# SET (PAPPSOMSPP_QT4_LIBRARY "${PAPPSOMSPP_DIR}/build/src/libpappsomspp-qt4.so")
INCLUDE_DIRECTORIES( ${PAPPSOMSPP_INCLUDE_DIR})
......@@ -234,12 +234,12 @@ ELSE (NOGUI)
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR})
ELSE (NOQWT)
set(Qwt5_DIR ${masschroq_SOURCE_DIR}/Modules)
FIND_PACKAGE(Qwt5 REQUIRED)
FIND_PACKAGE(Qwt6 REQUIRED)
# and finally this will run moc:
QT4_WRAP_CPP( STUDIO_MOC_SRCS ${STUDIO_MOC_HDRS} )
# we need this to be able to include headers produced by uic in our code
# (CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() works just like INCLUDEPATH from qmake)
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ${Qwt5_INCLUDE_DIR})
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ${Qwt6_INCLUDE_DIR})
ENDIF (NOQWT)
# this command will generate rules that will run rcc on all files from SAMPLE_RCS
......@@ -271,8 +271,8 @@ IF (MINGW32)
IF (NOQWT)
ELSE (NOQWT)
ADD_EXECUTABLE(masschroq_studio gui/parameterGui.cpp ${STUDIO_SRCS} ${STUDIO_MOC_SRCS} ${MASSCHROQ_LIB_SRCS} ${MASSCHROQ_LIB_MOC_SRCS} ${SAXLIB_SRCS} ${OBIWARP_SRCS})
TARGET_LINK_LIBRARIES(masschroq_studio ${QT_LIBRARIES} ${Qwt5_Qt4_LIBRARY} ${PAPPSOMSPP_QT4_LIBRARY} ${ODSSTREAM_QT4_LIBRARY})
ADD_EXECUTABLE(masschroq_studio gui/parameterGui.cpp ${STUDIO_SRCS} ${STUDIO_MOC_SRCS} ${MASSCHROQ_LIB_SRCS} ${MASSCHROQ_LIB_MOC_SRCS} ${SAXLIB_SRCS} ${OBIWARP_SRCS} ${MASSCHROQ_RCC_SRCS_QT4})
TARGET_LINK_LIBRARIES(masschroq_studio ${QT_LIBRARIES} ${Qwt6_Qt4_LIBRARY} ${PAPPSOMSPP_QT4_LIBRARY} ${ODSSTREAM_QT4_LIBRARY})
SET_TARGET_PROPERTIES(masschroq_studio PROPERTIES LINK_FLAGS "-Wl,--enable-auto-import -Wl,--subsystem,windows ${ADD_MINGW_EXE_LINKER_FLAGS}")
ENDIF (NOQWT)
......@@ -302,12 +302,12 @@ ELSE (MINGW32)
ADD_EXECUTABLE(masschroq_gui gui/launcherGui.cpp ${GUI_SRCS} ${GUI_MOC_SRCS} ${GUI_UI_HDRS})
TARGET_LINK_LIBRARIES(masschroq_gui ${MASSCHROQ_LIB_NAME} ${QT_LIBRARIES} ${Qwt5_Qt4_LIBRARY} ${PAPPSOMSPP_QT4_LIBRARY} ${ODSSTREAM_QT4_LIBRARY})
TARGET_LINK_LIBRARIES(masschroq_gui ${MASSCHROQ_LIB_NAME} ${QT_LIBRARIES} ${PAPPSOMSPP_QT4_LIBRARY} ${ODSSTREAM_QT4_LIBRARY})
IF (NOQWT)
ELSE (NOQWT)
ADD_EXECUTABLE(masschroq_studio gui/parameterGui.cpp ${STUDIO_SRCS} ${STUDIO_MOC_SRCS})
TARGET_LINK_LIBRARIES(masschroq_studio ${MASSCHROQ_LIB_NAME} ${QT_LIBRARIES} ${Qwt5_Qt4_LIBRARY} ${PAPPSOMSPP_QT4_LIBRARY} ${ODSSTREAM_QT4_LIBRARY})
TARGET_LINK_LIBRARIES(masschroq_studio ${MASSCHROQ_LIB_NAME} ${QT_LIBRARIES} ${Qwt6_Qt4_LIBRARY} ${PAPPSOMSPP_QT4_LIBRARY} ${ODSSTREAM_QT4_LIBRARY})
ENDIF (NOQWT)
ENDIF (NOGUI)
......
......@@ -86,10 +86,12 @@ void AlignmentWidget::errortLoadindMsrunAligned(QString error){
}
void AlignmentWidget::deleteMsrun(Msrun * msrun){
qDebug()<<"AlignmentWidget::deleteMsrun begin";
if(msrun!=0){
delete(msrun);
//delete(msrun);
msrun=0;
}
qDebug()<<"AlignmentWidget::deleteMsrun end";
}
void AlignmentWidget::completDataToMsrun(Msrun * msrun){
......@@ -97,8 +99,10 @@ void AlignmentWidget::completDataToMsrun(Msrun * msrun){
}
void AlignmentWidget::doneAlignment() {
qDebug()<< "AlignmentWidget::doneAlignment begin";
_runningQLabel->stopLoading("");
this->emitSignalDoneAlignement();
qDebug()<< "AlignmentWidget::doneAlignment end";
}
void AlignmentWidget::startAlignment() {
......@@ -130,6 +134,8 @@ void AlignmentWidget::deleteLoadingThread(){
}
void AlignmentWidget::triggerLoadingMsRunToAlign(Msrun * msrun) {
qDebug()<<"AlignmentWidget::triggerLoadingMsRunToAlign begin";
if (msrun != 0) {
//_text_edit_ref->setText(msrun->getXmlFileInfo().fileName());
this->_loadingMsruntoALignedLabel->startLoading("Loading");
......@@ -141,6 +147,7 @@ void AlignmentWidget::triggerLoadingMsRunToAlign(Msrun * msrun) {
"There is no MsRun to align.\n Please choose one!"));
return;
}
qDebug()<<"AlignmentWidget::triggerLoadingMsRunToAlign end";
}
void AlignmentWidget::triggerLoadingMsRunRef(Msrun * msrun) {
......
......@@ -183,6 +183,7 @@ void Ms2AlignmentWidget::startLoadindMsrunRef(int index) {
}
void Ms2AlignmentWidget::startLoadindMsrunAligned(int index) {
qDebug() << "Ms2AlignmentWidget::startLoadindMsrunAligned begin ";
if (this->isAlignmentRunning())
return;
qDebug() << "Load MsRun Align index : " << index;
......@@ -190,6 +191,8 @@ void Ms2AlignmentWidget::startLoadindMsrunAligned(int index) {
Msrun * msrun = _masschroqGuidata->getMsrunHashGroup()->getMsRun(id);
this->triggerLoadingMsRunToAlign(msrun);
qDebug() << "Ms2AlignmentWidget::startLoadindMsrunAligned end " ;
}
void Ms2AlignmentWidget::startLoadingMasschroqml() {
......@@ -266,10 +269,12 @@ void Ms2AlignmentWidget::completDataToMsrun(Msrun * msrun) {
}
void Ms2AlignmentWidget::emitSignalDoneAlignement() {
qDebug() << "Ms2AlignmentWidget::emitSignalDoneAlignement begin" ;
emit newAlignmentCurve();
MonitorAlignmentPlot * monitor = (MonitorAlignmentPlot *) _monitor;
emit finishMonitorAlignment(monitor);
emit finishAlignment(_msunToAligned);
qDebug() << "Ms2AlignmentWidget::emitSignalDoneAlignement end" ;
}
void Ms2AlignmentWidget::deleteData() {
......
......@@ -7,7 +7,6 @@
#include "plot_aligned.h"
#include <qwt_legend.h>
#include <qwt_symbol.h>
#include <qwt_data.h>
PlotAligned::PlotAligned(QWidget *parent) :
QwtPlot(parent) {
......@@ -23,7 +22,7 @@ PlotAligned::PlotAligned(QWidget *parent) :
setAxisTitle(QwtPlot::xBottom, "Retention time (s)");
setAxisTitle(QwtPlot::yLeft, "Delta RT (s)");
// enable zooming
_zoomer = 0;
_zoomer = nullptr;
_p_curve_deltart = new QwtPlotCurve("Aligned RT");
_p_curve_ms2 = new QwtPlotCurve("Common identification");
......@@ -31,14 +30,14 @@ PlotAligned::PlotAligned(QWidget *parent) :
PlotAligned::~PlotAligned() {
this->clear();
if (_zoomer != 0) {
if (_zoomer != nullptr) {
delete _zoomer;
_zoomer = 0;
_zoomer = nullptr;
}
}
void PlotAligned::viewAlignedMsRun(const Msrun * msrun) {
qDebug() << "View MsRun aligned";
qDebug() << "PlotAligned::viewAlignedMsRun begin";
const std::vector<mcq_double> originalRt =
msrun->getOriginalRetentionTimes();
const std::vector<mcq_double> alignedRt = msrun->getAlignedRetentionTimes();
......@@ -59,7 +58,7 @@ void PlotAligned::viewAlignedMsRun(const Msrun * msrun) {
x1[i] = (*itOriginal);
i++;
}
_p_curve_deltart->setData(x1, y1, plotsize);
_p_curve_deltart->setSamples(x1, y1, plotsize);
_p_curve_deltart->attach(this);
......@@ -69,44 +68,65 @@ void PlotAligned::viewAlignedMsRun(const Msrun * msrun) {
this->replot();
initZoomer();
}
qDebug() << "PlotAligned::viewAlignedMsRun end";
}
void PlotAligned::viewAlignedMS2Peaks(const MonitorAlignmentPlot * monitorAlignment) {
qDebug() << "PlotAligned::viewAlignedMS2Peaks begin";
if(monitorAlignment==0)
return;
qDebug() << "View Ms2 point";
_p_curve_ms2->detach();
delete (_p_curve_ms2);
_p_curve_ms2 = nullptr;
this->QwtPlot::replot();
initZoomer();
//delete _p_curve_ms2;
_p_curve_ms2 = new QwtPlotCurve("Common identification");
_p_curve_ms2->attach(this);
//QwtPlotCurve * curve = new QwtPlotCurve("Common identification");
_p_curve_ms2->setStyle(QwtPlotCurve::Dots);
_p_curve_ms2->setRenderHint(QwtPlotItem::RenderAntialiased);
const QwtSymbol symbol(QwtSymbol::Star1, QColor(Qt::black), QColor(Qt::black),
QSize(9, 9));
_p_curve_ms2->setSymbol(symbol);
_p_curve_ms2->setSymbol(new QwtSymbol(QwtSymbol::Star2, QColor(Qt::black), QColor(Qt::black),
QSize(9, 9)));
//_alignedPlots.push_back(curve);
const std::map<mcq_double,mcq_double>& mapDeltaPeaks = monitorAlignment->getMs2CommonPeak();
// QVector<QPointF> *data = static_cast<QVector<QPointF> *>(_p_curve_ms2->data());
//_p_msms_data->clear();
_msms_data.resize(0);
//_msms_data.clear();
//_p_curve_ms2->detach();
QVector< double > x;
QVector< double > y;
//unsigned int plotsize(mapDeltaPeaks.size());
//mcq_double x1[plotsize], y1[plotsize];
std::map<mcq_double,mcq_double>::const_iterator it;
//int i = 0;
for (it = mapDeltaPeaks.begin(); it != mapDeltaPeaks.end(); ++it) {
QwtDoublePoint one_point;
one_point.setX(it->first);
one_point.setY(it->second);
_msms_data.push_back(one_point);
QPointF one_point;
x.push_back(it->first);
y.push_back(it->second);
//one_point.setX(it->first);
//one_point.setY(it->second);
//_msms_data.push_back(one_point);
//y1[i] = it->second;
//x1[i] = it->first;
//i++;
}
_p_curve_ms2->setData(_msms_data);
_p_msms_data = new QwtPointArrayData(x,y);
_p_curve_ms2->setData(_p_msms_data);
_p_curve_ms2->attach(this);
this->replot();
initZoomer();
qDebug() << "PlotAligned::viewAlignedMS2Peaks end";
}
void PlotAligned::clear() {
......@@ -121,9 +141,8 @@ void PlotAligned::clear() {
_p_curve_ms2->setData(_msms_data);
replot();
}*/
_p_curve_ms2->setData(QwtArray<QwtDoublePoint>());
_p_curve_deltart->setData(QwtArray<QwtDoublePoint>());
//_p_curve_ms2->setSamples(QVector<QPointF>());
_p_curve_deltart->setSamples(QVector<QPointF>());
_p_curve_ms2->detach();
_p_curve_deltart->detach();
......@@ -131,7 +150,7 @@ void PlotAligned::clear() {
setAxisAutoScale(QwtPlot::xBottom);
setAxisAutoScale(QwtPlot::yLeft);
this->setTitle("");
_msms_data.resize(0);
//_msms_data.clear();
replot();
initZoomer();
......@@ -149,7 +168,7 @@ void PlotAligned::initZoomer() {
// RightButton: zoom out by 1
// Ctrl+RighButton: zoom out to full size
if (_zoomer != 0)
if (_zoomer != nullptr)
delete _zoomer;
_zoomer = new QwtPlotZoomer(canvas());
......@@ -163,4 +182,4 @@ void PlotAligned::initZoomer() {
_zoomer->setRubberBandPen(c);
_zoomer->setTrackerPen(c);
}
\ No newline at end of file
}
......@@ -31,6 +31,7 @@
#ifndef _PLOT_ALIGNED_H_
#define _PLOT_ALIGNED_H_ 1
//#include <qwt_compat.h>
#include <qwt_plot.h>
#include <qwt_plot_zoomer.h>
#include <qwt_plot_curve.h>
......@@ -69,7 +70,7 @@ private:
QwtPlotCurve * _p_curve_deltart;
QwtPlotCurve * _p_curve_ms2;
QwtArray<QwtDoublePoint> _msms_data;
QwtPointArrayData * _p_msms_data;
};
......
......@@ -409,7 +409,7 @@ void ParameterMainWindow::obiwarpAlignmentWidget() {
}
void ParameterMainWindow::ms2AlignmentWidget() {
qDebug() << "New MS2 widget" << endl;
qDebug() << "ParameterMainWindow::ms2AlignmentWidget begin" << endl;
this->resetDockTools();
Ms2AlignmentWidget * ms2 = new Ms2AlignmentWidget(dockwidget);
connect(ms2, SIGNAL(newAlignmentCurve()), _plot_area_aligned,
......@@ -421,6 +421,7 @@ void ParameterMainWindow::ms2AlignmentWidget() {
SLOT(viewAlignedMS2Peaks(const MonitorAlignmentPlot *)));
vbox->addWidget(ms2);
vbox->addStretch(1);
qDebug() << "ParameterMainWindow::ms2AlignmentWidget end" << endl;
}
void ParameterMainWindow::about() {
......@@ -490,4 +491,4 @@ void ParameterMainWindow::appendLogString(QString log)
{
_logQTextEdit->moveCursor(QTextCursor::End);
_logQTextEdit->insertPlainText(log);
}
\ No newline at end of file
}
......@@ -39,6 +39,7 @@ Plot::~Plot() {
}
void Plot::viewNewPlot(const TreatmentBoxXicExtract * p_treatment) {
qDebug() << "Plot::viewNewPlot begin";
this->clear();
qDebug() << "Created new xic plot";
McqXicNoConstSp p_xic = p_treatment->getCurrentXic();
......@@ -51,10 +52,10 @@ void Plot::viewNewPlot(const TreatmentBoxXicExtract * p_treatment) {
std::pair<const TreatmentBox*, QwtPlotCurve *>(p_treatment,
curve));
unsigned int plotsize(p_xic->size());
int plotsize(p_xic->size());
mcq_double x1[plotsize], y1[plotsize];
p_xic->fillDataArray(x1, y1, plotsize);
curve->setData(x1, y1, plotsize);
curve->setSamples(x1, y1, plotsize);
curve->attach(this);
this->replot();
......@@ -67,6 +68,8 @@ void Plot::viewNewPlot(const TreatmentBoxXicExtract * p_treatment) {
title.append(QString().setNum(p_treatment->getQuantiItem()->getMz(),'f',4));
this->setTitle(title);
}
qDebug() << "Plot::viewNewPlot end";
}
void Plot::updatedCurrentPlot(const TreatmentBoxXicFilter * p_treatment) {
qDebug() << "Add/update xic plot";
......@@ -88,7 +91,7 @@ void Plot::updatedCurrentPlot(const TreatmentBoxXicFilter * p_treatment) {
unsigned int plotsize(p_xic->size());
mcq_double x1[plotsize], y1[plotsize];
p_xic->fillDataArray(x1, y1, plotsize);
curve->setData(x1, y1, plotsize);
curve->setSamples(x1, y1, plotsize);
curve->attach(this);
this->replot();
......@@ -105,9 +108,8 @@ void Plot::updatedPeaks(const TreatmentBoxXicDetect * p_treatment) {
curve = new QwtPlotCurve("Detected Peaks");
curve->setStyle(QwtPlotCurve::Dots);
curve->setRenderHint(QwtPlotItem::RenderAntialiased);
const QwtSymbol symbol(QwtSymbol::Star1, getNewColors(),
getNewColors(), QSize(9, 9));
curve->setSymbol(symbol);
curve->setSymbol(new QwtSymbol(QwtSymbol::Star1, QColor(Qt::red), QColor(Qt::red),
QSize(9, 9)));
_xicPlots.insert(
std::pair<const TreatmentBox*, QwtPlotCurve *>(p_treatment,
curve));
......@@ -122,7 +124,7 @@ void Plot::updatedPeaks(const TreatmentBoxXicDetect * p_treatment) {
x1[i] = it->getMaxXicElement().rt;
i++;
}
curve->setData(x1, y1, plotsize);
curve->setSamples(x1, y1, plotsize);
curve->attach(this);
this->replot();
......
......@@ -61,6 +61,9 @@ private:
std::map<const TreatmentBox *, QwtPlotCurve *> _xicPlots;
QwtPlotZoomer * _zoomer;
// QwtSymbol * _p_symbol;
};
......
......@@ -21,6 +21,7 @@ MsrunSimpleLoaderThread::~MsrunSimpleLoaderThread() {
}
void MsrunSimpleLoaderThread::loadMsrun(Msrun * msrun) {
qDebug() << "MsrunSimpleLoaderThread::loadMsrun begin";
setProgressValue(1);
_mutex.lock();
_current_msrun = msrun;
......@@ -35,9 +36,11 @@ void MsrunSimpleLoaderThread::loadMsrun(Msrun * msrun) {
_restart=true;
_condition.wakeOne();
}
qDebug() << "MsrunSimpleLoaderThread::loadMsrun end";
}
void MsrunSimpleLoaderThread::run() {
qDebug() << "MsrunSimpleLoaderThread::run begin";