Skip to content
Snippets Groups Projects
Commit 0cda5531 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

[QCustomPlot] Bind setRangeZoomAxes

parent 69e9ffa1
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,6 @@ void registerQCustomPlot () ...@@ -23,7 +23,6 @@ void registerQCustomPlot ()
PythonQt::self()->addDecorators (new QCustomPlotDecorator ()); PythonQt::self()->addDecorators (new QCustomPlotDecorator ());
PythonQt::self()->registerCPPClass ("QCPPainter" , "QPainter", "QCustomPlot"); PythonQt::self()->registerCPPClass ("QCPPainter" , "QPainter", "QCustomPlot");
PythonQt::self()->registerCPPClass ("QCustomPlot" , "QWidget" , "QCustomPlot"); PythonQt::self()->registerCPPClass ("QCustomPlot" , "QWidget" , "QCustomPlot");
// PythonQt::self()->registerCPPClass ("QCPAxisRect" , "QGraphicsItem" , "QCustomPlot");
// PythonQt::self()->registerCPPClass ("QCPAxisPainterPrivate", "QGraphicsItem" , "QCustomPlot"); // PythonQt::self()->registerCPPClass ("QCPAxisPainterPrivate", "QGraphicsItem" , "QCustomPlot");
// PythonQt::self()->registerCPPClass ("QCPItemPosition" , "QGraphicsItem" , "QCustomPlot"); // PythonQt::self()->registerCPPClass ("QCPItemPosition" , "QGraphicsItem" , "QCustomPlot");
PythonQt::self()->registerCPPClass ("QCPLayer" , "QObject" , "QCustomPlot"); PythonQt::self()->registerCPPClass ("QCPLayer" , "QObject" , "QCustomPlot");
...@@ -49,6 +48,7 @@ void registerQCustomPlot () ...@@ -49,6 +48,7 @@ void registerQCustomPlot ()
PythonQt::self()->registerCPPClass ("QCPLayoutElement" , "QCPLayerable" , "QCustomPlot"); PythonQt::self()->registerCPPClass ("QCPLayoutElement" , "QCPLayerable" , "QCustomPlot");
PythonQt::self()->registerCPPClass ("QCPLayout" , "QCPLayoutElement" , "QCustomPlot"); PythonQt::self()->registerCPPClass ("QCPLayout" , "QCPLayoutElement" , "QCustomPlot");
PythonQt::self()->registerCPPClass ("QCPAxisRect" , "QCPLayoutElement" , "QCustomPlot");
PythonQt::self()->registerCPPClass ("QCPLayoutGrid" , "QCPLayout" , "QCustomPlot"); PythonQt::self()->registerCPPClass ("QCPLayoutGrid" , "QCPLayout" , "QCustomPlot");
PythonQt::self()->registerCPPClass ("QCPLegend" , "QCPLayoutGrid" , "QCustomPlot"); PythonQt::self()->registerCPPClass ("QCPLegend" , "QCPLayoutGrid" , "QCustomPlot");
......
...@@ -67,10 +67,15 @@ class QCustomPlotDecorator : public QObject ...@@ -67,10 +67,15 @@ class QCustomPlotDecorator : public QObject
QCPAxis* yAxis (QCustomPlot* o) { return o->yAxis ; } QCPAxis* yAxis (QCustomPlot* o) { return o->yAxis ; }
QCPAxis* yAxis2 (QCustomPlot* o) { return o->yAxis2; } QCPAxis* yAxis2 (QCustomPlot* o) { return o->yAxis2; }
QCPLegend* legend (QCustomPlot* o) { return o->legend; } QCPLegend* legend (QCustomPlot* o) { return o->legend; }
QCPAxisRect* axisRect (QCustomPlot* o, int index=0) { return o->axisRect(index); }
/// \} /// \}
/// \name QCPAxis /// \name QCPAxis
/// \{ /// \{
int selectedParts(const QCPAxis* a)
{
return a->selectedParts();
}
void setLabel(QCPAxis* a, const QString text) void setLabel(QCPAxis* a, const QString text)
{ {
a->setLabel(text); a->setLabel(text);
...@@ -197,4 +202,12 @@ class QCustomPlotDecorator : public QObject ...@@ -197,4 +202,12 @@ class QCustomPlotDecorator : public QObject
lg->addElement(row,column,element); lg->addElement(row,column,element);
} }
/// \} /// \}
/// \name QCPAxisRect
/// \{
void setRangeZoomAxes (QCPAxisRect* ar, QCPAxis* horizontal, QCPAxis* vertical)
{
ar->setRangeZoomAxes (horizontal, vertical);
}
/// \}
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment