Salome HOME
Merge branch 'master' of ssh://git.salome-platform.org/modules/gui
[modules/gui.git] / src / SALOME_PYQT / SalomePyQt / SalomePyQt.sip
index 40e4b4bd18497a2602b362a954c66ca708ada31c..6344657816e1e62c498d642b6204e8e49eaaaf68 100644 (file)
@@ -25,6 +25,8 @@
 
 %Module SalomePyQt
 
+%Feature ENABLE_CORBA
+
 %Import QtGuimod.sip
 %Import QtXmlmod.sip
 
@@ -68,6 +70,9 @@ enum WindowType {
   WT_ObjectBrowser,
   WT_PyConsole,
   WT_LogWindow,
+%If (ENABLE_CORBA)
+  WT_NoteBook,
+%End
   WT_User
 };
 
@@ -291,7 +296,20 @@ class SalomePyQt
 %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/ ;
@@ -348,7 +366,7 @@ public:
 
   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/ ;
@@ -446,4 +464,10 @@ public:
   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/ ;
 };