Back to index

salome-paravis  6.5.0
Public Member Functions | Properties | Private Member Functions
pvsimple.ActiveObjects Class Reference

List of all members.

Public Member Functions

def set_view
def get_view
def set_source
def get_source
def get_selected_sources

Properties

 view = property(get_view, set_view)
 source = property(get_source, set_source)

Private Member Functions

def __get_selection_model
def __convert_proxy

Detailed Description

This class manages the active objects (source and view). The active
objects are shared between Python and the user interface. This class
is for internal use. Use the Set/Get methods for setting and getting
active objects.

Definition at line 892 of file pvsimple.py.


Member Function Documentation

def pvsimple.ActiveObjects.__convert_proxy (   self,
  px 
) [private]

Definition at line 928 of file pvsimple.py.

00928 
00929     def __convert_proxy(self, px):
00930         "Internal method."
00931         if not px:
00932             return None
00933         if px.IsA("vtkSMSourceProxy"):
00934             return servermanager._getPyProxy(px)
00935         else:
00936             return servermanager.OutputPort(
00937               servermanager._getPyProxy(px.GetSourceProxy()),
00938               px.GetPortIndex())
        

Here is the caller graph for this function:

def pvsimple.ActiveObjects.__get_selection_model (   self,
  name 
) [private]

Definition at line 897 of file pvsimple.py.

00897 
00898     def __get_selection_model(self, name):
00899         "Internal method."
00900         pxm = servermanager.ProxyManager()
00901         model = pxm.GetSelectionModel(name)
00902         if not model:
00903             model = servermanager.vtkSMProxySelectionModel()
00904             pxm.RegisterSelectionModel(name, model)
00905         return model

Here is the caller graph for this function:

Definition at line 944 of file pvsimple.py.

00944 
00945     def get_selected_sources(self):
00946         "Returns the set of sources selected in the pipeline browser."
00947         model = self.__get_selection_model("ActiveSources")
00948         proxies = []
00949         for i in xrange(model.GetNumberOfSelectedProxies()):
00950             proxies.append(self.__convert_proxy(model.GetSelectedProxy(i)))
00951         return proxies

Here is the call graph for this function:

Definition at line 939 of file pvsimple.py.

00939 
00940     def get_source(self):
00941         "Returns the active source."
00942         return self.__convert_proxy(
00943           self.__get_selection_model("ActiveSources").GetCurrentProxy())

Here is the call graph for this function:

Definition at line 914 of file pvsimple.py.

00914 
00915     def get_view(self):
00916         "Returns the active view."
00917         return servermanager._getPyProxy(
00918             self.__get_selection_model("ActiveView").GetCurrentProxy())

Here is the call graph for this function:

def pvsimple.ActiveObjects.set_source (   self,
  source 
)

Definition at line 919 of file pvsimple.py.

00919 
00920     def set_source(self, source):
00921         "Sets the active source."
00922         active_sources_model = self.__get_selection_model("ActiveSources") 
00923         if source:
00924             # 3 == CLEAR_AND_SELECT
00925             active_sources_model.SetCurrentProxy(source.SMProxy, 3)
00926         else:
00927             active_sources_model.SetCurrentProxy(None, 3)

Here is the call graph for this function:

def pvsimple.ActiveObjects.set_view (   self,
  view 
)

Definition at line 906 of file pvsimple.py.

00906 
00907     def set_view(self, view):
00908         "Sets the active view."
00909         active_view_model = self.__get_selection_model("ActiveView") 
00910         if view:
00911             active_view_model.SetCurrentProxy(view.SMProxy, 0)
00912         else:
00913             active_view_model.SetCurrentProxy(None, 0)

Here is the call graph for this function:


Property Documentation

Definition at line 953 of file pvsimple.py.

Definition at line 952 of file pvsimple.py.


The documentation for this class was generated from the following file: