CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Private Attributes
Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView Class Reference
Inheritance diagram for Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView:
Vispa.Views.BoxDecayView.BoxDecayView Vispa.Views.WidgetView.WidgetView Vispa.Views.AbstractView.AbstractView Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner Vispa.Share.ObjectHolder.ObjectHolder Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner Vispa.Gui.ZoomableWidget.ZoomableWidget Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner Vispa.Gui.Zoomable.Zoomable Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConnectionStructureView Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.SequenceStructureView

Public Member Functions

def __init__
 
def connections
 
def createBox
 
def createConnections
 
def highlight
 
def setConnections
 
def updateContent
 
- Public Member Functions inherited from Vispa.Views.BoxDecayView.BoxDecayView
def __init__
 
def arrangeUsingRelations
 
def boxContentScript
 
def cancel
 
def checkNumberOfObjects
 
def closeEvent
 
def collapseAll
 
def collapseObject
 
def contentStartX
 
def contentStartY
 
def createBox
 
def createBoxesRecursive
 
def createConnection
 
def createConnections
 
def createSinkPort
 
def createSourcePort
 
def expandAll
 
def expandObject
 
def expandToDepth
 
def setArrangeUsingRelations
 
def setBoxContentScript
 
def setDataAccessor
 
def setSortBeforeArranging
 
def sortBeforeArranging
 
def toggleCollapsed
 
def updateContent
 
- Public Member Functions inherited from Vispa.Views.WidgetView.WidgetView
def __init__
 
def addWidget
 
def clear
 
def closeEvent
 
def deselectAllWidgets
 
def isBusy
 
def mousePressEvent
 
def restoreSelection
 
def select
 
def selection
 
def setDataObjects
 
def widgetByObject
 
def widgetDoubleClicked
 
def widgets
 
def widgetSelected
 
- Public Member Functions inherited from Vispa.Views.AbstractView.AbstractView
def __init__
 
def cancel
 
def isBusy
 
def restoreSelection
 
def select
 
def selection
 
def updateContent
 
- Public Member Functions inherited from Vispa.Share.ObjectHolder.ObjectHolder
def __init__
 
def allDataObjectChildren
 
def appendObject
 
def applyFilter
 
def clearObjects
 
def dataAccessor
 
def dataObject
 
def dataObjects
 
def dataObjectsCount
 
def numberDataObjectChildren
 
def removeObject
 
def setDataAccessor
 
def setDataObject
 
def setDataObjects
 
def setExclusiveMode
 
def setFilter
 
- Public Member Functions inherited from Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner
def __init__
 
def autosizeScrollArea
 
def setZoom
 
def widgetDragged
 
- Public Member Functions inherited from Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner
def deleteSelectedConnections
 
def getWidgetByName
 
def hideMenuWidgets
 
def portConnection
 
def propagateEventUnderConnectionWidget
 
def updateConnections
 
- Public Member Functions inherited from Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner
def deselectAllWidgets
 
def enableMultiSelect
 
def initWidgetMovement
 
def keyPressEvent
 
def lastMovedWidgets
 
def mouseMoveEvent
 
def mousePressEvent
 
def mouseReleaseEvent
 
def multiSelectEnabled
 
def selectedWidgets
 
def widgetAboutToDelete
 
def widgetDoubleClicked
 
def widgetDragged
 
def widgetSelected
 
- Public Member Functions inherited from Vispa.Gui.ZoomableWidget.ZoomableWidget
def __init__
 
def exportImage
 
def setZoom
 
- Public Member Functions inherited from Vispa.Gui.Zoomable.Zoomable
def __init__
 
def decrementZoom
 
def incrementZoom
 
def setZoom
 
def zoom
 
def zoomFactor
 

Static Public Attributes

string LABEL = "ConfigEditor BoxView"
 
- Static Public Attributes inherited from Vispa.Views.BoxDecayView.BoxDecayView
string LABEL = "&Box Decay View"
 
int NO_SORTING_ABOVE = 10000
 
int UPDATE_EVERY = 20
 
int WARNING_ABOVE = 500
 
- Static Public Attributes inherited from Vispa.Views.WidgetView.WidgetView
string LABEL = "&Widget View"
 
- Static Public Attributes inherited from Vispa.Views.AbstractView.AbstractView
string LABEL = "&Abstract View"
 

Private Attributes

 _colorIndex
 
 _colors
 
 _connections
 
 _highlightedObjects
 
 _highlightedWidgets
 
 _updateCounter
 

Additional Inherited Members

- Public Attributes inherited from Vispa.Views.BoxDecayView.BoxDecayView
 WARNING_ABOVE
 

Detailed Description

 

Definition at line 11 of file ConfigEditorBoxView.py.

Constructor & Destructor Documentation

def Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.__init__ (   self,
  parent = None,
  label = "" 
)

Member Function Documentation

def Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.connections (   self)

Definition at line 28 of file ConfigEditorBoxView.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._connections, and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor._connections.

28 
29  def connections(self):
30  return self._connections
def Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.createBox (   self,
  widgetParent,
  container,
  title,
  text 
)

Definition at line 39 of file ConfigEditorBoxView.py.

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive().

39 
40  def createBox(self, widgetParent, container, title, text):
41  widget=BoxDecayView.createBox(self, widgetParent, container, title, text)
42  widget.setToolTip("Double click to display this module with its dependencies")
43  return widget
def Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.createConnections (   self,
  operationId,
  widgetParent 
)

Definition at line 44 of file ConfigEditorBoxView.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._updateCounter, and Vispa.Views.BoxDecayView.BoxDecayView.UPDATE_EVERY.

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive().

44 
45  def createConnections(self, operationId, widgetParent):
46  for connection,values in self._connections.items():
47  # Process application event loop in order to accept user input during time consuming drawing operation
48  self._updateCounter+=1
50  self._updateCounter=0
51  if not Application.NO_PROCESS_EVENTS:
52  QCoreApplication.instance().processEvents()
53  # Abort drawing if operationId out of date
54  if operationId != self._operationId:
55  return None
56  w1 = self.widgetByObject(connection[0])
57  w2 = self.widgetByObject(connection[1])
58  if w1 and w2:
59  if hasattr(w1,"colorIndex"):
60  col = w1.colorIndex
61  else:
62  self._colorIndex += 1
63  if self._colorIndex >= len(self._colors):
64  self._colorIndex = 0
65  col = self._colorIndex
66  w1.colorIndex=col
67  w2.colorIndex=col
68  connectionWidget = self.createConnection(w1, values[0], w2, values[1], self._colors[col])
69  connectionWidget.show()
70  return True
def Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.highlight (   self,
  objects = None 
)
Mark objects.

Definition at line 71 of file ConfigEditorBoxView.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._highlightedObjects, Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._highlightedWidgets, Vispa.Views.WidgetView.WidgetView.widgetByObject(), and Vispa.Views.BoxDecayView.BoxDecayContainer.widgetByObject().

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.updateContent().

71 
72  def highlight(self, objects=None):
73  """ Mark objects.
74  """
75  if objects!=None:
76  self._highlightedObjects=objects
77  for widget in self._highlightedWidgets:
78  if isinstance(widget,ConnectableWidget):
79  widget.setColors(ConnectableWidget.PEN_COLOR,
80  ConnectableWidget.FILL_COLOR1,
81  ConnectableWidget.FILL_COLOR2)
82  elif isinstance(widget,WidgetContainer):
83  widget.setColors(WidgetContainer.PEN_COLOR,
84  WidgetContainer.FILL_COLOR1,
85  WidgetContainer.FILL_COLOR2)
86  widget.update()
87  self._highlightedWidgets=[]
88  for object in self._highlightedObjects:
89  widget = self.widgetByObject(object)
90  if widget==None:
91  continue
92  if isinstance(widget,ConnectableWidget):
93  widget.setColors(ConnectableWidget.PEN_COLOR.darker(),
94  ConnectableWidget.FILL_COLOR1,
95  ConnectableWidget.FILL_COLOR2)
96  elif isinstance(widget,WidgetContainer):
97  widget.setColors(WidgetContainer.PEN_COLOR.darker(),
98  WidgetContainer.FILL_COLOR1,
99  WidgetContainer.FILL_COLOR2)
100  widget.update()
101  self._highlightedWidgets+=[widget]
def Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.setConnections (   self,
  connections 
)
Sets the connections between the objects.

You need to call updateContent() in order to make the changes visible.

Definition at line 31 of file ConfigEditorBoxView.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._colorIndex, Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._connections, and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor._connections.

31 
32  def setConnections(self, connections):
33  """ Sets the connections between the objects.
34 
35  You need to call updateContent() in order to make the changes visible.
36  """
37  self._colorIndex = 0
38  self._connections = connections
def Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.updateContent (   self,
  overrideCheck = False 
)

Definition at line 102 of file ConfigEditorBoxView.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._highlightedWidgets, and Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.highlight().

Referenced by Vispa.Plugins.EdmBrowser.EventContentDialog.EventContentDialog.selectInputFile(), Vispa.Plugins.EdmBrowser.EventContentDialog.EventContentDialog.setConfigDataAccessor(), and Vispa.Plugins.EdmBrowser.EventContentDialog.EventContentDialog.setEventContent().

103  def updateContent(self,overrideCheck=False):
104  self._highlightedWidgets=[]
105  ok=BoxDecayView.updateContent(self,overrideCheck)
106  self.highlight()
107  return ok

Member Data Documentation

Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._colorIndex
private

Definition at line 22 of file ConfigEditorBoxView.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.setConnections().

Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._colors
private

Definition at line 21 of file ConfigEditorBoxView.py.

Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._connections
private

Definition at line 20 of file ConfigEditorBoxView.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.connections(), and Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.setConnections().

Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._highlightedObjects
private

Definition at line 25 of file ConfigEditorBoxView.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.highlight().

Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._highlightedWidgets
private

Definition at line 26 of file ConfigEditorBoxView.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.highlight(), and Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.updateContent().

Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._updateCounter
private

Definition at line 49 of file ConfigEditorBoxView.py.

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive(), Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.createConnections(), Vispa.Views.BoxDecayView.BoxDecayView.createConnections(), Vispa.Views.TreeView.TreeView.updateContent(), and Vispa.Views.TableView.TableView.updateContent().

string Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.LABEL = "ConfigEditor BoxView"
static

Definition at line 15 of file ConfigEditorBoxView.py.

Referenced by Vispa.Share.UndoEvent.UndoEvent.dump().