1
/* vim: set filetype=cpp : */
2
/* due to a limitation of sip, this file has to use Unix style line endings */
3
/***************************************************************************
6
Description : Specifications for Python bindings
7
--------------------------------------------------------------------
8
Copyright : (C) 2006-2009 Knut Franke (knut.franke*gmx.de)
9
Copyright : (C) 2008-2009 Tilman Benkert (thzs*gmx.net)
10
Copyright : (C) 2006-2007 Ion Vasilief (ion_vasilief*yahoo.fr)
11
(replace * with @ in the email addresses)
13
***************************************************************************/
15
/***************************************************************************
17
* This program is free software; you can redistribute it and/or modify *
18
* it under the terms of the GNU General Public License as published by *
19
* the Free Software Foundation; either version 2 of the License, or *
20
* (at your option) any later version. *
22
* This program is distributed in the hope that it will be useful, *
23
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
24
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
25
* GNU General Public License for more details. *
27
* You should have received a copy of the GNU General Public License *
28
* along with this program; if not, write to the Free Software *
29
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
30
* Boston, MA 02110-1301 USA *
32
***************************************************************************/
35
%Import QtCore/QtCoremod.sip
36
%Import QtGui/QtGuimod.sip
38
class AbstractAspect : QObject
41
#include "core/AbstractAspect.h"
45
AbstractAspect(const QString &name);
46
AbstractAspect * parentAspect() const;
47
// future::Folder * folder();
48
bool isDescendantOf(AbstractAspect *other);
49
void addChild(AbstractAspect* child /Transfer/);
50
void insertChild(AbstractAspect *child /Transfer/, int index);
51
void removeChild(AbstractAspect* child, bool detach=false);
52
void removeChild(int index);
53
AbstractAspect* child(int index) const;
54
int childCount() const;
55
int indexOfChild(const AbstractAspect * child) const;
59
void moveChild(int from, int to);
60
void reparentChild(AbstractAspect *new_parent, AbstractAspect *child, int d_new_index);
61
void reparentChild(AbstractAspect *new_parent, AbstractAspect *child);
62
QList<AbstractAspect *> descendantsThatInherit(const char *class_name);
63
void removeAllChildAspects();
64
// const Project *project() const;
65
// Project *project();
70
QMenu *createContextMenu() const;
73
QString comment() const;
74
QString captionSpec() const;
75
QDateTime creationTime() const;
76
QString caption() const;
78
QUndoStack *undoStack() const;
79
void exec(QUndoCommand *command);
80
void beginMacro(const QString& text);
82
static QVariant global(const QString &key);
83
static void setGlobal(const QString &key, const QVariant &value);
84
static void setGlobalDefault(const QString &key, const QVariant &value);
85
// void save(QXmlStreamWriter *) const;
86
// bool load(XmlStreamReader *);
89
void setName(const QString &value);
90
void setComment(const QString &value);
91
void setCaptionSpec(const QString &value);
94
QString uniqueNameFor(const QString ¤t_name) const;
97
void aspectDescriptionAboutToChange(const AbstractAspect *aspect);
98
void aspectDescriptionChanged(const AbstractAspect *aspect);
99
void aspectAboutToBeAdded(const AbstractAspect *parent, int index);
100
void aspectAdded(const AbstractAspect *aspect);
101
void aspectAdded(const AbstractAspect *parent, int index);
102
void aspectAboutToBeRemoved(const AbstractAspect *aspect);
103
void aspectAboutToBeRemoved(const AbstractAspect *parent, int index);
104
void aspectRemoved(const AbstractAspect *parent, int index);
105
void statusInfo(const QString &text);
107
AbstractAspect(const AbstractAspect&);
110
class Column: AbstractAspect
114
#include "core/column/Column.h"
115
#include "table/future_Table.h"
118
/* will be removed in favour of columMode() - don't encourage anyone to start using it
119
SIP_PYOBJECT dataType() const;
121
int mode = sipCpp->dataType();
122
sipRes = PyString_FromString(SciDAVis::enumValueToString(mode, "ColumnDataType"));
125
SIP_PYOBJECT columnMode() const;
127
int mode = sipCpp->columnMode();
128
sipRes = PyString_FromString(SciDAVis::enumValueToString(mode, "ColumnMode"));
130
void setColumnMode(QString mode);
132
int mode_code = SciDAVis::enumStringToValue(*a0, "ColumnMode");
134
sipCpp->setColumnMode((SciDAVis::ColumnMode)mode_code);
136
bool copy(const Column * other);
137
bool copy(const Column * source, int source_start, int dest_start, int num_rows);
138
int rowCount() const;
139
void insertRows(int before, int count);
140
void removeRows(int first, int count);
141
SIP_PYOBJECT plotDesignation() const;
143
int pd = sipCpp->plotDesignation();
144
sipRes = PyString_FromString(SciDAVis::enumValueToString(pd, "PlotDesignation"));
146
void setPlotDesignation(QString pd);
148
int mode_code = SciDAVis::enumStringToValue(*a0, "PlotDesignation");
150
sipCpp->setPlotDesignation((SciDAVis::PlotDesignation)mode_code);
153
bool isInvalid(int row) const;
154
// bool isMasked(int row) const;
155
void clearValidity();
156
// void clearMasks();
157
void setInvalid(int row, bool invalid = true);
158
// void setMasked(int row, bool mask = true);
159
QString formula(int row) const;
160
void setFormula(int row, QString formula);
161
void clearFormulas();
162
QString textAt(int row) const;
163
void setTextAt(int row, const QString& new_value);
164
void replaceTexts(int first, const QStringList& new_values);
165
QDate dateAt(int row) const;
166
void setDateAt(int row, const QDate& new_value);
167
QTime timeAt(int row) const;
168
void setTimeAt(int row, const QTime& new_value);
169
QDateTime dateTimeAt(int row) const;
170
void setDateTimeAt(int row, const QDateTime& new_value);
171
void replaceDateTimes(int first, const QList<QDateTime>& new_values);
172
double valueAt(int row) const;
173
void setValueAt(int row, double new_value);
174
void replaceValues(int first, const QVector<double>& new_values);
176
Column * x() const /NoDerived/;
178
future::Table *t = qobject_cast<future::Table *>(sipCpp->parentAspect());
180
sipRes = t->column(t->colX(t->indexOfChild(sipCpp)));
183
Column * y() const /NoDerived/;
185
future::Table *t = qobject_cast<future::Table *>(sipCpp->parentAspect());
187
sipRes = t->column(t->colY(t->indexOfChild(sipCpp)));
192
Column(const Column&);
195
class ScriptEdit: QTextEdit
198
#include "src/ScriptEdit.h"
205
void insertFunction(const QString &);
207
ScriptEdit(ScriptEdit&);
210
class MyWidget: QWidget /PyName=MDIWindow/
213
#include "src/MyWidget.h"
214
#include "src/ApplicationWindow.h"
217
enum CaptionPolicy{Name = 0, Label = 1, Both = 2};
219
SIP_PYOBJECT windowLabel();
221
sipRes = PyString_FromString(sipCpp->windowLabel());
223
void setWindowLabel(const QString&);
226
void setName(const QString& s);
228
ApplicationWindow *app = sipscidavis_app();
229
if (app) app->renameWindow(sipCpp, *a0);
232
MyWidget *clone() /NoDerived/;
234
ApplicationWindow *app = sipscidavis_app();
235
if (app) sipRes = app->clone(sipCpp);
238
CaptionPolicy captionPolicy();
239
void setCaptionPolicy(CaptionPolicy);
241
// not usable as is - doesn't yield a valid template file,
242
// geometry info has to be supplied by user, doesn't work on graphs (where it's most
245
virtual SIP_PYOBJECT saveAsTemplate(const QString& );
247
sipRes = PyString_FromString(sipCpp->saveAsTemplate(*a0));
250
// same issues as with saveAsTemplate
252
virtual void restore(const QStringList& );
256
void askOnCloseEvent(bool)/PyName=confirmClose/;
259
MyWidget(const MyWidget&);
264
class Table: MyWidget
267
#include "src/Table.h"
269
#define CHECK_TABLE_COL(arg)\
271
if (PyInt_Check(arg)) {\
272
col = (int)PyInt_AsLong(arg) - 1;\
273
if (col < 0 || col >= sipCpp->numCols()) {\
275
PyErr_Format(PyExc_ValueError, "There's no column %d in table %s!", col+1, sipCpp->name().toAscii().constData());\
278
PyObject *tmp = PyObject_Str(arg);\
281
PyErr_Format(PyExc_TypeError, "Column argument must be either int or string.");\
283
col = sipCpp->colNames().indexOf(PyString_AsString(tmp));\
286
PyErr_Format(PyExc_ValueError, "There's no column named %s in table %s!", PyString_AsString(tmp),\
287
sipCpp->name().toAscii().constData());\
292
#define CHECK_TABLE_ROW(arg)\
294
if (row < 0 || row >= sipCpp->numRows()) {\
296
PyErr_Format(PyExc_ValueError, "There's no row %d in table %s!", row+1, sipCpp->name().toAscii().constData());\
306
void setNumRows(int);
307
void setNumCols(int);
308
Column * column(int index) const;
309
Column * column(const QString & name) const;
311
Column * __getitem__(int index) const /NoDerived/;
313
sipRes = sipCpp->column(a0);
316
Column * __getitem__(const QString &name) const /NoDerived/;
318
sipRes = sipCpp->column(*a0);
321
SIP_PYOBJECT text(SIP_PYOBJECT, int) /Deprecated/;
327
PyObject *encstr = PyString_FromString(sipCpp->text(row, col).utf8());
329
sipRes = PyUnicode_FromEncodedObject(encstr, "utf8", 0);
337
double cell(SIP_PYOBJECT, int) /Deprecated/;
343
sipRes = sipCpp->cell(row, col);
345
void setText(SIP_PYOBJECT, int, const QString&) /Deprecated/;
351
sipCpp->setText(row, col, *a2);
353
void setCell(SIP_PYOBJECT, int, double) /Deprecated/;
359
sipCpp->setCell(row, col, a2);
361
SIP_PYOBJECT colName(int) /Deprecated/;
363
if (a0 < 1 || a0 > sipCpp->numCols()) {\
365
PyErr_SetString(PyExc_ValueError, "Invalid column argument");\
367
sipRes = PyString_FromString(sipCpp->colLabel(a0-1));
369
void setColName(SIP_PYOBJECT, const QString&) /Deprecated/;
374
sipCpp->setColName(col, *a1);
376
void notifyChanges() /Deprecated/;
378
void importASCII(const QString&, const QString&="\t", int=0, bool=false, bool=true, bool=false, bool=false);
379
bool exportASCII(const QString&, const QString&="\t", bool=false, bool=false);
380
void normalize(SIP_PYOBJECT) /NoDerived/;
385
sipCpp->d_future_table->normalizeColumns(QList< Column* >() << sipCpp->column(col));
387
void normalize() /NoDerived/;
389
QList< Column* > cols;
390
for (int i=0; i<sipCpp->numCols(); i++)
391
cols << sipCpp->column(i);
392
sipCpp->d_future_table->normalizeColumns(cols);
395
void sortColumn(SIP_PYOBJECT, int order = 0) /NoDerived/;
400
sipCpp->d_future_table->sortColumns(0, QList<Column*>() << sipCpp->column(col), a1==0);
402
void sort(int type = 0, int order = 0, const QString& leadCol = QString()) /NoDerived/;
406
lead = 0; // sort separately
408
lead = sipCpp->column(*a2);
409
QList< Column* > cols;
410
for (int i=0; i<sipCpp->numCols(); i++)
411
cols << sipCpp->column(i);
412
sipCpp->d_future_table->sortColumns(lead, cols, a1==0);
414
void sortColumns(SIP_PYTUPLE, int=0, int=0, const QString&=QString());
418
lead = 0; // sort separately
420
lead = sipCpp->column(*a3);
421
QList< Column* > cols;
422
int n = PyTuple_Size(a0);
423
for (int i=0; i<n; i++) {
424
PyObject *str = PyObject_Str(PyTuple_GET_ITEM(a0,i));
426
cols << sipCpp->column(PyString_AsString(str));
433
sipCpp->d_future_table->sortColumns(lead, cols, a2==0);
435
void setCommand(SIP_PYOBJECT, const QString&) /Deprecated/;
440
sipCpp->setCommand(col, *a1);
443
void setComment(SIP_PYOBJECT, const QString&) /Deprecated/;
448
sipCpp->setColComment(col, *a1);
455
class Matrix: MyWidget
458
#include "src/Matrix.h"
459
#define CHECK_MATRIX_COL(arg)\
461
if (col < 0 || col >= sipCpp->numCols()) {\
463
PyErr_Format(PyExc_ValueError, "There's no column %d in matrix %s!", col+1, sipCpp->name().toAscii().constData());\
465
#define CHECK_MATRIX_ROW(arg)\
467
if (row < 0 || row >= sipCpp->numRows()) {\
469
PyErr_Format(PyExc_ValueError, "There's no row %d in matrix %s!", row+1, sipCpp->name().toAscii().constData());\
474
void setNumRows(int);
476
void setNumCols(int);
477
void setDimensions(int rows, int cols);
479
SIP_PYOBJECT text(int, int);
482
CHECK_MATRIX_ROW(a0);
483
CHECK_MATRIX_COL(a1);
485
sipRes = PyString_FromString(sipCpp->text(row, col));
487
double cell(int, int);
490
CHECK_MATRIX_ROW(a0);
491
CHECK_MATRIX_COL(a1);
493
sipRes = sipCpp->cell(row, col);
495
void setText(int, int, const QString&);
498
CHECK_MATRIX_ROW(a0);
499
CHECK_MATRIX_COL(a1);
501
sipCpp->setText(row, col, *a2);
503
void setCell(int, int, double);
506
CHECK_MATRIX_ROW(a0);
507
CHECK_MATRIX_COL(a1);
509
sipCpp->setCell(row, col, a2);
516
void setCoordinates(double xs, double xe, double ys, double ye);
518
void setFormula(const QString &s);
521
void setNumericPrecision(int prec);
525
double determinant();
528
Matrix(const Matrix&);
531
class ArrowMarker // : QwtPlotMarker
534
#include "src/ArrowMarker.h"
540
void setStartPoint(double, double) /PyName=setStart/;
541
void setEndPoint(double, double) /PyName=setEnd/;
543
void setStyle(Qt::PenStyle);
544
void setColor(const QColor&);
546
void drawStartArrow(bool = true);
547
void drawEndArrow(bool = true);
548
void setHeadLength(int);
549
void setHeadAngle(int);
550
void fillArrowHead(bool = true);
553
ArrowMarker(const ArrowMarker&);
556
class ImageMarker // : QwtPlotMarker
559
#include "src/ImageMarker.h"
563
ImageMarker(const QString&);
567
void setSize(int, int);
569
void setBoundingRect(double, double, double, double) /PyName=setCoordinates/;
572
ImageMarker(const ImageMarker&);
575
class Legend // : QwtPlotMarker
578
#include "src/Legend.h"
582
void setText(const QString&);
583
void setTextColor(const QColor&);
584
void setFrameStyle(int);
585
void setBackgroundColor(const QColor&);
586
void setFont(const QFont&);
587
void setOriginCoord(double, double);
590
Legend(const Legend&);
596
#include <qwt_symbol.h>
597
#include "ColorBox.h"
624
QwtSymbol(Style st, const QBrush &bd, const QPen &pn, const QSize &s);
626
virtual QwtSymbol *clone() const;
628
void setSize(const QSize &s);
629
void setSize(int a, int b = -1);
630
void setBrush(const QBrush& b);
631
void setPen(const QPen &p);
632
void setStyle (Style s);
634
const QBrush& brush() const;
635
const QPen& pen() const;
636
const QSize& size() const;
639
// convenience methods for scripting
641
void setColor(const QColor& color) /NoDerived/;
643
QPen pen = sipCpp->pen();
646
QBrush brush = sipCpp->brush();
648
sipCpp->setBrush(brush);
650
void setColor(int color) /NoDerived/;
652
QPen pen = sipCpp->pen();
653
pen.setColor(ColorBox::color(a0));
655
QBrush brush = sipCpp->brush();
656
brush.setColor(ColorBox::color(a0));
657
sipCpp->setBrush(brush);
659
void setOutlineColor(const QColor& color) /NoDerived/;
661
QPen pen = sipCpp->pen();
665
void setOutlineColor(int color) /NoDerived/;
667
QPen pen = sipCpp->pen();
668
pen.setColor(ColorBox::color(a0));
671
void setFillColor(const QColor& color) /NoDerived/;
673
QBrush brush = sipCpp->brush();
675
sipCpp->setBrush(brush);
677
void setFillColor(int color) /NoDerived/;
679
QBrush brush = sipCpp->brush();
680
brush.setColor(ColorBox::color(a0));
681
sipCpp->setBrush(brush);
685
QwtSymbol(const QwtSymbol&);
691
#include <qwt_plot_curve.h>
695
int dataSize() const;
696
double x(int i) const;
697
double y(int i) const;
698
double minXValue() const;
699
double maxXValue() const;
700
double minYValue() const;
701
double maxYValue() const;
703
void setPen(const QPen &);
704
const QPen &pen() const;
706
void setBrush(const QBrush &);
707
const QBrush &brush() const;
709
void setSymbol(const QwtSymbol &s);
710
const QwtSymbol& symbol() const;
712
// convenience methods for scripting
714
void setColor(const QColor& color) /NoDerived/;
716
QPen pen = sipCpp->pen();
719
QBrush brush = sipCpp->brush();
721
sipCpp->setBrush(brush);
723
void setColor(int color) /NoDerived/;
725
QPen pen = sipCpp->pen();
726
pen.setColor(ColorBox::color(a0));
728
QBrush brush = sipCpp->brush();
729
brush.setColor(ColorBox::color(a0));
730
sipCpp->setBrush(brush);
732
void setOutlineColor(const QColor& color) /NoDerived/;
734
QPen pen = sipCpp->pen();
738
void setOutlineColor(int color) /NoDerived/;
740
QPen pen = sipCpp->pen();
741
pen.setColor(ColorBox::color(a0));
744
void setFillColor(const QColor& color) /NoDerived/;
746
QBrush brush = sipCpp->brush();
748
sipCpp->setBrush(brush);
750
void setFillColor(int color) /NoDerived/;
752
QBrush brush = sipCpp->brush();
753
brush.setColor(ColorBox::color(a0));
754
sipCpp->setBrush(brush);
756
void setFillStyle(Qt::BrushStyle style) /NoDerived/;
758
QBrush brush = sipCpp->brush();
760
sipCpp->setBrush(brush);
764
QwtPlotCurve(const QwtPlotCurve&);
769
#include <qwt_plot.h>
782
QwtPlot(const QwtPlot&);
788
#include "src/Grid.h"
791
void enableX(bool) /PyName=setXMajor/;
792
bool xEnabled() /PyName=xMajor/;
794
void enableY(bool) /PyName=setYMajor/;
795
bool yEnabled() /PyName=yMajor/;
797
void enableXMin(bool) /PyName=setXMinor/;
798
bool xMinEnabled() /PyName=xMinor/;
800
void enableYMin(bool) /PyName=setYMinor/;
801
bool yMinEnabled() /PyName=yMinor/;
803
void enableZeroLineX(bool enable = true) /PyName=setXZeroLine/;
804
bool xZeroLineEnabled() /PyName=xZeroLine/;
806
void enableZeroLineY(bool enable = true) /PyName=setYZeroLine/;
807
bool yZeroLineEnabled() /PyName=yZeroLine/;
809
void setMajPenX(const QPen &p) /PyName=setXMajorPen/;
810
const QPen& majPenX() const /PyName=xMajorPen/;
812
void setMinPenX(const QPen &p) /PyName=setXMinorPen/;
813
const QPen& minPenX() const /PyName=xMinorPen/;
815
void setMajPenY(const QPen &p) /PyName=setYMajorPen/;
816
const QPen& majPenY() const /PyName=yMajorPen/;
818
void setMinPenY(const QPen &p) /PyName=setYMinorPen/;
819
const QPen& minPenY() const /PyName=yMinorPen/;
821
void setMajor(bool) /NoDerived/;
827
void setMinor(bool) /NoDerived/;
829
sipCpp->enableXMin(a0);
830
sipCpp->enableYMin(a0);
833
void setMajorPen(const QPen &p) /NoDerived/;
835
sipCpp->setMajPenX(*a0);
836
sipCpp->setMajPenY(*a0);
838
void setMinorPen(const QPen &p) /NoDerived/;
840
sipCpp->setMinPenX(*a0);
841
sipCpp->setMinPenY(*a0);
847
class Graph : QWidget /PyName=Layer/
850
#include "src/Graph.h"
851
#include "src/Legend.h"
852
#include "src/ColorBox.h"
853
#include "src/FunctionCurve.h"
854
#include "src/DataPointPicker.h"
855
#include <qwt_plot_canvas.h>
859
SIP_PYOBJECT pieLegendText() /PyName=pieLegend/;
861
sipRes = PyString_FromString(sipCpp->pieLegendText());
864
bool insertCurve(Table*, const QString&, int=1, int color=-1) /NoDerived/;
866
if (sipCpp->insertCurve(a0, *a1, a2)) {
867
CurveLayout cl = sipCpp->initCurveLayout(a2, 1);
873
sipCpp->updateCurveLayout(sipCpp->curves()-1, &cl);
878
bool insertCurve(Table*, const QString&, const QString&, int=1, int color=-1);
880
if (sipCpp->insertCurve(a0, *a1, *a2, a3)) {
881
CurveLayout cl = sipCpp->initCurveLayout(a3, 1);
887
sipCpp->updateCurveLayout(sipCpp->curves()-1, &cl);
892
bool insertFunctionCurve(const QString &formula, double from=0, double to=1, int points=100,
893
const QString &title = QString::null) /NoDerived/;
895
ApplicationWindow *app = sipscidavis_app();
897
sipRes = sipCpp->addFunctionCurve(app, FunctionCurve::Normal, QStringList() << *a0, "x",
898
QList<double>() << a1 << a2, a3, *a4);
902
bool insertPolarCurve(const QString &radial, const QString &angular,
903
double from=0, double to=2*M_PI, const QString ¶meter="t", int points=100,
904
const QString &title = QString::null) /NoDerived/;
906
ApplicationWindow *app = sipscidavis_app();
908
sipRes = sipCpp->addFunctionCurve(app, FunctionCurve::Polar, QStringList() << *a0 << *a1,
909
*a4, QList<double>() << a2 << a3, a5, *a6);
913
bool insertParametricCurve(const QString &x, const QString &y,
914
double from=0, double to=1, const QString ¶meter="t", int points=100,
915
const QString &title =QString::null) /NoDerived/;
917
ApplicationWindow *app = sipscidavis_app();
919
sipRes = sipCpp->addFunctionCurve(app, FunctionCurve::Parametric, QStringList() << *a0 << *a1,
920
*a4, QList<double>() << a2 << a3, a5, *a6);
925
void removeCurve(int);
926
void removeCurve(const QString&);
927
void deleteFitCurves();
928
int curves() /PyName=numCurves/;
929
QList<QwtPlotCurve*> curves() const /NoDerived/;
931
sipRes = new QList<QwtPlotCurve*>();
932
for (int i = 0; i<sipCpp->curves(); i++)
933
sipRes->append(sipCpp->curve(i));
935
void showCurve(int index, bool visible=true);
937
QwtPlotCurve* curve(int index);
938
QwtPlotCurve* curve(const QString &title);
940
void addErrorBars(const QString&, Table *, const QString&,
941
int type = 1, int width = 1, int cap = 8, const QColor& color = QColor(Qt::black),
942
bool through = true, bool minus = true, bool plus = true);
944
void addArrow(ArrowMarker*);
946
ImageMarker* addImage(ImageMarker*);
947
ImageMarker* addImage(const QString& fileName);
949
void setTitle(const QString& t);
951
Legend* newLegend(const QString&);
952
void setLegend(const QString&) /NoDerived/;
954
sipCpp->legend()->setText(*a0);
962
void enableAxis(int axis, bool on = true);
963
void setXAxisTitle(const QString& text) /PyName=setXTitle/;
964
void setYAxisTitle(const QString& text) /PyName=setYTitle/;
965
void setRightAxisTitle(const QString &text) /PyName=setRightTitle/;
966
void setTopAxisTitle(const QString &text) /PyName=setTopTitle/;
968
void setLabelsNumericFormat(int axis, int format, int = 6, const QString& = QString()) /PyName=setAxisNumericFormat/;
969
void setScale(int axis, double start, double end, double step = 0.0,
970
int majorTicks = 5, int minorTicks = 5, int type = 0, bool inverted = false);
973
void setFrame(int width = 1, const QColor& color = QColor(Qt::black));
974
void setBackgroundColor(const QColor& color);
975
void setCanvasBackground(const QColor& color) /PyName=setCanvasColor/;
982
void print() /PyName=printDialog/;
983
void exportImage(const QString& fileName, int quality = 100, bool transparent = false);
984
void exportVector(const QString& fileName, int res = 0, bool color = true,
985
bool keepAspect = true, QPrinter::PageSize pageSize = QPrinter::Custom);
986
void exportToFile(const QString& fileName) /PyName=export/;
988
void enableAutoscaling(bool = true);
989
void setIgnoreResizeEvents(bool = true)/PyName=setIgnoreResize/;
990
void setAutoscaleFonts(bool = true);
991
void setAntialiasing(bool on = true, bool update = true);
993
QWidget * canvas() const /NoDerived/;
995
sipRes = sipCpp->d_plot->canvas();
998
QPointF pickPoint() const /NoDerived/;
1000
ApplicationWindow *app = sipscidavis_app();
1001
sipRes = new QPointF();
1003
*sipRes = DataPointPicker(sipCpp, app).pick();
1007
Graph(const Graph&);
1010
class MultiLayer : MyWidget /PyName=Graph/
1013
#include "src/MultiLayer.h"
1016
Graph *activeGraph() /PyName=activeLayer/;
1017
void setActiveGraph(Graph*) /PyName=setActiveLayer/;
1018
int layers() /PyName=numLayers/;
1019
QWidgetList layerWidgets() const /PyName=layers/;
1020
Graph* layer(int num);
1021
Graph* addLayer(int = 0, int = 0, int = 0, int = 0);
1023
sipRes = sipCpp->addLayer(a0, a1, a2, a3);
1024
ApplicationWindow *app = sipscidavis_app();
1025
if (app) app->setPreferences(sipRes);
1030
void setSpacing (int, int);
1031
void setMargins (int, int, int, int);
1032
void setLayerCanvasSize (int, int);
1034
sipCpp->setLayerCanvasSize(a0, a1);
1035
sipCpp->arrangeLayers(true, true);
1037
// for backwards-compatibility
1038
void setAlignement (int, int);
1039
void setAlignement (int, int) /PyName=setAlignment/;
1040
void arrangeLayers(bool fit = true) /NoDerived/;
1042
sipCpp->arrangeLayers(a0, false);
1044
// for backwards-compatibility
1045
void arrangeLayers(bool fit, bool user_size);
1047
void exportToFile(const QString& fileName) /PyName=export/;
1048
void exportImage(const QString& fileName, int quality = 100, bool transparent = false);
1049
void exportVector(const QString& fileName, int res = 0, bool color = true,
1050
bool keepAspect = true, QPrinter::PageSize pageSize = QPrinter::Custom);
1052
void print() /PyName=printDialog/;
1054
MultiLayer(const MultiLayer&);
1057
class Note: MyWidget
1060
#include "src/Note.h"
1063
// TODO: Calling execute()/executeAll() from Python currently doesn't work reliably!
1066
bool autoexec() const;
1067
void setAutoexec(bool);
1069
void setText(const QString &s);
1070
QString exportASCII(const QString &file);
1071
QString importASCII(const QString &file);
1076
class ApplicationWindow: QMainWindow
1079
#include "src/ApplicationWindow.h"
1080
#include "src/ColorBox.h"
1081
#include <qwt_symbol.h>
1083
%ConvertToSubClassCode
1084
// we have to do this to override casting in qt/qobject.sip
1085
// without this, app.windows() returns Tables as QWidgets (strangely, Notes
1086
// are returned correctly in any case)
1087
sipClass = sipFindClass(sipCpp->className());
1091
Table* table(const QString&);
1093
sipRes = sipCpp->current_folder->table(*a0, false);
1095
sipRes = sipCpp->projectFolder()->table(*a0, true);
1098
Table* newTable(const QString&, int=2, int=30);
1100
sipRes = sipCpp->newTable(a2, a1, *a0);
1102
Matrix* matrix(const QString&);
1104
sipRes = sipCpp->current_folder->matrix(*a0, false);
1106
sipRes = sipCpp->projectFolder()->matrix(*a0, true);
1108
Matrix* newMatrix();
1109
Matrix* newMatrix(const QString&, int=32, int=32);
1110
MultiLayer *plot(const QString&) /PyName=graph/;
1112
sipRes = sipCpp->current_folder->graph(*a0, false);
1114
sipRes = sipCpp->projectFolder()->graph(*a0, true);
1116
MultiLayer* newGraph();
1117
MultiLayer* newGraph(const QString &name);
1119
// Code copied from ApplicationWindow::newGraph() and modified to actually use the requested
1120
// name if it is already unique.
1121
if (sipCpp->alreadyUsedName(*a0))
1122
sipRes = sipCpp->multilayerPlot(sipCpp->generateUniqueName(*a0));
1124
sipRes = sipCpp->multilayerPlot(*a0);
1126
Graph *g = sipRes->addLayer();
1127
sipCpp->setPreferences(g);
1129
g->setAutoscaleFonts(false);
1130
g->setIgnoreResizeEvents(false);
1131
sipRes->arrangeLayers(false, false);
1132
sipRes->adjustSize();
1133
g->setAutoscaleFonts(sipCpp->autoScaleFonts);//restore user defined fonts behaviour
1134
g->setIgnoreResizeEvents(!sipCpp->autoResizeLayers);
1135
sipCpp->customMenu(sipRes);
1138
Note *note(const QString&);
1140
sipRes = sipCpp->current_folder->note(*a0, false);
1142
sipRes = sipCpp->projectFolder()->note(*a0, true);
1144
// TODO: If name is already taken, this chooses a default name like "Notes1",
1145
// which is inconsistent with newTable, newMatrix and newGraph. Not changing in
1146
// a bugfix release though, since an unexpected change in behaviour may be even
1147
// more confusing than the inconsistency.
1148
Note* newNote(const QString& = QString::null);
1149
MultiLayer *plot(Table*, SIP_PYTUPLE, int style=1, int color=-1) /NoDerived/;
1152
int n = PyTuple_Size(a1);
1153
for (int i=0; i<n; i++) {
1154
PyObject *str = PyObject_Str(PyTuple_GET_ITEM(a1,i));
1156
l << PyString_AsString(str);
1165
PyErr_Format(PyExc_ValueError, "Invalid table in argument to plot().");
1167
sipRes = sipCpp->multilayerPlot(a0, l, a2);
1168
if (sipRes && sipRes->activeGraph() && a3 >= 0) {
1169
for (int c =0; c < sipRes->activeGraph()->curves(); c++) {
1170
QwtPlotCurve *curve = sipRes->activeGraph()->curve(c);
1171
QPen pen = curve->pen();
1172
pen.setColor(ColorBox::color(a3));
1174
QwtSymbol symbol = curve->symbol();
1176
pen.setColor(ColorBox::color(a3));
1178
QBrush brush = symbol.brush();
1179
brush.setColor(ColorBox::color(a3));
1180
symbol.setBrush(brush);
1181
curve->setSymbol(symbol);
1186
MultiLayer *plot(Table*, const QString&, int style=1, int color=-1) /NoDerived/;
1190
PyErr_Format(PyExc_ValueError, "Invalid table in argument to plot().");
1194
sipRes = sipCpp->multilayerPlot(a0, l, a2);
1196
QwtPlotCurve * c = sipRes->activeGraph()->curve(0);
1197
QPen pen = c->pen();
1198
pen.setColor(ColorBox::color(a3));
1200
QwtSymbol symbol = c->symbol();
1202
pen.setColor(ColorBox::color(a3));
1204
QBrush brush = symbol.brush();
1205
brush.setColor(ColorBox::color(a3));
1206
symbol.setBrush(brush);
1207
c->setSymbol(symbol);
1212
Matrix* importImage();
1213
Matrix* importImage(const QString&);
1214
MultiLayer* plotContour(Matrix*);
1215
MultiLayer* plotColorMap(Matrix*);
1216
MultiLayer* plotGrayScale(Matrix*);
1218
QWidgetList *windowsList() /PyName=windows/;
1221
// QTextEdit *console;
1224
Folder *activeFolder() /NoDerived/;
1226
sipRes = sipCpp->current_folder;
1228
void saveFolder(Folder *folder, const QString& fn) /Deprecated/;
1229
Folder* projectFolder() /PyName=rootFolder/;
1231
void renameWindow(MyWidget *, const QString &) /Deprecated/;
1233
// Prior to SciDAVis 0.2.4, it was necessary to call this on a layer created using
1234
// Graph.addLayer() if you wanted the layer to be intialized correctly. This is now
1235
// done automatically as part of addLayer(); doing so again doesn't hurt, but is not necessary
1237
void setPreferences(Graph*) /Deprecated/;
1239
MyWidget* clone(MyWidget*) /Deprecated/;
1242
ApplicationWindow(const ApplicationWindow&);
1248
#include "src/Fit.h"
1251
enum Algorithm{ScaledLevenbergMarquardt, UnscaledLevenbergMarquardt, NelderMeadSimplex};
1252
enum ErrorSource {UnknownErrors, AssociatedErrors, PoissonErrors, CustomErrors};
1254
Fit(ApplicationWindow* /TransferThis/, Graph*=0, const char*=0);
1259
bool setYErrorSource(ErrorSource err, const QString& colName = QString::null);
1261
bool setDataFromCurve(const QString&, Graph*=0);
1263
bool setDataFromCurve(const QString&, double, double, Graph*=0) /Deprecated/;
1265
void setInterval(double from, double to);
1268
int numParameters();
1270
void setInitialGuess(int, double) /PyName=setInitialValue/;
1271
void setInitialGuesses(...) /PyName=setInitialValues/;
1273
int n = PyTuple_GET_SIZE(a0);
1274
double *values = new double[n];
1275
for (int i=0; i<n; i++) {
1276
PyObject *item = PyTuple_GET_ITEM(a0, i);
1277
if (PyNumber_Check(item)) {
1278
item=PyNumber_Float(item);
1283
values[i] = PyFloat_AS_DOUBLE(item);
1288
sipCpp->setInitialGuesses(values);
1292
virtual void guessInitialValues();
1294
void setAlgorithm(Algorithm);
1296
void setTolerance(double);
1300
// inconsistent with other setColor() methods and accepts only colors from the palette,
1301
// in contrast to what one would expect
1302
void setColor(const QString&) /Deprecated/;
1304
void setOutputPrecision(int);
1306
void generateFunction(bool, int=100);
1308
void setMaximumIterations(int);
1312
virtual QString legendInfo();
1314
void scaleErrors(bool yes = true);
1316
SIP_PYTUPLE results();
1318
double *results = sipCpp->results();
1319
int size=sipCpp->numParameters();
1320
sipRes = PyTuple_New(size);
1323
for(int i=0; i<size; i++)
1324
PyTuple_SET_ITEM(sipRes, i, PyFloat_FromDouble(results[i]));
1329
SIP_PYTUPLE errors();
1331
double *errors = sipCpp->errors();
1332
int size=sipCpp->numParameters();
1333
sipRes = PyTuple_New(size);
1336
for(int i=0; i<size; i++)
1337
PyTuple_SET_ITEM(sipRes, i, PyFloat_FromDouble(errors[i]));
1342
//! Returns the sum of squares of the residuals from the best-fit line
1345
Table* parametersTable(const QString&);
1346
Matrix* covarianceMatrix(const QString&);
1350
ApplicationWindow *sipscidavis_app()
1353
PyObject *me = PyImport_ImportModule("scidavis");
1354
PyObject *mydict = PyModule_GetDict(me);
1355
PyObject *pyapp = PyDict_GetItemString(mydict,"app");
1357
if (sipCanConvertToInstance(pyapp, sipClass_ApplicationWindow, SIP_NOT_NONE))
1358
return (ApplicationWindow*) sipConvertToInstance(pyapp, sipClass_ApplicationWindow, NULL, SIP_NOT_NONE, NULL, &iserr);
1364
class ApplicationWindow;
1365
ApplicationWindow *sipscidavis_app();
1366
#define SIPSCIDAVIS_APP(sipcppexpr)\
1367
ApplicationWindow *app = sipscidavis_app();\
1368
if (app) sipCpp = sipcppexpr;\
1369
else { sipCpp = NULL; }
1372
class ExponentialFit : Fit
1375
#include "src/ExponentialFit.h"
1378
ExponentialFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, bool=false);
1379
ExponentialFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double, bool=false);
1380
ExponentialFit(Graph *, const QString&, bool=false) /NoDerived/;
1382
SIPSCIDAVIS_APP(new sipExponentialFit(app, a0, *a1, a2))
1384
ExponentialFit(Graph *, const QString&, double, double, bool=false) /NoDerived/;
1386
SIPSCIDAVIS_APP(new sipExponentialFit(app, a0, *a1, a2, a3, a4))
1390
class TwoExpFit : Fit
1393
#include "src/ExponentialFit.h"
1396
TwoExpFit(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1397
TwoExpFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1398
TwoExpFit(Graph *, const QString&) /NoDerived/;
1400
SIPSCIDAVIS_APP(new sipTwoExpFit(app, a0, *a1))
1402
TwoExpFit(Graph *, const QString&, double, double) /NoDerived/;
1404
SIPSCIDAVIS_APP(new sipTwoExpFit(app, a0, *a1, a2, a3))
1408
class ThreeExpFit : Fit
1411
#include "src/ExponentialFit.h"
1414
ThreeExpFit(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1415
ThreeExpFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1416
ThreeExpFit(Graph *, const QString&) /NoDerived/;
1418
SIPSCIDAVIS_APP(new sipThreeExpFit(app, a0, *a1))
1420
ThreeExpFit(Graph *, const QString&, double, double) /NoDerived/;
1422
SIPSCIDAVIS_APP(new sipThreeExpFit(app, a0, *a1, a2, a3))
1426
class SigmoidalFit : Fit
1429
#include "src/SigmoidalFit.h"
1432
SigmoidalFit(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1433
SigmoidalFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1434
SigmoidalFit(Graph *, const QString&) /NoDerived/;
1436
SIPSCIDAVIS_APP(new sipSigmoidalFit(app, a0, *a1))
1438
SigmoidalFit(Graph *, const QString&, double, double) /NoDerived/;
1440
SIPSCIDAVIS_APP(new sipSigmoidalFit(app, a0, *a1, a2, a3))
1444
class GaussAmpFit : Fit
1447
#include "src/MultiPeakFit.h"
1450
GaussAmpFit(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1451
GaussAmpFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1452
GaussAmpFit(Graph *, const QString&) /NoDerived/;
1454
SIPSCIDAVIS_APP(new sipGaussAmpFit(app, a0, *a1))
1456
GaussAmpFit(Graph *, const QString&, double, double) /NoDerived/;
1458
SIPSCIDAVIS_APP(new sipGaussAmpFit(app, a0, *a1, a2, a3))
1462
class NonLinearFit : Fit
1465
#include "src/NonLinearFit.h"
1468
NonLinearFit(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1469
NonLinearFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1470
NonLinearFit(Graph *, const QString&) /NoDerived/;
1472
SIPSCIDAVIS_APP(new sipNonLinearFit(app, a0, *a1))
1474
NonLinearFit(Graph *, const QString&, double, double) /NoDerived/;
1476
SIPSCIDAVIS_APP(new sipNonLinearFit(app, a0, *a1, a2, a3))
1478
void setParametersList(...) /PyName=setParameters/;
1482
for (int i=0; i<PyTuple_GET_SIZE(a0); i++)
1483
if (item = PyString_AsString(PyTuple_GET_ITEM(a0, i)))
1487
sipCpp->setParametersList(l);
1489
// TODO: make it accept Python callables
1490
void setFormula(const QString&);
1493
class PluginFit : Fit
1496
#include "src/PluginFit.h"
1499
PluginFit(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1500
PluginFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1501
PluginFit(Graph *, const QString&) /NoDerived/;
1503
SIPSCIDAVIS_APP(new sipPluginFit(app, a0, *a1))
1505
PluginFit(Graph *, const QString&, double, double) /NoDerived/;
1507
SIPSCIDAVIS_APP(new sipPluginFit(app, a0, *a1, a2, a3))
1509
bool load(const QString&);
1512
class MultiPeakFit : Fit
1515
#include "src/MultiPeakFit.h"
1518
enum PeakProfile{Gauss, Lorentz};
1519
MultiPeakFit(ApplicationWindow * /TransferThis/, Graph *, PeakProfile=Gauss, int=1);
1521
int peaks() /PyName=numPeaks/;
1522
void setNumPeaks(int);
1524
void enablePeakCurves(bool);
1525
void setPeakCurvesColor(int);
1527
static QString generateFormula(int, PeakProfile);
1528
static QStringList generateParameterList(int);
1531
class LorentzFit : MultiPeakFit
1534
#include "src/MultiPeakFit.h"
1537
LorentzFit(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1538
LorentzFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1539
LorentzFit(Graph *, const QString&) /NoDerived/;
1541
SIPSCIDAVIS_APP(new sipLorentzFit(app, a0, *a1))
1543
LorentzFit(Graph *, const QString&, int, int) /NoDerived/;
1545
SIPSCIDAVIS_APP(new sipLorentzFit(app, a0, *a1, a2, a3))
1549
class GaussFit : MultiPeakFit
1552
#include "src/MultiPeakFit.h"
1555
GaussFit(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1556
GaussFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1557
GaussFit(Graph *, const QString&) /NoDerived/;
1559
SIPSCIDAVIS_APP(new sipGaussFit(app, a0, *a1))
1561
GaussFit(Graph *, const QString&, double, double) /NoDerived/;
1563
SIPSCIDAVIS_APP(new sipGaussFit(app, a0, *a1, a2, a3))
1567
class PolynomialFit : Fit
1570
#include "src/PolynomialFit.h"
1573
PolynomialFit(ApplicationWindow * /TransferThis/, Graph *, QString&, int=2, bool=false);
1574
PolynomialFit(ApplicationWindow * /TransferThis/, Graph *, QString&, int, int, int=2, bool=false);
1575
PolynomialFit(Graph *, QString&, int=2, bool=false) /NoDerived/;
1577
SIPSCIDAVIS_APP(new sipPolynomialFit(app, a0, *a1, a2, a3))
1579
PolynomialFit(Graph *, QString&, int, int, int=2, bool=false) /NoDerived/;
1581
SIPSCIDAVIS_APP(new sipPolynomialFit(app, a0, *a1, a2, a3, a4, a5))
1584
virtual QString legendInfo();
1587
static QString generateFormula(int);
1588
static QStringList generateParameterList(int);
1591
class LinearFit : Fit
1594
#include "src/PolynomialFit.h"
1597
LinearFit(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1598
LinearFit(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1599
LinearFit(Graph *, const QString&) /NoDerived/;
1601
SIPSCIDAVIS_APP(new sipLinearFit(app, a0, *a1))
1603
LinearFit(Graph *, const QString&, double, double) /NoDerived/;
1605
SIPSCIDAVIS_APP(new sipLinearFit(app, a0, *a1, a2, a3))
1610
class Filter : QObject
1613
#include "src/Filter.h"
1616
Filter(ApplicationWindow* /TransferThis/, Graph*=0, const char*=0);
1619
void setOutputPoints(int);
1622
void setColor(const QString&);
1627
class Differentiation : Filter
1630
#include "src/Differentiation.h"
1633
Differentiation(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1634
Differentiation(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1635
Differentiation(Graph *, const QString&) /NoDerived/;
1637
SIPSCIDAVIS_APP(new sipDifferentiation(app, a0, *a1))
1639
Differentiation(Graph *, const QString&, double, double) /NoDerived/;
1641
SIPSCIDAVIS_APP(new sipDifferentiation(app, a0, *a1, a2, a3))
1646
class Integration : Filter
1649
#include "src/Integration.h"
1652
Integration(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1653
Integration(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double);
1654
Integration(Graph *, const QString&) /NoDerived/;
1656
SIPSCIDAVIS_APP(new sipIntegration(app, a0, *a1))
1658
Integration(Graph *, const QString&, double, double) /NoDerived/;
1660
SIPSCIDAVIS_APP(new sipIntegration(app, a0, *a1, a2, a3))
1663
enum InterpolationMethod{Linear, Cubic, Akima};
1664
InterpolationMethod method();
1665
void setMethod(InterpolationMethod method);
1670
class Interpolation : Filter
1673
#include "src/Interpolation.h"
1676
enum InterpolationMethod{Linear, Cubic, Akima};
1678
Interpolation(ApplicationWindow * /TransferThis/, Graph *, const QString&, int=0);
1679
Interpolation(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double, int=0);
1680
Interpolation(Graph *, const QString&, int=0) /NoDerived/;
1682
SIPSCIDAVIS_APP(new sipInterpolation(app, a0, *a1, a2))
1684
Interpolation(Graph *, const QString&, double, double, int=0) /NoDerived/;
1686
SIPSCIDAVIS_APP(new sipInterpolation(app, a0, *a1, a2, a3, a4))
1689
void setMethod(int n);
1690
void setMethod(InterpolationMethod m /Constrained/);
1694
class SmoothFilter : Filter
1697
#include "src/SmoothFilter.h"
1700
enum SmoothMethod{SavitzkyGolay = 1, FFT = 2, Average = 3};
1702
SmoothFilter(ApplicationWindow * /TransferThis/, Graph *, const QString&, int=3);
1703
SmoothFilter(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double, int=3);
1704
SmoothFilter(Graph *, const QString&, int=3) /NoDerived/;
1706
SIPSCIDAVIS_APP(new sipSmoothFilter(app, a0, *a1, a2))
1708
SmoothFilter(Graph *, const QString&, double, double, int=3) /NoDerived/;
1710
SIPSCIDAVIS_APP(new sipSmoothFilter(app, a0, *a1, a2, a3, a4))
1713
void setMethod(int);
1714
void setMethod(SmoothMethod /Constrained/);
1716
void setSmoothPoints(int, int = 0);
1717
void setPolynomOrder(int);
1722
class FFTFilter : Filter
1725
#include "src/FFTFilter.h"
1728
enum FilterType{LowPass = 1, HighPass = 2, BandPass = 3, BandBlock = 4};
1730
FFTFilter(ApplicationWindow * /TransferThis/, Graph *, const QString&, int=1);
1731
FFTFilter(ApplicationWindow * /TransferThis/, Graph *, const QString&, double, double, int=1);
1732
FFTFilter(Graph *, const QString&, int=1) /NoDerived/;
1734
SIPSCIDAVIS_APP(new sipFFTFilter(app, a0, *a1, a2))
1736
FFTFilter(Graph *, const QString&, double, double, int=1) /NoDerived/;
1738
SIPSCIDAVIS_APP(new sipFFTFilter(app, a0, *a1, a2, a3, a4))
1741
void setFilterType(int);
1742
void setFilterType(FilterType /Constrained/);
1744
void setCutoff(double);
1745
void setBand(double, double);
1746
void enableOffset(bool=true);
1754
#include "src/FFT.h"
1758
FFT(ApplicationWindow * /TransferThis/, Table *, const QString&, const QString& = QString());
1759
FFT(ApplicationWindow * /TransferThis/, Graph *, const QString&);
1760
FFT(Table *, const QString&, const QString& = QString()) /NoDerived/;
1762
SIPSCIDAVIS_APP(new sipFFT(app, a0, *a1, *a2))
1764
FFT(Graph *, const QString&) /NoDerived/;
1766
SIPSCIDAVIS_APP(new sipFFT(app, a0, *a1))
1769
void setInverseFFT(bool=true);
1770
void setSampling(double);
1771
void normalizeAmplitudes(bool=true);
1772
void shiftFrequencies(bool=true);
1777
class Correlation : Filter
1780
#include "src/Correlation.h"
1784
Correlation(ApplicationWindow * /TransferThis/, Table *, const QString&, const QString&);
1785
Correlation(Table *, const QString&, const QString&) /NoDerived/;
1787
SIPSCIDAVIS_APP(new sipCorrelation(app, a0, *a1, *a2))
1790
void setDataFromTable(Table *, const QString&, const QString&);
1794
class Convolution : Filter
1797
#include "src/Convolution.h"
1801
Convolution(ApplicationWindow * /TransferThis/, Table *, const QString&, const QString&);
1802
Convolution(Table *, const QString&, const QString&) /NoDerived/;
1804
SIPSCIDAVIS_APP(new sipConvolution(app, a0, *a1, *a2))
1807
void setDataFromTable(Table *, const QString&, const QString&);
1811
class Deconvolution : Filter
1814
#include "src/Convolution.h"
1818
Deconvolution(ApplicationWindow * /TransferThis/, Table *, const QString&, const QString&);
1819
Deconvolution(Table *, const QString&, const QString&) /NoDerived/;
1821
SIPSCIDAVIS_APP(new sipDeconvolution(app, a0, *a1, *a2))
1824
void setDataFromTable(Table *, const QString&, const QString&);
1828
// used for output redirection
1829
class PythonScripting
1832
#include "src/PythonScripting.h"
1835
void write(const QString&);
1837
PythonScripting(const PythonScripting&);
1842
#include "src/PythonScript.h"
1845
void write(const QString&);
1847
PythonScript(const PythonScript&);
1850
class Folder : QObject
1853
#include "src/Folder.h"
1856
QList<MyWidget*> windowsList() /PyName=windows/;
1857
// TODO: implement signal Folder::nameChanged and make it update the project explorer; adjust renaming from GUI accordingly
1858
// void setFolderName(const QString&) /PyName=setName/;
1862
QList<Folder*> folders() const;
1863
Folder *findSubfolder(const QString&, bool=true, bool=false) /PyName=folder/;
1864
MyWidget* findWindow(const QString&, bool=true, bool=true, bool=false, bool=true);
1866
MyWidget *window(const QString &name, const char *cls="MyWidget", bool recursive=false);
1867
Table *table(const QString &name, bool recursive=false);
1868
Matrix *matrix(const QString &name, bool recursive=false);
1869
MultiLayer *graph(const QString &name, bool recursive=false);
1870
Note *note(const QString &name, bool recursive=false);
1872
Folder* rootFolder();
1874
void save(const QString &filename) /NoDerived/;
1876
ApplicationWindow *app = sipscidavis_app();
1878
app->saveFolder(sipCpp, *a0);
1882
Folder(const Folder&);