From: vsr Date: Thu, 30 Jan 2014 10:01:48 +0000 (+0000) Subject: Add methods to assign curve to specific axes. X-Git-Tag: V7_4_0a1~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8c1cfc61c90fe2c964bcb75202e1685aa3553710;p=modules%2Fgui.git Add methods to assign curve to specific axes. --- diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h index 9df13706c..853d5b22a 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h @@ -136,6 +136,12 @@ enum VisibilityState UnpresentableState //!< Unpresentable object }; +enum Axis { + yLeft = QwtPlot::yLeft, + yRight = QwtPlot::yRight, + xBottom = QwtPlot::xBottom, + xTop = QwtPlot::xTop, +}; class SalomePyQt { diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip index 136881846..553e6c74d 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip @@ -101,6 +101,13 @@ enum Action { SplitAt = 2 }; +enum Axis { + yLeft, + yRight, + xBottom, + xTop, +}; + class QtxAction : QWidgetAction { %TypeHeaderCode @@ -232,7 +239,7 @@ public: int ny = PyList_Size(a1); if( nx != ny ) { - PyErr_Format(PyExc_TypeError,"The dimention of x and y should be the same. It is %d and %d currently.", nx, ny); + PyErr_Format(PyExc_TypeError,"The dimension of x and y should be the same. It is %d and %d currently.", nx, ny); } int i; @@ -249,6 +256,24 @@ public: void insertPoint( int, double, double ); void deletePoint( int ); void clearAllPoints(); + void setXAxis( Axis ); +%MethodCode + int ax = int(a0); + sipCpp->setXAxis(QwtPlot::Axis(ax)); +%End + Axis getXAxis() const; +%MethodCode + sipRes = Axis(sipCpp->getXAxis()); +%End + void setYAxis( Axis ); +%MethodCode + int ay = int(a0); + sipCpp->setYAxis(QwtPlot::Axis(ay)); +%End + Axis getYAxis() const; +%MethodCode + sipRes = Axis(sipCpp->getYAxis()); +%End }; enum VisibilityState