D-Bus Interface

The D-Bus interface allows to control Kpl by other KDE applications and scripts.

A C++ example demo1.cpp for a KDE application using the D-Bus interface of Kpl is provided in the directory $KDEDIR/lib/qt5/plugins/kpl or $KDEDIR/lib64/qt5/plugins/kpl in case of 32 or 64 bit installations, respectively, together with a  cmake project file CMakeLists.txt. To compile it, copy these two files to some directory and run  cmake ./ and make there.

An example demo1.py for a Python script using the D-Bus interface of Kpl is also provided in that directory. It essentially does the same as the C++ example.

To test the D-Bus interface of Kpl you also can use the D-Bus utilities qdbus (command line) and qdbusviewer (GUI).

The D-Bus interface of Kpl provides the following functions:

newPlot

void newPlot();

Erases the current plot.

openPlot

bool openPlot(const QString& url);

Opens a plot file.

Parameters:

url

URL of the file.

Returns: true when succeeded.

openData

bool openData(const QString& url);

Opens a data file.

Parameters:

url

URL of the file.

Returns: true when succeeded.

savePlot

bool savePlot(const QString& url);

Saves a plot file.

Parameters:

url

URL of the file.

Returns: true when succeeded.

savePS

bool savePS(const QString& url,
            bool landscape);

Generates a PostScript file.

Parameters:

url

URL of the file.

landscape

true for landscape orientation.

Returns: true when succeeded.

exportImage

bool exportImage(const QString& url);

Exports as a PDF, PNG, PPM, BMP, JPEG, TIFF, or SVG image file.

Parameters:

url

URL of the file.

Returns: true when succeeded.

printPlot

bool printPlot(const QString& printerName,
               const QString& fileName,
               bool landscape,
               int numCopies);

Prints current plot.

Parameters:

printerName

name of the printer.

fileName

name of the output file (empty for output to printer).

landscape

true for landscape orientation.

numCopies

number of copies.

Returns: true when succeeded.

setAddFilesOption

void setAddFilesOption(bool add);

Sets add files option.

Parameters:

add

true to add plot and data files to existing plots.

setPathOption

void setPathOption(bool absolute);

Sets path saving option.

Parameters:

absolute

true to save absolute paths.

setBoundingBoxOption

void setBoundingBoxOption(bool calculate);

Sets calculate bounding box option.

Parameters:

calculate

true to calculate automatically the box.

setPageFormat

void setPageFormat(double w,
                   double h);

Sets page size.

Parameters:

w

width in cm.

h

height in cm.

setColors

void setColors(const QString& colFrame,
               const QString& colGrid,
               const QString& colData);

Sets default colors (hex-encoded RGB strings, example: "ff" for red).

Parameters:

colFrame

color for frame and labels.

colGrid

color for ticks and grid lines.

colData

color for lines and markers.

setOutputFormat

void setOutputFormat(const QString& pres,
                     int prec);

Sets format for numeric output.

Parameters:

pres

printf() presentation character.

prec

precision.

setAutoplot

void setAutoplot(double x0,
                 double w,
                 double y0,
                 double h,
                 int gridmode,
                 const QString& sx,
                 const QString& sy,
                 const QString& sh,
                 bool pathHeading,
                 int ix,
                 int iy,
                 int ie,
                 bool logx,
                 bool logy,
                 bool errbars,
                 int symb,
                 bool autoNorm,
                 bool autoFit,
                 double relSize);

Sets Autoplot options.

Parameters:

x0

left page margin in centimeters.

w

width of the data window in centimeters.

y0

bottom page margin in centimeters.

h

height of the data window in centimeters.

gridmode

0 for frame only, 1 for axes with tics, 2 for axes with tics and labels, 3 for grid, 4 for grid with labels.

sx

x axis text.

sy

y axis text.

sh

heading text.

pathHeading

true for heading = path.

ix

x column index.

iy

y column index.

ie

y error column index.

logx

true for logarithmic scaling of x axis.

logy

true for logarithmic scaling of y axis.

errbars

true to plot error bars.

symb

0 for circles, < 0 for different markers, > 0 for different line types.

autoNorm

true for automatic normalization.

autoFit

true for automatic parameter fit.

relSize

relative size of text, markers and lines.

setAutofit

void setAutofit(const QString& path,
                const QString& name,
                bool nonLin,
                bool errCol,
                const QString& errModPath,
                const QString& errModName,
                int itMax,
                double tol,
                int symb,
                const QString& color,
                bool showDlg,
                bool savePar,
                bool follow);

Sets Autofit parameters.

Parameters:

path

absolute path of the library for the fit function.

name

fit function name.

nonLin

true for nonlinear parameter fits.

errCol

true for data weighing by error column, false for weighing by error model function.

errModPath

absolute path of the library for the error model function.

errModName

error model function name.

itMax

maximum number of iterations (nonlinear fits only).

tol

tolerance level (nonlinear fits only).

symb

function plot: 0 for circles, < 0 for different markers,  > 0 for different line types.

color

color for function plot.

showDlg

true to display parameter fit dialog.

savePar

true to save resulting parameter files.

follow

true to follow parameter sets in fit series.

loadAutofitPar

bool loadAutofitPar(const QString& url);

Loads Autofit function parameters from file.

Parameters:

url

URL of the file.

Returns: true when succeeded.

setAutofitPar

bool setAutofitPar(int iPar,
                   double value);

Sets Autofit function parameter value.

Parameters:

iPar

parameter index.

value

parameter value.

Returns: true when succeeded.

enableFitPar

bool enableFitPar(int iPar,
                  bool fit);

Enables/disables (Auto)fit function parameter.

Parameters:

iPar

parameter index.

fit

true enables parameter fitting.

Returns: true when succeeded.

loadErrModPar

bool loadErrModPar(const QString& url,
                   int iArr);

Loads error model function parameters from file.

Parameters:

url

URL of the file.

iArr

array list index.

Returns: true when succeeded.

setErrModPar

bool setErrModPar(int iPar,
                  double value,
                  int iArr);

Sets error model function parameter value.

Parameters:

iPar

parameter index.

value

parameter value.

iArr

array list index.

Returns: true when succeeded.

deleteItem

bool deleteItem(int i);

Deletes plot item.

Parameters:

i

item index.

Returns: true when succeeded.

moveItem

bool moveItem(int is,
              int id);

Moves plot item.

Parameters:

is

source item index.

id

destination item index.

Returns: true when succeeded.

activateItem

bool activateItem(int i,
                  bool active);

Sets activation state of plot item.

Parameters:

i

item index.

active

true for visible item.

Returns: true when succeeded.

newFrameItem

void newFrameItem(double x0,
                  double w,
                  double y0,
                  double h,
                  double xmin,
                  double xmax,
                  double ymin,
                  double ymax,
                  bool logx,
                  bool logy,
                  int ndigx,
                  int ndigy,
                  const QString& colFrame,
                  const QString& colGrid,
                  double xtic,
                  double ytic,
                  int mticx,
                  int mticy,
                  int gridmode,
                  int iex,
                  int iey,
                  const QString& sx,
                  const QString& sy,
                  const QString& sh,
                  double relSize,
                  double xOff,
                  double yOff,
                  bool xBottom,
                  bool xTop,
                  bool yLeft,
                  bool yRight,
                  bool collapsed,
                  bool active);

Appends new frame item.

Parameters:

x0

left page margin in centimeters.

w

width in centimeters.

y0

bottom page margin in centimeters.

h

height in centimeters.

xmin

x value of left data window margin in user units.

xmax

x value of right data window margin in user units.

ymin

y value of bottom data window margin in user units.

ymax

y value of top window data margin in user units.

logx

true for logarithmic scaling of x axis.

logy

true for logarithmic scaling of y axis.

ndigx

number of digits for x axis.

ndigy

number of digits for y axis.

colFrame

color for frame and labels.

colGrid

color for grids and tics.

xtic

distance between major tics of x axis.

ytic

distance between major tics of y axis.

mticx

number of intervals between major tics of x axis.

mticy

number of intervals between major tics of y axis.

gridmode

0 for frame only, 1 for axes with tics, 2 for axes with tics and labels, 3 for grid, 4 for grid with labels.

iex

logarithm of normalization factor for x axis.

iey

logarithm of normalization factor for y axis.

sx

x axis text.

sy

y axis text.

sh

heading text.

relSize

relative size of text, markers and lines.

xOff

offset for first major x tic.

yOff

offset for first major y tic.

xBottom

true for x axis labels on bottom side.

xTop

true for x axis labels on top side.

yLeft

true for y axis labels on left side.

yRight

true for y axis labels on right side.

collapsed

true for collapsed in list view.

active

true for visible item.

newAutoFrameItem

void newAutoFrameItem();

Appends new frame item corresponding to the autoplot settings.

newArrayItem

bool newArrayItem(const QString& path,
                  int ix,
                  int iy,
                  int ie,
                  int istart,
                  int n,
                  bool errbars,
                  int type,
                  const QString& color,
                  double fx,
                  double fy,
                  int iDec,
                  int fillStyle,
                  double xOff,
                  double yOff,
                  double relSize,
                  bool active);

Appends new array item.

Parameters:

path

absolute path of the data file.

ix

x column index.

iy

y column index.

ie

y error column index.

istart

start row index.

n

number of data points.

errbars

true to plot error bars.

type

0 for circles, < 0 for different markers,  > 0 for different line types.

color

color for data plot.

fx

normalization factor for x values.

fy

normalization factor for y values.

iDec

0 for decimal point, 1 for comma.

fillStyle

> 0 for filled polygon representation.

xOff

offset for x values.

yOff

offset for y values.

relSize

relative size of lines or symbols.

active

true for visible item.

Returns: true when succeeded.

newFunItem

bool newFunItem(const QString& path,
                const QString& name,
                double xmin,
                double xmax,
                double dx,
                int type,
                const QString& color,
                double fx,
                double fy,
                int fillStyle,
                double xOff,
                double yOff,
                double relSize,
                bool active);

Appends new function item.

Parameters:

path

absolute path of the function library.

name

function name.

xmin

minimum argument value.

xmax

maximum argument value.

dx

argument stepsize.

type

0 for circles, < 0 for different markers,  > 0 for different line types.

color

color for function plot.

fx

normalization factor for x values.

fy

normalization factor for y values.

fillStyle

> 0 for filled polygon representation.

xOff

offset for x values.

yOff

offset for y values.

relSize

relative size of lines or symbols.

active

true for visible item.

Returns: true when succeeded.

newParFunItem

bool newParFunItem(const QString& pathx,
                   const QString& namex,
                   const QString& pathy,
                   const QString& namey,
                   double tmin,
                   double tmax,
                   double dt,
                   int type,
                   const QString& color,
                   double fx,
                   double fy,
                   int fillStyle,
                   double xOff,
                   double yOff,
                   double relSize,
                   bool active);

Appends new parametric function item.

Parameters:

pathx

absolute path of the x function library.

namex

x function name.

pathy

absolute path of the y function library.

namey

y function name.

tmin

minimum argument value.

tmax

maximum argument value.

dt

argument stepsize.

type

0 for circles, < 0 for different markers,  > 0 for different line types.

color

color for function plot.

fx

normalization factor for x values.

fy

normalization factor for y values.

fillStyle

> 0 for filled polygon representation.

xOff

offset for x values.

yOff

offset for y values.

relSize

relative size of lines or symbols.

active

true for visible item.

Returns: true when succeeded.

newSplineItem

void newSplineItem(int deriv,
                   double low,
                   double xmin,
                   double xmax,
                   double dx,
                   int type,
                   const QString& color,
                   double fx,
                   double fy,
                   int k,
                   int fillStyle,
                   double xOff,
                   double yOff,
                   double relSize,
                   bool active);

Appends new spline item.

Parameters:

deriv

order of the derivative, 0 for function itself, -1 for integral.

low

lower limit for spline integral.

xmin

minimum argument value.

xmax

maximum argument value.

dx

argument step size.

type

0 for circles, < 0 for different markers,  > 0 for different line types.

color

color for spline function plot.

fx

normalization factor for x values.

fy

normalization factor for y values.

k

degree of spline.

fillStyle

> 0 for filled polygon representation.

xOff

offset for x values.

yOff

offset for y values.

relSize

relative size of lines or symbols.

active

true for visible item.

newArray3DItem

bool newArray3DItem(double x0,
                    double w,
                    double y0,
                    double h,
                    double xmin,
                    double xmax,
                    double ymin,
                    double ymax,
                    double zmin,
                    double zmax,
                    bool logx,
                    bool logy,
                    bool logz,
                    int ndigx,
                    int ndigy,
                    int ndigz,
                    const QString& colFrame,
                    const QString& colGrid,
                    const QString& colData,
                    double xtic,
                    double ytic,
                    double ztic,
                    int mticx,
                    int mticy,
                    int mticz,
                    bool frame,
                    int gridmode,
                    int gridmode3D,
                    double xBox,
                    double yBox,
                    double zBox,
                    double xRef,
                    double yRef,
                    double phi,
                    double theta,
                    int iex,
                    int iey,
                    int iez,
                    const QString& sx,
                    const QString& sy,
                    const QString& sz,
                    const QString& sh,
                    double relSize,
                    const QString& path,
                    int ix,
                    int iy,
                    int iz,
                    int ie,
                    int istart,
                    int n,
                    bool errbars,
                    double smf,
                    double dx,
                    double dz,
                    double fx,
                    double fy,
                    double fz,
                    int iDec,
                    bool collapsed,
                    bool active);

Appends new 3D array item.

Parameters:

x0

left page margin in centimeters.

w

width in centimeters.

y0

bottom page margin in centimeters.

h

height in centimeters.

xmin

minimum x value.

xmax

maximum x value.

ymin

minimum y value.

ymax

maximum y value.

zmin

minimum z value.

zmax

maximum z value.

logx

true for logarithmic scaling of x axis.

logy

true for logarithmic scaling of y axis.

logz

true for logarithmic scaling of z axis.

ndigx

number of digits for x axis.

ndigy

number of digits for y axis.

ndigz

number of digits for z axis.

colFrame

color for frame and labels.

colGrid

color for tics.

colData

color for surface.

xtic

distance between major tics of x axis.

ytic

distance between major tics of y axis.

ztic

distance between major tics of z axis.

mticx

number of intervals between major tics of x axis.

mticy

number of intervals between major tics of y axis.

mticz

number of intervals between major tics of z axis.

frame

true to show frame.

gridmode

0 for frame only, 1 for axes with tics, 2 for axes with tics and labels.

gridmode3D

0 for lines parallel to x, 1 for lines parallel to z, 2 for grid.

xBox

x box width in cm.

yBox

y box width in cm.

zBox

z box width in cm.

xRef

x position of center of box bottom plane.

yRef

y position of center of box bottom plane.

phi

angle of rotation about y axis in deg.

theta

tilt angle of y axis in deg.

iex

logarithm of normalization factor for x axis.

iey

logarithm of normalization factor for y axis.

iez

logarithm of normalization factor for z axis.

sx

x axis text.

sy

y axis text.

sz

z axis text.

sh

heading text.

relSize

relative size of text and lines.

path

absolute path of the data file.

ix

x column index.

iy

y column index.

iz

z column index.

ie

y error column index.

istart

start row index.

n

number of data points.

errbars

true to use error bars for weighing y values.

smf

smoothing factor.

dx

x grid stepsize.

dz

z grid stepsize.

fx

normalization factor for x values.

fy

normalization factor for y values.

fz

normalization factor for z values.

iDec

0 for decimal point, 1 for comma.

collapsed

true for collapsed in list view.

active

true for visible item.

Returns: true when succeeded.

newFun3DItem

bool newFun3DItem(double x0,
                  double w,
                  double y0,
                  double h,
                  double xmin,
                  double xmax,
                  double ymin,
                  double ymax,
                  double zmin,
                  double zmax,
                  bool logx,
                  bool logy,
                  bool logz,
                  int ndigx,
                  int ndigy,
                  int ndigz,
                  const QString& colFrame,
                  const QString& colGrid,
                  const QString& colData,
                  double xtic,
                  double ytic,
                  double ztic,
                  int mticx,
                  int mticy,
                  int mticz,
                  bool frame,
                  int gridmode,
                  int gridmode3D,
                  double xBox,
                  double yBox,
                  double zBox,
                  double xRef,
                  double yRef,
                  double phi,
                  double theta,
                  int iex,
                  int iey,
                  int iez,
                  const QString& sx,
                  const QString& sy,
                  const QString& sz,
                  const QString& sh,
                  double relSize,
                  const QString& path,
                  const QString& name,
                  double dx,
                  double dz,
                  double fx,
                  double fy,
                  double fz,
                  bool collapsed,
                  bool active);

Appends new 3D function item.

Parameters:

x0

left page margin in centimeters.

w

width in centimeters.

y0

bottom page margin in centimeters.

h

height in centimeters.

xmin

minimum x value.

xmax

maximum x value.

ymin

minimum y value.

ymax

maximum y value.

zmin

minimum z value.

zmax

maximum z value.

logx

true for logarithmic scaling of x axis.

logy

true for logarithmic scaling of y axis.

logz

true for logarithmic scaling of z axis.

ndigx

number of digits for x axis.

ndigy

number of digits for y axis.

ndigz

number of digits for z axis.

colFrame

color for frame and labels.

colGrid

color for tics.

colData

color for surface.

xtic

distance between major tics of x axis.

ytic

distance between major tics of y axis.

ztic

distance between major tics of z axis.

mticx

number of intervals between major tics of x axis.

mticy

number of intervals between major tics of y axis.

mticz

number of intervals between major tics of z axis.

frame

true to show frame.

gridmode

0 for frame only, 1 for axes with tics, 2 for axes with tics and labels.

gridmode3D

0 for lines parallel to x, 1 for lines parallel to z, 2 for grid.

xBox

x box width in cm.

yBox

y box width in cm.

zBox

z box width in cm.

xRef

x position of center of box bottom plane.

yRef

y position of center of box bottom plane.

phi

angle of rotation about y axis in deg.

theta

tilt angle of y axis in deg.

iex

logarithm of normalization factor for x axis.

iey

logarithm of normalization factor for y axis.

iez

logarithm of normalization factor for z axis.

sx

x axis text.

sy

y axis text.

sz

z axis text.

sh

heading text.

relSize

relative size of text and lines.

path

absolute path of the function library.

name

function name.

dx

x argument stepsize.

dz

z argument stepsize.

fx

normalization factor for x values.

fy

normalization factor for y values.

fz

normalization factor for z values.

collapsed

true for collapsed in list view.

active

true for visible item.

Returns: true when succeeded.

newImageItem

void newImageItem(const QString& path,
                  double x,
                  double y,
                  double fx,
                  double fy,
                  double dir,
                  bool active);

Appends new image item.

Parameters:

path

absolute path of the EPS file.

x

x position in cm.

y

y position in cm.

fx

horizontal scaling factor.

fy

vertical scaling factor.

dir

rotation angle in degree.

active

true for visible item.

newLegendItem

void newLegendItem(int type,
                   const QString& colSymb,
                   double x,
                   double y,
                   const QString& text,
                   const QString& colText,
                   double xoff,
                   double yoff,
                   double relSize,
                   double symbolSize,
                   bool active);

Appends new legend item.

Parameters:

type

0 for circles, < 0 for different markers,  > 0 for different line types.

colSymb

color for marker or line.

x

x position in cm.

y

y position in cm.

text

legend text.

colText

color for text.

xoff

x offset for text in cm.

yoff

y offset for text in cm.

relSize

relative size of text.

symbolSize

relative size of symbol.

active

true for visible item.

newTextItem

void newTextItem(const QString& text,
                 const QString& color,
                 int align,
                 double x,
                 double y,
                 double dir,
                 double relSize,
                 bool active);

Appends new text item.

Parameters:

text

text.

color

color for text.

align

1: left aligned, 2: centered, 3: right aligned.

x

x position in cm.

y

y position in cm.

dir

direction in degree.

relSize

relative size of text.

active

true for visible item.

newLineItem

void newLineItem(int type,
                 const QString& color,
                 double x,
                 double y,
                 double dir,
                 double len,
                 double relSize,
                 bool active);

Appends new line item.

Parameters:

type

1 to 9 for different line types.

color

color for line.

x

x start position in cm.

y

y start position in cm.

dir

direction in degree.

len

length in cm.

relSize

relative width.

active

true for visible item.

newArrowItem

void newArrowItem(int type,
                  const QString& color,
                  double x,
                  double y,
                  double dir,
                  double len,
                  double relSize,
                  bool doubleHeaded,
                  bool active);

Appends new arrow item.

Parameters:

type

1 to 9 for different line types.

color

color for arrow.

x

x position of head in cm.

y

y position of head in cm.

dir

direction in degree.

len

length in cm.

relSize

relative width.

doubleHeaded

true for doubleheaded arrow.

active

true for visible item.

Returns: true when succeeded.

newArcItem

void newArcItem(int type,
                const QString& color,
                double x,
                double y,
                double w,
                double h,
                double start,
                double span,
                double relSize,
                double dir,
                bool active);

Appends new elliptic arc item.

Parameters:

type

1 to 9 for different line types.

color

color of the arc.

x

x position of center in cm.

y

y position of center in cm.

w

width of ellipse in cm.

h

height of ellipse in cm.

start

start angle in degree.

span

length in degree.

relSize

relative line width.

dir

rotation angle in degree.

active

true for visible item.

newRectangleItem

void newRectangleItem(int type,
                      const QString& color,
                      double x,
                      double y,
                      double w,
                      double h,
                      double relSize,
                      int fillStyle,
                      double dir,
                      bool active);

Appends new rectangle item.

Parameters:

type

1 to 9 for different line types.

color

color of the rectangle.

x

x position of left side in cm.

y

y position of bottom side in cm.

w

width in cm.

h

height in cm.

relSize

relative line width.

fillStyle

> 0 for filled polygon representation.

dir

rotation angle in degree.

active

true for visible item.

newEllipseItem

void newEllipseItem(int type,
                    const QString& color,
                    double x,
                    double y,
                    double w,
                    double h,
                    double relSize,
                    int fillStyle,
                    double dir,
                    bool active);

Appends new ellipse item.

Parameters:

type

1 to 9 for different line types.

color

color of the ellipse.

x

x position of center in cm.

y

y position of center in cm.

w

width in cm.

h

height in cm.

relSize

relative line width.

fillStyle

> 0 for filled ellipse representation.

dir

rotation angle in degree.

active

true for visible item.

newScaleBarItem

void newScaleBarItem(const QString& str,
                     const QString& color,
                     double x,
                     double y,
                     double len,
                     double relSize,
                     bool vertical,
                     bool active);

Appends new scale bar item.

Parameters:

str

Text.

color

color of the scale bar.

x

x position in cm.

y

y position in cm.

len

length in cm.

relSize

relative line width.

vertical

false for horizontal, true for vertical.

active

true for visible item.

autoScaleFrame

bool autoScaleFrame(int i,
                    bool autoNorm);

Scales frame automatically according to all items belonging to it.

Parameters:

i

index of frame item.

autoNorm

true for additional automatic normalization.

Returns: true when succeeded.

loadPar

bool loadPar(const QString& url,
             int i,
             bool yFun);

Loads set of function parameters from file.

Parameter:

url

URL of file.

i

Index of function item.

yFun

true for y function parameters, false for x function parameters (only for parametric functions).

Returns: true when succeeded.

setPar

bool setPar(int i,
            int iPar,
            double value,
            bool yFun);

Sets value of a function parameter.

Parameter:

i

index of function item.

iPar

index of parameter.

value

value of parameter.

yFun

true for y function parameters, false for x function parameters (only for parametric functions).

Returns: true when succeeded.

setArrayRange

bool setArrayRange(int i,
                   int iStart,
                   int n);

Sets range of rows of an array.

Parameter:

i

Index of array item.

iStart

start index of rows.

n

number of data points.

Returns: true when succeeded.

addFitItems

bool addFitItems(bool erase,
                 int iArr,
                 int iFun,
                 bool errCol,
                 const QString& errModPath,
                 const QString& errModName);

Adds array and function items to a list for (multidimensional) parameter fits.

Parameter:

erase

true: clears list first.

iArr

index of array item.

iFun

index of function item.

errCol

true for weighing of data points by error column, false for weighing by error model function.

errModPath

absolute path of library containing the error model function.

errModName

name of the error model function.

Returns: true when succeeded.

addFunFitItem

bool addFunFitItem(int iFun);

Adds a function item to a list for (multidimensional) parameter fits.

Parameter:

iFun

index of function item.

Returns: true when succeeded.

fit

bool fit(bool nonLin,
         bool savePar,
         bool follow);

Performs parameter fit.

Parameters:

nonLin

true for nonlinear parameter fits.

savePar

true to save resulting parameter files.

follow

true to follow parameter sets in fit series.

Returns: true when succeeded.

addSplineFitItem

bool addSplineFitItem(bool erase,
                      int iSpl);

Adds a spline item to a list for spline fitting.

Parameter:

erase

true: clears list first.

iSpl

index of spline item.

Returns: true when succeeded.

splineFit

bool splineFit(int iArr,
               int deg,
               double smf,
               double xmin,
               double xmax,
               bool errCol,
               const QString& errModPath,
               const QString& errModName);

Performs smoothing spline fit.

Parameters:

iArr

array item index.

deg

degree of spline.

smf

smoothing factor.

xmin

lower boundary of approximation interval.

xmax

upper boundary of approximation interval.

errCol

true for data weighing by error column, false for weighing by error model function.

errModPath

absolute path of the library for the error model function.

errModName

error model function name.

Returns: true when succeeded.

chiSquare

double chiSquare();

Returns chi-square of last fit.

Returns: chi-square.

saveFitPar

bool saveFitPar(const QString& url);

Saves parameters and their errors resulting from a fit to a file.

Parameters:

url

URL of the file.

Returns: true when succeeded.

exportValues

bool exportValues(const QString& url,
                  int iItem);

Exports function value table as text file.

Parameters:

url

URL of the file.

iItem

item index.

Returns: true when succeeded.