forked from dimv36/QCustomPlot-PyQt5
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathselection.sip
77 lines (67 loc) · 2.19 KB
/
selection.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
72
73
74
75
76
77
/** 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 QCPDataRange
{
%TypeHeaderCode
#include <QCustomPlot/src/selection.h>
%End
public:
QCPDataRange();
QCPDataRange(int begin, int end);
bool operator==(const QCPDataRange& other) const;
bool operator!=(const QCPDataRange& other) const;
// getters:
int begin() const;
int end() const;
int size() const;
int length() const;
// setters:
void setBegin(int begin);
void setEnd(int end) ;
// non-property methods:
bool isValid() const;
bool isEmpty() const;
QCPDataRange bounded(const QCPDataRange &other) const;
QCPDataRange expanded(const QCPDataRange &other) const;
QCPDataRange intersection(const QCPDataRange &other) const;
QCPDataRange adjusted(int changeBegin, int changeEnd) const;
bool intersects(const QCPDataRange &other) const;
bool contains(const QCPDataRange &other) const;
};
class QCPDataSelection
{
%TypeHeaderCode
#include <QCustomPlot/src/plottable.h>
%End
public:
explicit QCPDataSelection();
explicit QCPDataSelection(const QCPDataRange &range);
bool operator==(const QCPDataSelection& other) const;
bool operator!=(const QCPDataSelection& other) const;
QCPDataSelection &operator+=(const QCPDataSelection& other);
QCPDataSelection &operator+=(const QCPDataRange& other);
QCPDataSelection &operator-=(const QCPDataSelection& other);
QCPDataSelection &operator-=(const QCPDataRange& other);
// getters:
int dataRangeCount() const;
int dataPointCount() const;
QCPDataRange dataRange(int index=0) const;
QList<QCPDataRange> dataRanges() const;
QCPDataRange span() const;
// non-property methods:
void addDataRange(const QCPDataRange &dataRange, bool simplify=true);
void clear();
bool isEmpty() const;
void simplify();
void enforceType(QCP::SelectionType type);
bool contains(const QCPDataSelection &other) const;
QCPDataSelection intersection(const QCPDataRange &other) const;
QCPDataSelection intersection(const QCPDataSelection &other) const;
QCPDataSelection inverse(const QCPDataRange &outerRange) const;
};