class interface improvements (added tool functions for function plots)

This commit is contained in:
kriegerj 2015-10-08 14:46:47 +02:00
parent 18c05dd37b
commit bb98d3843e
2 changed files with 9 additions and 0 deletions

View File

@ -5320,6 +5320,13 @@ void JKQTPxFunctionLineGraph::set_params(const QVector<double> &params)
set_params(&iparams);
}
void JKQTPxFunctionLineGraph::set_copiedParams(const double *params, int N)
{
QVector<double> v;
for (int i=0; i<N; i++) { v<<params[i]; }
set_params(v);
}
void JKQTPxFunctionLineGraph::set_errorParams(const QVector<double> &errorParams)
{
ierrorparams=errorParams;

View File

@ -1562,6 +1562,8 @@ class LIB_EXPORT JKQTPxFunctionLineGraph: public JKQTPgraph {
JKQTPGET_SET_MACRO_I(void*, params, clearData())
/** \brief sets the params as a pointer to an internal COPY of the given vector (not the data of the vector, as then the size would be unknown!!!) */
void set_params(const QVector<double>& params);
/** \brief sets the params from a copy of the given array of length \a N */
void set_copiedParams(const double* params, int N);
inline void set_paramsV(double p1) {
QVector<double> p;
p<<p1;