-
Notifications
You must be signed in to change notification settings - Fork 27
/
layer.sip
71 lines (58 loc) · 1.83 KB
/
layer.sip
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/** PyQt5 binding for QCustomPlot v2.0.0
*
* Authors: Dmitry Voronin, Giuseppe Corbelli
* License: MIT
*
* QCustomPlot author: Emanuel Eichhammer
* QCustomPlot Website/Contact: http://www.qcustomplot.com
*/
class QCPLayer : public QObject
{
%TypeHeaderCode
#include <QCustomPlot/src/layer.h>
%End
public:
enum LayerMode { lmLogical ///< Layer is used only for rendering order, and shares paint buffer with all other adjacent logical layers.
,lmBuffered ///< Layer has its own paint buffer and may be replotted individually (see \ref replot).
};
QCPLayer(QCustomPlot* parentPlot /TransferThis/, const QString &layerName);
virtual ~QCPLayer();
// getters:
QCustomPlot *parentPlot() const;
QString name() const;
int index() const;
QList<QCPLayerable*> children() const;
bool visible() const;
LayerMode mode() const;
// setters:
void setVisible(bool visible);
void setMode(LayerMode mode);
// non-virtual methods:
void replot();
};
class QCPLayerable : public QObject /Abstract/
{
%TypeHeaderCode
#include <QCustomPlot/src/layer.h>
%End
public:
QCPLayerable(QCustomPlot* plot /TransferThis/, QString targetLayer=QString(), QCPLayerable *parentLayerable=0);
virtual ~QCPLayerable();
// getters:
bool visible() const;
QCustomPlot *parentPlot() const;
QCPLayerable *parentLayerable() const;
QCPLayer *layer() const;
bool antialiased() const;
// setters:
void setVisible(bool on);
Q_SLOT bool setLayer(QCPLayer *layer);
bool setLayer(const QString &layerName);
void setAntialiased(bool enabled);
// introduced virtual methods:
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const;
// non-property methods:
bool realVisibility() const;
signals:
void layerChanged(QCPLayer *newLayer);
};