forked from cowo78/QCustomPlot-PyQt5
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayer.sip
More file actions
95 lines (79 loc) · 3.02 KB
/
Copy pathlayer.sip
File metadata and controls
95 lines (79 loc) · 3.02 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/** 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
{
%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);
protected:
// introduced virtual methods:
virtual void parentPlotInitialized(QCustomPlot *parentPlot);
virtual QCP::Interaction selectionCategory() const;
virtual QRect clipRect() const;
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const = 0;
virtual void draw(QCPPainter *painter) = 0;
// selection events:
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged /Out/);
virtual void deselectEvent(bool *selectionStateChanged /Out/);
// low-level mouse events:
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details);
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos);
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos);
virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details);
virtual void wheelEvent(QWheelEvent *event);
// non-property methods:
void initializeParentPlot(QCustomPlot *parentPlot);
void setParentLayerable(QCPLayerable* parentLayerable);
bool moveToLayer(QCPLayer *layer, bool prepend);
void applyAntialiasingHint(QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const;
};