Back to index

salome-kernel  6.5.0
Classes | Functions | Variables
KERNEL_PY.salome_iapp Namespace Reference

Classes

class  SalomeOutsideGUI

Functions

def ImportComponentGUI
def SalomeGUIgetAllSelected
def hasDesktop
def salome_iapp_init

Variables

int IN_SALOME_GUI = 0
int salome_iapp_initial = 1

Function Documentation

Definition at line 62 of file salome_iapp.py.

00062 
00063 def hasDesktop():
00064     return IN_SALOME_GUI
00065 
00066     #--------------------------------------------------------------------------

Definition at line 37 of file salome_iapp.py.

00037 
00038 def ImportComponentGUI(ComponentName):
00039     if IN_SALOME_GUI:
00040         libName = "lib" + ComponentName + "_Swig"
00041         command = "from " + libName + " import *"
00042         exec ( command )
00043         constructor = ComponentName + "_Swig()"
00044         command = "gui = " + constructor
00045         exec ( command )
00046         return gui
00047     else:
00048         print "Warning: ImportComponentGUI(",ComponentName,") outside GUI !"
00049         print "calls to GUI methods may crash..."
00050         return salome_ComponentGUI
00051 
00052     #--------------------------------------------------------------------------

Definition at line 163 of file salome_iapp.py.

00163 
00164 def salome_iapp_init(embedded):
00165     global salome_iapp_initial
00166     global sg,IN_SALOME_GUI
00167 
00168     if salome_iapp_initial:
00169         salome_iapp_initial=0
00170         if embedded:
00171             import libSALOME_Swig
00172         
00173             class SalomeGUI(libSALOME_Swig.SALOMEGUI_Swig):
00174                 getAllSelected = SalomeGUIgetAllSelected
00175 
00176             # create a SALOMEGUI_Swig instance
00177             sg = SalomeGUI()
00178             IN_SALOME_GUI = sg.hasDesktop()
00179         else:
00180             # Not embedded in GUI
00181             sg=SalomeOutsideGUI()
00182             IN_SALOME_GUI=0
00183     return sg

Here is the caller graph for this function:

Definition at line 53 of file salome_iapp.py.

00053 
00054 def SalomeGUIgetAllSelected(self):
00055     selNumber = self.SelectedCount()
00056     listSelected = []
00057     for i in range(selNumber):
00058         listSelected.append(self.getSelected(i))
00059     return listSelected
00060 
00061     #--------------------------------------------------------------------------


Variable Documentation

Definition at line 35 of file salome_iapp.py.

Definition at line 67 of file salome_iapp.py.