diff -Nru msxpertsuite-5.3.2/CMakeLists.txt msxpertsuite-5.3.3/CMakeLists.txt --- msxpertsuite-5.3.2/CMakeLists.txt 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/CMakeLists.txt 2018-06-20 15:46:39.000000000 +0000 @@ -13,8 +13,14 @@ # youcompleteme (vim plugin). set(CMAKE_EXPORT_COMPILE_COMMANDS 1) -# We want C++14 -ADD_DEFINITIONS(-std=c++14 -Wno-unknown-pragmas) +# We want C++11 +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) +# deprecated, cmake does the job: ADD_DEFINITIONS(-std=c++11) + +# We do not want warnings for unknown pragmas: +ADD_DEFINITIONS(-Wno-unknown-pragmas) # Include the various colors we want to use in the output include(outputColors) @@ -28,7 +34,7 @@ # Basic information about project project(msXpertSuite) -set(VERSION 5.3.2) +set(VERSION 5.3.3) # Set additional project information diff -Nru msxpertsuite-5.3.2/debian/changelog msxpertsuite-5.3.3/debian/changelog --- msxpertsuite-5.3.2/debian/changelog 2018-06-04 20:33:37.000000000 +0000 +++ msxpertsuite-5.3.3/debian/changelog 2018-06-20 15:42:48.000000000 +0000 @@ -1,3 +1,17 @@ +msxpertsuite (5.3.3-1) unstable; urgency=low + + * New upstream release. + + * Fix the "ignore error" directive in the user manual documentation Makefile + that drives the LaTeX-based compilation of the documents (Closes: #901154); + + * Revert C++14 to C++11 to maintain compatibility with OSes that are less + advanced with gcc; + + * Fix problem with loading Agilent data because of drift bin count variable. + + -- Filippo Rusconi Wed, 20 Jun 2018 17:42:48 +0200 + msxpertsuite (5.3.2-1) unstable; urgency=low * New upstream release. Binary files /tmp/tmp_lAHGL/j9XgMMLxkf/msxpertsuite-5.3.2/images/splashscreen.png and /tmp/tmp_lAHGL/hm0q_wa7U_/msxpertsuite-5.3.3/images/splashscreen.png differ diff -Nru msxpertsuite-5.3.2/images/splashscreen.svg msxpertsuite-5.3.3/images/splashscreen.svg --- msxpertsuite-5.3.2/images/splashscreen.svg 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/images/splashscreen.svg 2018-06-20 15:46:39.000000000 +0000 @@ -150,6 +150,6 @@ id="tspan4496" x="404.5647" y="963.23505" - style="stroke-width:0.33261424px">Suite version 5.3.2 + style="stroke-width:0.33261424px">Suite version 5.3.3 Binary files /tmp/tmp_lAHGL/j9XgMMLxkf/msxpertsuite-5.3.2/massxpert/user-manual/figures/splashscreen.png and /tmp/tmp_lAHGL/hm0q_wa7U_/msxpertsuite-5.3.3/massxpert/user-manual/figures/splashscreen.png differ diff -Nru msxpertsuite-5.3.2/massxpert/user-manual/Makefile msxpertsuite-5.3.3/massxpert/user-manual/Makefile --- msxpertsuite-5.3.2/massxpert/user-manual/Makefile 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/massxpert/user-manual/Makefile 2018-06-20 15:46:39.000000000 +0000 @@ -7,13 +7,13 @@ noreader: echo "make noreader" - -pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) && \ + pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) && \ pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) - -if [ -f $(PROJECT).idx ] ; \ + if [ -f $(PROJECT).idx ] ; \ then \ makeindex $(PROJECT).idx ; \ fi - -pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) && \ + pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) && \ pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) touch noreader diff -Nru msxpertsuite-5.3.2/massxpert/user-manual/msxpertsuite-macros.tex msxpertsuite-5.3.3/massxpert/user-manual/msxpertsuite-macros.tex --- msxpertsuite-5.3.2/massxpert/user-manual/msxpertsuite-macros.tex 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/massxpert/user-manual/msxpertsuite-macros.tex 2018-06-20 15:46:39.000000000 +0000 @@ -2,7 +2,7 @@ \newcommand{\msxpshrefbase}[2]{\href{http://www.msxpertsuite.org/#1}{#2}} %%% Version of the software suite -\newcommand{\ver}{5.3.2} +\newcommand{\ver}{5.3.3} \newcommand{\msXpsver}{\emph{msXpertSuite} version \ver} %%% msXpertSuite diff -Nru msxpertsuite-5.3.2/minexpert/nongui/MassSpecDataFileLoaderPwiz.cpp msxpertsuite-5.3.3/minexpert/nongui/MassSpecDataFileLoaderPwiz.cpp --- msxpertsuite-5.3.2/minexpert/nongui/MassSpecDataFileLoaderPwiz.cpp 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/minexpert/nongui/MassSpecDataFileLoaderPwiz.cpp 2018-06-20 15:46:39.000000000 +0000 @@ -157,8 +157,6 @@ m_driftTimeMax = -1; m_driftTimeStep = -1; m_prevDriftTime = -1; - m_curDriftBin = 0; - m_driftBinCount = 0; } @@ -208,32 +206,24 @@ { // qDebug() << __FILE__ << __LINE__ // << "Spectrum index: " << m_spectrumIndex - // << "with m_curDriftTime: " << m_curDriftTime - // << "and m_curDriftBin: " << m_curDriftBin; + // << "with m_curDriftTime: " << m_curDriftTime; - if(m_curDriftTime == m_driftTimeMin) + // When the software was initially developed the reference data + // material was from Waters Synapt HDMS G2 instrument, and the drift + // times were extremely reproducible. Thus we could write the following + // if statement: + // if(m_curDriftTime == m_driftTimeMin) + // + // When I started looking at Agilent data, I discovered that the very + // first drift time of cycle 1 and cycle 2 were not identical. So I had + // to change the if statement to this: + if(m_curDriftTime <= m_driftTimeMin) { // We are starting a new drift cycle because we are not // at the 0-index iteration (specIndex != 0) and the // drift time is nonetheless the same as the one on the // first iteration. - // We thus can store the drift bin count, that is the number - // of - // drift bins - // in a mobility cycle. This count is set to the current - // spectrum - // index - // that will match the number of spectra before this one that - // initiates a - // new drift cycle. - m_driftBinCount = m_spectrumIndex; - m_curDriftBin = 1; - - // qDebug() << __FILE__ << __LINE__ - // << "Encountered a new instance of the m_driftTimeMin" - // << "Set m_curDriftBin to: " << m_curDriftBin; - // And also set the max drift time, since we stored that value // during the previous iteration. m_driftTimeMax = m_prevDriftTime; @@ -247,19 +237,6 @@ //FIXME //emit dataLoadMessageSignal( //"The data are for a mobility experiment.", LOG_TO_BOTH); - - if(m_driftBinCount == 0) - { - qFatal("Fatal error at %s@%d. The value of driftBinCount " - "is 0. " - "Fatal error. Program aborted.", - __FILE__, __LINE__); - } - else - { - // qDebug() << __FILE__ << __LINE__ - // << "The driftBinCount is " << m_driftBinCount; - } } } // Store the drift time value for the next round, if we need it. @@ -270,7 +247,6 @@ m_msFileMetaData.setDoubleItem("driftTimeMin", m_driftTimeMin); m_msFileMetaData.setDoubleItem("driftTimeMax", m_driftTimeMax); m_msFileMetaData.setDoubleItem("driftTimeStep", m_driftTimeStep); - m_msFileMetaData.setIntItem("driftBinCount", m_driftBinCount); } @@ -494,10 +470,6 @@ return -1; } - // A new spectrum is necessarily a new drift bin (if data are for a - // ion mobility experiment. - m_curDriftBin++; - // We use this variable to check for NaN drift time values (Waters Synapt // files do have odd mzML elements. bool wasNanOrInf = false; @@ -642,19 +614,6 @@ if(!m_isMobilityExperiment) seedMobilityData(); - else - { - // m_driftBinCount is set by the seedMobilityData() - - if(m_curDriftBin > m_driftBinCount) - { - m_curDriftBin = 1; - } - - // qDebug() << __FILE__ << __LINE__ - //<< "spectrum index: " << m_spectrumIndex - //<< "current drift bin: " << m_curDriftBin; - } // Finally report the results: *p_spectrumPtr = spectrumPtr; @@ -801,7 +760,6 @@ { // qDebug() << __FILE__ << __LINE__ // << "This file is from a mobility experiment." - // << "m_curDriftBin: " << m_curDriftBin // << "m_curDriftTime:" << m_curDriftTime; // Let's see if for the current drift time, a spectrum @@ -938,7 +896,6 @@ { // qDebug() << __FILE__ << __LINE__ // << "This file is from a mobility experiment." - // << "m_curDriftBin: " << m_curDriftBin // << "m_curDriftTime:" << m_curDriftTime; mp_massSpecDataSet->insertDtHash(m_curDriftTime, mp_newSpectrum); @@ -1937,7 +1894,7 @@ // first drift cycle run). bool sqlResult = sqlite3Handler.writeDbDriftData(database, - m_curDriftTime, m_curDriftBin, &m_driftDataId); + m_curDriftTime, &m_driftDataId); if(!sqlResult || m_driftDataId == -1) { diff -Nru msxpertsuite-5.3.2/minexpert/nongui/MassSpecDataFileLoaderPwiz.hpp msxpertsuite-5.3.3/minexpert/nongui/MassSpecDataFileLoaderPwiz.hpp --- msxpertsuite-5.3.2/minexpert/nongui/MassSpecDataFileLoaderPwiz.hpp 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/minexpert/nongui/MassSpecDataFileLoaderPwiz.hpp 2018-06-20 15:46:39.000000000 +0000 @@ -402,30 +402,6 @@ //! Stores the previous mass spectrum's drift time. double m_prevDriftTime = -1; - //! Drift time bin associated with the mass spectrum currently being loaded. - /*! - - This value is deduced by analyzing the cycling of mass spectra in the - drift cycles. - -*/ - int m_curDriftBin = 0; - - //! Number of drift bins in a drift cycle. - /*! - - This value is deduced by analyzing the cycling of mass spectra in the - drift cycles. - -*/ - int m_driftBinCount = -1; - - //! Number of scan windows for the currently loaded mass spectrum. - /*! - - At the present time, only the first scan window is accounted for. - -*/ int m_scanWindowListCount = -1; //! Scan window lower limit, that is m/z range left border. diff -Nru msxpertsuite-5.3.2/minexpert/nongui/MassSpecDataFileLoaderSqlite3.cpp msxpertsuite-5.3.3/minexpert/nongui/MassSpecDataFileLoaderSqlite3.cpp --- msxpertsuite-5.3.2/minexpert/nongui/MassSpecDataFileLoaderSqlite3.cpp 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/minexpert/nongui/MassSpecDataFileLoaderSqlite3.cpp 2018-06-20 15:46:39.000000000 +0000 @@ -95,8 +95,8 @@ QSqlDatabase &database) { - // By asking the database to tell us if it has a value for driftBinCount - // in the metaData table we'll know if this database is for a mobility + // By asking the database to tell us if how many driftTime records it has in + // the driftData table we'll know if this database is for a mobility // drift time experiment. return handler.isDriftExperiment(database); diff -Nru msxpertsuite-5.3.2/minexpert/nongui/MassSpecSqlite3Handler.cpp msxpertsuite-5.3.3/minexpert/nongui/MassSpecSqlite3Handler.cpp --- msxpertsuite-5.3.2/minexpert/nongui/MassSpecSqlite3Handler.cpp 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/minexpert/nongui/MassSpecSqlite3Handler.cpp 2018-06-20 15:46:39.000000000 +0000 @@ -110,11 +110,6 @@ m_metaDataTableSpecifs.appendTableFieldSpecif(sqlTableFieldSpecifs); sqlTableFieldSpecifs = new SqlTableFieldSpecifs( - "metadata", "driftBinCount", FieldQtType::INT, FieldSqlType::INTEGER, - "number of drift time bins", "driftBinCount INTEGER"); - m_metaDataTableSpecifs.appendTableFieldSpecif(sqlTableFieldSpecifs); - - sqlTableFieldSpecifs = new SqlTableFieldSpecifs( "metadata", "compressionType", FieldQtType::INT, FieldSqlType::INTEGER, "compression type (1 for zlib)", "compressionType INTEGER"); m_metaDataTableSpecifs.appendTableFieldSpecif(sqlTableFieldSpecifs); @@ -355,10 +350,6 @@ "drift time", "driftTime FLOAT UNIQUE"); m_driftDataTableSpecifs.appendTableFieldSpecif(sqlTableFieldSpecifs); - sqlTableFieldSpecifs = new SqlTableFieldSpecifs( - "driftData", "driftBin", FieldQtType::INT, FieldSqlType::INTEGER, - "drift bin", "driftBin INTEGER UNIQUE"); - m_driftDataTableSpecifs.appendTableFieldSpecif(sqlTableFieldSpecifs); return true; } @@ -371,8 +362,6 @@ \param driftTime drift time value. - \param driftBin drift bin value. - \param recordId pointer to an int in which to store the id of the record generated by this writing operation. Cannot be nullptr. @@ -383,7 +372,7 @@ */ bool MassSpecSqlite3Handler::writeDbDriftData(QSqlDatabase &database, - double driftTime, int driftBin, int *recordId) + double driftTime, int *recordId) { if(recordId == Q_NULLPTR) qFatal("Fatal error at %s@%d. Program aborted.", __FILE__, __LINE__); @@ -395,7 +384,7 @@ // that it might happen that the mzML file contains // driftTime values like 'nan' or 'inf' (not yet understood why). - // In these cases we set driftTime and driftBin to -1, so that + // In these cases we set driftTime, so that // we can recognize these spectra later when working in the // database. @@ -409,19 +398,11 @@ __FILE__, __LINE__, __FUNCTION__); } - // else - //{ - // qDebug() << __FILE__ << __LINE__ - // << "driftTime to write is:" << driftTime; - //} - - // Look if the table has already an identical record. - // qDebug() << __FILE__ << __LINE__ - // << "writeDbDriftData: " - // << "driftTime: " << driftTime - // << "driftBin: " << driftBin; + qDebug() << __FILE__ << __LINE__ + << "writeDbDriftData: " + << "driftTime: " << driftTime; QSqlQuery *sqlQuery = new QSqlQuery(database); @@ -452,10 +433,9 @@ { // We need to create a new row in that driftData table: - sqlQuery->prepare("INSERT INTO driftData(driftTime,driftBin) " - "VALUES (:driftTime,:driftBin)"); + sqlQuery->prepare("INSERT INTO driftData(driftTime) " + "VALUES (:driftTime)"); sqlQuery->bindValue(":driftTime", driftTime); - sqlQuery->bindValue(":driftBin", driftBin); bool res = sqlQuery->exec(); @@ -465,9 +445,8 @@ QString error = sqlError.text(); qDebug() << __FILE__ << __LINE__ - << "Failed to store the driftTime/driftBin record " - << driftTime << "--" << driftBin << "in the " - << "driftData table. Error:" << error; + << "Failed to store the driftTime record " + << driftTime << "in the driftData table. Error:" << error; delete sqlQuery; @@ -497,9 +476,8 @@ QString error = sqlError.text(); qDebug() << __FILE__ << __LINE__ - << "Failed to store the driftTime/driftBin record " - << driftTime << "--" << driftBin << "in the " - << "driftData table. Error:" << error; + << "Failed to store the driftTime record " + << driftTime << "in the driftData table. Error:" << error; delete sqlQuery; @@ -1061,7 +1039,7 @@ // from metadata"; // metaData_id|fileName|acquisitionDate|spectrumListCount|driftTimeMin|driftTimeMax| // - // driftTimeStep|driftBinCount|compressionType + // driftTimeStep|compressionType // 1|/media/disk/devel/dataForMzml/mzml/file.mzml|2015.11.30|1200|0.0|10.7959|0.0542505|200|0 QSqlRecord sqlRecord = sqlQuery.record(); @@ -1278,9 +1256,8 @@ bool MassSpecSqlite3Handler::isDriftExperiment(QSqlDatabase &database) { - // By asking the database to tell us if it has a value for - // driftBinCount in the metaData table we'll know if this database is - // for a mobility drift time experiment. + // We can ask to know how many drift time values there are in the + // driftData table. if(!initializeDbForRead(database, false /* readMetaData */)) return false; @@ -1288,47 +1265,46 @@ QSqlQuery sqlQuery(database); bool ok = false; - QString queryString("SELECT driftBinCount from metaData"); + QString queryString("SELECT COUNT(*), driftTime FROM driftData"); + + ok = sqlQuery.exec(queryString); ok = sqlQuery.exec(queryString); if(!ok) { - QString msg = - QString("Failed to get proper data from the database. Error: %1. Exiting.\n") - .arg(sqlQuery.lastError().text()); - - qFatal("Fatal error at %s@%d -- %s: %s", + qFatal("Fatal error at %s@%d -- %s(). Error: %s." + "Failed to get proper data from the database.\n." + "Program aborted.", __FILE__, __LINE__, __FUNCTION__, - msg.toLatin1().data()); + sqlQuery.lastError().text().toLatin1().data()); } if(!sqlQuery.isActive()) - qFatal("Fatal error at %s@%d -- %s(). " - "The query failed: it is not active." - "Program aborted.", - __FILE__, __LINE__, __FUNCTION__); - - - if(!sqlQuery.isSelect()) - qFatal("Fatal error at %s@%d -- %s(). " - "The query failed: it is not a SELECT query." - "Program aborted.", - __FILE__, __LINE__, __FUNCTION__); + { + qFatal( + "Fatal error at %s@%d. The query is not active. Program aborted.", + __FILE__, __LINE__); + } + // Get the number of records that were retrieved, because we'll need this + // to provide feedback to the caller. if(!sqlQuery.first()) - qFatal("Fatal error at %s@%d -- %s(). " - "Failed to get proper data from the database. Error:%s." - "Program aborted.", - __FILE__, __LINE__, __FUNCTION__, - sqlQuery.lastError().text().toLatin1().data()); + { + qDebug() << __FILE__ << __LINE__ + << "Failed to get the number of records. Returning."; + } - int count = sqlQuery.value(0).toInt(&ok); + int recordCount = + sqlQuery.value(sqlQuery.record().indexOf("COUNT(*)")).toInt(); - if(!count) - return false; + //qDebug() << __FILE__ << __LINE__ + //<< "The recordCount:" << recordCount; - return true; + // Now reset the query + sqlQuery.finish(); + + return recordCount; } @@ -1489,12 +1465,6 @@ metaData.setDoubleItem("driftTimeStep", srcSqlQuery->value(fieldNo).toDouble()); - fieldNo = srcSqlQuery->record().indexOf("driftBinCount"); - - if(!srcSqlQuery->value(fieldNo).isNull()) - metaData.setDoubleItem("driftBinCount", - srcSqlQuery->value(fieldNo).toDouble()); - fieldNo = srcSqlQuery->record().indexOf("compressionType"); if(!srcSqlQuery->value(fieldNo).isNull()) @@ -1546,7 +1516,7 @@ if(srcSqlQuery == Q_NULLPTR) qFatal("Fatal error at %s@%d. Program aborted.", __FILE__, __LINE__); - QString srcDbQueryString = "SELECT driftTime, driftBin FROM driftData"; + QString srcDbQueryString = "SELECT driftTime FROM driftData"; bool ok = srcSqlQuery->exec(srcDbQueryString); @@ -1569,12 +1539,10 @@ } double driftTime; - int driftBin; while(srcSqlQuery->next()) { driftTime = srcSqlQuery->value(0).toDouble(); - driftBin = srcSqlQuery->value(1).toInt(); // Now that we have the values, we can INSERT these in the destination // database driftData table. Their order in the destination database @@ -1583,7 +1551,7 @@ int recordId; - if(!writeDbDriftData(dstDatabase, driftTime, driftBin, &recordId)) + if(!writeDbDriftData(dstDatabase, driftTime, &recordId)) qFatal("Fatal error at %s@%d. Program aborted.", __FILE__, __LINE__); } diff -Nru msxpertsuite-5.3.2/minexpert/nongui/MassSpecSqlite3Handler.hpp msxpertsuite-5.3.3/minexpert/nongui/MassSpecSqlite3Handler.hpp --- msxpertsuite-5.3.2/minexpert/nongui/MassSpecSqlite3Handler.hpp 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/minexpert/nongui/MassSpecSqlite3Handler.hpp 2018-06-20 15:46:39.000000000 +0000 @@ -127,7 +127,7 @@ bool createDriftDataTableSpecifs(); bool writeDbDriftData(QSqlDatabase &database, - double driftTime, int driftBin, int *recordId); + double driftTime, int *recordId); bool createSpectralDataTableSpecifs(); bool writeDbSpectralData(QSqlDatabase &database, diff -Nru msxpertsuite-5.3.2/minexpert/nongui/SavGolFilterJs.cpp msxpertsuite-5.3.3/minexpert/nongui/SavGolFilterJs.cpp --- msxpertsuite-5.3.2/minexpert/nongui/SavGolFilterJs.cpp 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/minexpert/nongui/SavGolFilterJs.cpp 2018-06-20 15:46:39.000000000 +0000 @@ -815,19 +815,21 @@ QScriptValue lDJSValue = ctx->argument(3); QScriptValue convolveWithNrJSValue = ctx->argument(4); - SavGolParams params{static_cast(nLJSValue.toNumber()), - static_cast(nRJSValue.toNumber()), - static_cast(mJSValue.toNumber()), - static_cast(lDJSValue.toNumber()), - convolveWithNrJSValue.toBoolean()}; + SavGolParams params; - return engine->toScriptValue(params); - } + params.nL = static_cast(nLJSValue.toNumber()); + params.nR = static_cast(nRJSValue.toNumber()); + params.m = static_cast(mJSValue.toNumber()); + params.lD = static_cast(lDJSValue.toNumber()); + params.convolveWithNr = convolveWithNrJSValue.toBoolean(); - SavGolParams params; return engine->toScriptValue(params); } + SavGolParams params; + return engine->toScriptValue(params); +} + } // namespace msXpSmineXpert diff -Nru msxpertsuite-5.3.2/minexpert/nongui/SavGolFilterJsPrototype.cpp msxpertsuite-5.3.3/minexpert/nongui/SavGolFilterJsPrototype.cpp --- msxpertsuite-5.3.2/minexpert/nongui/SavGolFilterJsPrototype.cpp 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/minexpert/nongui/SavGolFilterJsPrototype.cpp 2018-06-20 15:46:39.000000000 +0000 @@ -31,8 +31,6 @@ */ - - /////////////////////// Qt includes #include #include @@ -48,206 +46,213 @@ { - /*/js/ Class: SavGolFilter - */ - - - SavGolFilterJsPrototype::SavGolFilterJsPrototype(QObject *parent) - : QObject(parent) - { - //qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; - } - - - SavGolFilterJsPrototype::~SavGolFilterJsPrototype() - { - } - - - SavGolFilter * - SavGolFilterJsPrototype::thisSavGolFilter() const - { - //qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; - - SavGolFilter *savGolFilter = qscriptvalue_cast(thisObject().data()); - - if(savGolFilter == Q_NULLPTR) - qFatal("Fatal error at %s@%d -- %s. " - "thisSavGolFilter() would return Q_NULLPTR." - "Program aborted.", - __FILE__, __LINE__, __FUNCTION__); - - return savGolFilter; - } - - - - int - SavGolFilterJsPrototype::initialize() - { - //qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; - - // Depending on the various parameters, we will choose the proper - // initializing function. - - QScriptContext *ctx = context(); - int argCount = ctx->argumentCount(); - - //qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()" - //<< "argCount: " << argCount; - - if(argCount == 1) - { - return initializeOneArgument(); - } - else if(argCount == 5) - { - return initializeFiveArguments(); - } - - return -1; - } - - - // Return the number of arguments used for the initialization or -1 on error - int - SavGolFilterJsPrototype::initializeOneArgument() - { - //qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; - - QScriptContext *ctx = context(); - int argCount = ctx->argumentCount(); - - if(argCount != 1) - qFatal("Fatal error at %s@%d -- %s(). " - "Programming error." - "Program aborted.", - __FILE__, __LINE__, __FUNCTION__); - - // There is only one argument. We need to check the type of that argument - // and depending on that type choose the proper initializator. - - QScriptValue arg = ctx->argument(0); - - // The other single-arg initializations are with Trace or SavGolFilter. - - QVariant variant = arg.data().toVariant(); - - if(!variant.isValid()) - { - qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()" - << "Variant is not valid"; - - ctx->throwError("Syntax error: function takes a SavGolFilter object."); - - return -1; - } - - if(variant.userType() == QMetaType::type("msXpSmineXpert::SavGolFilter")) - { - SavGolFilter savGolFilter(qscriptvalue_cast(arg)); - - thisSavGolFilter()->initialize(savGolFilter); - - /*/js/ - * SavGolFilter.initialize(other) - * - * Initialize this SavGolFilter object with another - * object - * - * other: object used to initialize this object - */ - - return 1; - } - - return -1; - } - - - // Return the number of arguments used for the initialization or -1 on error. - int - SavGolFilterJsPrototype::initializeFiveArguments() - { - //qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; - - QScriptContext *ctx = context(); - int argCount = ctx->argumentCount(); - - if(argCount != 4) - qFatal("Fatal error at %s@%d -- %s(). " - "Programming error." - "Program aborted.", - __FILE__, __LINE__, __FUNCTION__); - - QScriptValue arg1 = ctx->argument(0); - QScriptValue arg2 = ctx->argument(1); - QScriptValue arg3 = ctx->argument(2); - QScriptValue arg4 = ctx->argument(3); - QScriptValue arg5 = ctx->argument(5); - - if(!arg1.isNumber() || !arg2.isNumber() - || !arg3.isNumber() || !arg4.isNumber() || !arg5.isBoolean()) - { - qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()" - << "One or more arguments is/are not of the Number or Boolean type."; - - ctx->throwError("Syntax error: expected Savitzky-Golay parameters, nL, nR, m, lD and convolveWithNr."); - - return -1; - } - - int nL = qscriptvalue_cast(arg1); - int nR = qscriptvalue_cast(arg2); - int m = qscriptvalue_cast(arg3); - int lD = qscriptvalue_cast(arg4); - bool convolveWithNr = qscriptvalue_cast(arg4); - - SavGolParams params{nL, nR, m, lD, convolveWithNr}; - - thisSavGolFilter()->initialize(params); - - /*/js/ - * SavGolFilter.initialize(nL, nR, m, lD, convolveWithNr) - * - * Initialize this SavGolFilter object with parameters to configure the - * SavGolParams member object - * - * nL: number of data points on the left of the point being filtered - * nR: number of data points on the right of the point being filtered - * m: order of the polynomial to use in the regression analysis - * leading to the Savitzky-Golay coefficients (typicall [2-6]) - * lD: order of the derivative to extract from the Savitzky-Golay - * smoothing algorithm (for regular smoothing, use 0); - * convolveWithNr: set to false for best results - */ - return 5; - } - - - - /*/js/ - * SavGolFilter.asText() - * - * Return a object containing a textual representation of all the - * member data of this SavGolFilter object. - */ - QString - SavGolFilterJsPrototype::asText() const - { - //qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; - - return thisSavGolFilter()->asText(); - } + /*/js/ Class: SavGolFilter + */ - QScriptValue - SavGolFilterJsPrototype::valueOf() const - { - //qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; + SavGolFilterJsPrototype::SavGolFilterJsPrototype(QObject *parent) + : QObject(parent) + { + // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; + } + + + SavGolFilterJsPrototype::~SavGolFilterJsPrototype() + { + } + + + SavGolFilter * + SavGolFilterJsPrototype::thisSavGolFilter() const + { + // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; + + SavGolFilter *savGolFilter = + qscriptvalue_cast(thisObject().data()); + + if(savGolFilter == Q_NULLPTR) + qFatal("Fatal error at %s@%d -- %s. " + "thisSavGolFilter() would return Q_NULLPTR." + "Program aborted.", + __FILE__, __LINE__, __FUNCTION__); + + return savGolFilter; + } + + + int + SavGolFilterJsPrototype::initialize() + { + // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; + + // Depending on the various parameters, we will choose the proper + // initializing function. + + QScriptContext *ctx = context(); + int argCount = ctx->argumentCount(); + + // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()" + //<< "argCount: " << argCount; + + if(argCount == 1) + { + return initializeOneArgument(); + } + else if(argCount == 5) + { + return initializeFiveArguments(); + } + + return -1; + } + + + // Return the number of arguments used for the initialization or -1 on error + int + SavGolFilterJsPrototype::initializeOneArgument() + { + // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; + + QScriptContext *ctx = context(); + int argCount = ctx->argumentCount(); + + if(argCount != 1) + qFatal("Fatal error at %s@%d -- %s(). " + "Programming error." + "Program aborted.", + __FILE__, __LINE__, __FUNCTION__); + + // There is only one argument. We need to check the type of that argument + // and depending on that type choose the proper initializator. + + QScriptValue arg = ctx->argument(0); + + // The other single-arg initializations are with Trace or SavGolFilter. + + QVariant variant = arg.data().toVariant(); + + if(!variant.isValid()) + { + qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()" + << "Variant is not valid"; + + ctx->throwError("Syntax error: function takes a SavGolFilter object."); + + return -1; + } + + if(variant.userType() == QMetaType::type("msXpSmineXpert::SavGolFilter")) + { + SavGolFilter savGolFilter(qscriptvalue_cast(arg)); + + thisSavGolFilter()->initialize(savGolFilter); + + /*/js/ + * SavGolFilter.initialize(other) + * + * Initialize this SavGolFilter object with another + * object + * + * other: object used to initialize this object + */ + + return 1; + } + + return -1; + } + + + // Return the number of arguments used for the initialization or -1 on error. + int + SavGolFilterJsPrototype::initializeFiveArguments() + { + // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; + + QScriptContext *ctx = context(); + int argCount = ctx->argumentCount(); + + if(argCount != 4) + qFatal("Fatal error at %s@%d -- %s(). " + "Programming error." + "Program aborted.", + __FILE__, __LINE__, __FUNCTION__); + + QScriptValue arg1 = ctx->argument(0); + QScriptValue arg2 = ctx->argument(1); + QScriptValue arg3 = ctx->argument(2); + QScriptValue arg4 = ctx->argument(3); + QScriptValue arg5 = ctx->argument(5); + + if(!arg1.isNumber() || !arg2.isNumber() || !arg3.isNumber() || + !arg4.isNumber() || !arg5.isBoolean()) + { + qDebug() + << __FILE__ << __LINE__ << __FUNCTION__ << "()" + << "One or more arguments is/are not of the Number or Boolean type."; + + ctx->throwError("Syntax error: expected Savitzky-Golay parameters, nL, " + "nR, m, lD and convolveWithNr."); + + return -1; + } + + int nL = qscriptvalue_cast(arg1); + int nR = qscriptvalue_cast(arg2); + int m = qscriptvalue_cast(arg3); + int lD = qscriptvalue_cast(arg4); + bool convolveWithNr = qscriptvalue_cast(arg4); + + SavGolParams params; + + params.nL = nL; + params.nR = nR; + params.m = m; + params.lD = lD; + params.convolveWithNr = convolveWithNr; + + thisSavGolFilter()->initialize(params); + + /*/js/ + * SavGolFilter.initialize(nL, nR, m, lD, convolveWithNr) + * + * Initialize this SavGolFilter object with parameters to configure the + * SavGolParams member object + * + * nL: number of data points on the left of the point being filtered + * nR: number of data points on the right of the point being filtered + * m: order of the polynomial to use in the regression analysis + * leading to the Savitzky-Golay coefficients (typicall [2-6]) + * lD: order of the derivative to extract from the Savitzky-Golay + * smoothing algorithm (for regular smoothing, use 0); + * convolveWithNr: set to false for best results + */ + return 5; + } + + + /*/js/ + * SavGolFilter.asText() + * + * Return a object containing a textual representation of all the + * member data of this SavGolFilter object. + */ + QString + SavGolFilterJsPrototype::asText() const + { + // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; + + return thisSavGolFilter()->asText(); + } + + + QScriptValue + SavGolFilterJsPrototype::valueOf() const + { + // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"; - return thisObject().data(); - } + return thisObject().data(); + } } // namespace msXpSmineXpert Binary files /tmp/tmp_lAHGL/j9XgMMLxkf/msxpertsuite-5.3.2/minexpert/user-manual/figures/splashscreen.png and /tmp/tmp_lAHGL/hm0q_wa7U_/msxpertsuite-5.3.3/minexpert/user-manual/figures/splashscreen.png differ diff -Nru msxpertsuite-5.3.2/minexpert/user-manual/Makefile msxpertsuite-5.3.3/minexpert/user-manual/Makefile --- msxpertsuite-5.3.2/minexpert/user-manual/Makefile 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/minexpert/user-manual/Makefile 2018-06-20 15:46:39.000000000 +0000 @@ -7,13 +7,13 @@ noreader: echo "make noreader" - -pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) && \ + pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) && \ pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) - -if [ -f $(PROJECT).idx ] ; \ + if [ -f $(PROJECT).idx ] ; \ then \ makeindex $(PROJECT).idx ; \ fi - -pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) && \ + pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) && \ pdflatex --interaction nonstopmode -halt-on-error -file-line-error $(PAPER) touch noreader diff -Nru msxpertsuite-5.3.2/minexpert/user-manual/msxpertsuite-macros.tex msxpertsuite-5.3.3/minexpert/user-manual/msxpertsuite-macros.tex --- msxpertsuite-5.3.2/minexpert/user-manual/msxpertsuite-macros.tex 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/minexpert/user-manual/msxpertsuite-macros.tex 2018-06-20 15:46:39.000000000 +0000 @@ -2,7 +2,7 @@ \newcommand{\msxpshrefbase}[2]{\href{http://www.msxpertsuite.org/#1}{#2}} %%% Version of the software suite -\newcommand{\ver}{5.3.2} +\newcommand{\ver}{5.3.3} \newcommand{\msXpsver}{\emph{msXpertSuite} version \ver} %%% msXpertSuite diff -Nru msxpertsuite-5.3.2/user-manual-common/texfiles/msxpertsuite-macros.tex msxpertsuite-5.3.3/user-manual-common/texfiles/msxpertsuite-macros.tex --- msxpertsuite-5.3.2/user-manual-common/texfiles/msxpertsuite-macros.tex 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/user-manual-common/texfiles/msxpertsuite-macros.tex 2018-06-20 15:46:39.000000000 +0000 @@ -2,7 +2,7 @@ \newcommand{\msxpshrefbase}[2]{\href{http://www.msxpertsuite.org/#1}{#2}} %%% Version of the software suite -\newcommand{\ver}{5.3.2} +\newcommand{\ver}{5.3.3} \newcommand{\msXpsver}{\emph{msXpertSuite} version \ver} %%% msXpertSuite diff -Nru msxpertsuite-5.3.2/winInstaller/msxpertsuite-mingw64-win7+.iss msxpertsuite-5.3.3/winInstaller/msxpertsuite-mingw64-win7+.iss --- msxpertsuite-5.3.2/winInstaller/msxpertsuite-mingw64-win7+.iss 2018-06-04 20:36:54.000000000 +0000 +++ msxpertsuite-5.3.3/winInstaller/msxpertsuite-mingw64-win7+.iss 2018-06-20 15:46:39.000000000 +0000 @@ -2,7 +2,7 @@ AppName=msXpertSuite ; Set version number below -#define public version "5.3.2" +#define public version "5.3.3" AppVersion={#version} #define public arch "mingw64"