-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
%Module SalomePyQt
+%Feature ENABLE_CORBA
+
%Import QtGuimod.sip
%Import QtXmlmod.sip
WT_ObjectBrowser,
WT_PyConsole,
WT_LogWindow,
+%If (ENABLE_CORBA)
+ WT_NoteBook,
+%End
WT_User
};
SplitAt = 2
};
+enum Axis {
+ yLeft,
+ yRight,
+ xBottom,
+ xTop,
+};
+
class QtxAction : QWidgetAction
{
%TypeHeaderCode
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;
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
%End
public:
+/* KeepReference is necessary on method getDesktop with SIP >= 4.15.5 to avoid garbage collection of
+ the Python objects added to the desktop. This causes a small memory leak (the wrapper around desktop
+ object is never garbage collected) but since this object contains only references this is not
+ considered a big problem. With versions < 4.15, it seems that this reference was kept implicitly.
+ No proper solution was found for versions between 4.15 and 4.15.4 (included), so those versions
+ should not be used to compile GUI module.
+*/
+%If (SIP_4_15_5 - )
+ static QWidget* getDesktop() /ReleaseGIL,KeepReference/ ;
+%End
+%If ( - SIP_4_15_5)
static QWidget* getDesktop() /ReleaseGIL/ ;
+%End
+
static QWidget* getMainFrame() /ReleaseGIL/ ;
static QMenuBar* getMainMenuBar() /ReleaseGIL/ ;
static QMenu* getPopupMenu( const MenuName ) /ReleaseGIL/ ;
static int defaultMenuGroup() /ReleaseGIL/ ;
- static int createTool( const QString& ) /ReleaseGIL/ ;
+ static int createTool( const QString&, const QString& = QString() ) /ReleaseGIL/ ;
static int createTool( const int, const int, const int = -1 ) /ReleaseGIL/ ;
static int createTool( const int, const QString&, const int = -1 ) /ReleaseGIL/ ;
static int createTool( QAction*, const int, const int = -1, const int = -1 ) /ReleaseGIL/ ;
static QList<double> getPlot2dFitRangeByCurves(const int) /ReleaseGIL/ ;
static QList<double> getPlot2dFitRangeCurrent(const int) /ReleaseGIL/ ;
static void setPlot2dFitRange(const int, const double XMin, const double XMax, const double YMin, const double YMax ) /ReleaseGIL/ ;
+
+ static void processEvents();
+
+
+ static void startPyLog(const QString&) /ReleaseGIL/ ;
+ static void stopPyLog() /ReleaseGIL/ ;
};