Version: 9.15.0
gui.BoxManager.BoxManager Class Reference
Inheritance diagram for gui.BoxManager.BoxManager:
Collaboration diagram for gui.BoxManager.BoxManager:

Public Member Functions

def __init__ (self, parent)
 
def setRootItem (self, rootItem)
 
def setview (self, item)
 
def changePanel (self, item)
 

Public Attributes

 panels
 
 rootItem
 

Detailed Description

 A BoxManager manages a collection of widget 
    Each widget is associated to an item
    A widget is displayed when the associated item is selected
    To get the associated widget : item.box(self)

Definition at line 23 of file BoxManager.py.

Constructor & Destructor Documentation

◆ __init__()

def gui.BoxManager.BoxManager.__init__ (   self,
  parent 
)

Definition at line 29 of file BoxManager.py.

29  def __init__(self,parent):
30  QWidgetStack.__init__(self,parent)
31  self.panels={}
32 

Member Function Documentation

◆ changePanel()

def gui.BoxManager.BoxManager.changePanel (   self,
  item 
)

Definition at line 45 of file BoxManager.py.

45  def changePanel(self,item):
46  print("changePanel",item)
47  if item in self.panels:
48  self.removeWidget(self.panels[item])
49  panel=item.box(self)
50  self.panels[item]=panel
51  idd=self.addWidget(panel)
52  self.raiseWidget(self.panels[item])

References gui.BoxManager.BoxManager.panels, gui.cataitems.Obj.panels, gui.Items.ItemComposedNode.panels, gui.Items.ItemPort.panels, gui.Items.ItemInPort.panels, gui.Items.ItemOutPort.panels, gui.Items.ItemNode.panels, gui.Items.ItemScriptNode.panels, gui.Items.ItemFuncNode.panels, gui.Items.ItemService.panels, and gui.PanelManager.PanelManager.panels.

Referenced by gui.BoxManager.BoxManager.setview().

◆ setRootItem()

def gui.BoxManager.BoxManager.setRootItem (   self,
  rootItem 
)

Definition at line 33 of file BoxManager.py.

33  def setRootItem(self,rootItem):
34  self.rootItem=rootItem
35  CONNECTOR.Connect(self.rootItem,"selected",self.setview,())
36 

◆ setview()

def gui.BoxManager.BoxManager.setview (   self,
  item 
)

Definition at line 37 of file BoxManager.py.

37  def setview(self,item):
38  if item not in self.panels:
39  CONNECTOR.Connect(item,"changed",self.changePanel,(item,))
40  panel=item.box(self)
41  self.panels[item]=panel
42  idd=self.addWidget(panel)
43  self.raiseWidget(self.panels[item])
44 

References gui.BoxManager.BoxManager.changePanel(), gui.BoxManager.BoxManager.panels, gui.cataitems.Obj.panels, gui.Items.ItemComposedNode.panels, gui.Items.ItemPort.panels, gui.Items.ItemInPort.panels, gui.Items.ItemOutPort.panels, gui.Items.ItemNode.panels, gui.Items.ItemScriptNode.panels, gui.Items.ItemFuncNode.panels, gui.Items.ItemService.panels, and gui.PanelManager.PanelManager.panels.

Member Data Documentation

◆ panels

◆ rootItem

gui.BoxManager.BoxManager.rootItem

Definition at line 34 of file BoxManager.py.


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