FitModelHandler.h
Go to the documentation of this file.
/***************************************************************************
File : FitModelHandler.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2007 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : An XML handler for the Fit class
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef FITMODELHANDLER_H
#define FITMODELHANDLER_H
#include <QXmlDefaultHandler>
#include <QVarLengthArray>
class Fit;
class FitModelHandler : public QXmlDefaultHandler
{
public:
FitModelHandler(Fit *fit);
bool startElement(const QString &namespaceURI, const QString &localName,
const QString &qName, const QXmlAttributes &attributes);
bool endElement(const QString &namespaceURI, const QString &localName,
const QString &qName);
bool characters(const QString &str);
bool fatalError(const QXmlParseException &){return false;};
QString errorString() const;
private:
Fit* d_fit;
bool metFitTag;
QString currentText;
QString errorStr;
QString d_formula;
QStringList d_parameters;
QStringList d_explanations;
QVarLengthArray<double> d_values;
};
#endif
FitModelHandler::errorString
QString errorString() const
Definition: FitModelHandler.cpp:94
FitModelHandler::errorStr
QString errorStr
Definition: FitModelHandler.h:54
FitModelHandler::startElement
bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &attributes)
Definition: FitModelHandler.cpp:40
FitModelHandler::currentText
QString currentText
Definition: FitModelHandler.h:53
FitModelHandler::d_fit
Fit * d_fit
Definition: FitModelHandler.h:51
FitModelHandler::d_parameters
QStringList d_parameters
Definition: FitModelHandler.h:56
FitModelHandler::FitModelHandler
FitModelHandler(Fit *fit)
Definition: FitModelHandler.cpp:34
FitModelHandler
Definition: FitModelHandler.h:37
FitModelHandler::fatalError
bool fatalError(const QXmlParseException &)
Definition: FitModelHandler.h:47
Fit
Fit base class.
Definition: Fit.h:44
FitModelHandler::characters
bool characters(const QString &str)
Definition: FitModelHandler.cpp:88
FitModelHandler::metFitTag
bool metFitTag
Definition: FitModelHandler.h:52
FitModelHandler::d_values
QVarLengthArray< double > d_values
Definition: FitModelHandler.h:58
FitModelHandler::d_explanations
QStringList d_explanations
Definition: FitModelHandler.h:57
FitModelHandler::d_formula
QString d_formula
Definition: FitModelHandler.h:55
FitModelHandler::endElement
bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Definition: FitModelHandler.cpp:63