Package ete2 :: Package treeview :: Module drawer :: Class _TreeScene
[hide private]
[frames] | no frames]

Class _TreeScene

source code

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt4.QtCore.QObject --+    
                            |    
   PyQt4.QtGui.QGraphicsScene --+
                                |
                               _TreeScene

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QGraphicsScene: ItemIndexMethod, SceneLayer, SceneLayers

Instance Methods [hide private]
 
__init__(self, rootnode=None, style=None, *args)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
initialize_tree_scene(self, tree, style, tree_properties) source code
 
highlight_node(self, n) source code
 
unhighlight_node(self, n) source code
 
mousePressEvent(self, e) source code
 
mouseReleaseEvent(self, e) source code
 
mouseMoveEvent(self, e) source code
 
mouseDoubleClickEvent(self, e) source code
 
save(self, imgName, w=None, h=None, header=None, dpi=150, take_region=False) source code
 
save_by_chunks(self, imgName='img.out', rect=None) source code
 
draw(self) source code
 
add_scale(self, x, y) source code
 
set_style_from(self, node, layout_func) source code
 
update_node_areas(self, node)
This recursive function scans all nodes hunging from the given root node and calculates the coordinates and room necessary to draw a rectangular tree.
source code
 
rotate_node(self, node, angle, x=None, y=None) source code
 
render_node(self, node, x, y, level=0)
Traverse the tree structure and render each node using the regions, sizes, and faces previously loaded.
source code
 
add_branch(self, parent_item, x1, y1, x2, y2, dist, support, color, width, line_type) source code
 
add_faces(self, node, orientation) source code

Inherited from PyQt4.QtGui.QGraphicsScene: activeWindow, addEllipse, addItem, addLine, addPath, addPixmap, addPolygon, addRect, addSimpleText, addText, addWidget, advance, backgroundBrush, bspTreeDepth, changed, childEvent, clear, clearFocus, clearSelection, collidingItems, connectNotify, contextMenuEvent, createItemGroup, customEvent, destroyItemGroup, disconnectNotify, dragEnterEvent, dragLeaveEvent, dragMoveEvent, drawBackground, drawForeground, drawItems, dropEvent, event, eventFilter, focusInEvent, focusItem, focusNextPrevChild, focusOutEvent, font, foregroundBrush, hasFocus, height, helpEvent, inputMethodEvent, inputMethodQuery, invalidate, isSortCacheEnabled, itemAt, itemIndexMethod, items, itemsBoundingRect, keyPressEvent, keyReleaseEvent, mouseGrabberItem, palette, receivers, removeItem, render, sceneRect, sceneRectChanged, selectedItems, selectionArea, selectionChanged, setActiveWindow, setBackgroundBrush, setBspTreeDepth, setFocus, setFocusItem, setFont, setForegroundBrush, setItemIndexMethod, setPalette, setSceneRect, setSelectionArea, setSortCacheEnabled, setStickyFocus, setStyle, stickyFocus, style, timerEvent, update, views, wheelEvent, width

Inherited from PyQt4.QtCore.QObject: blockSignals, children, connect, deleteLater, destroyed, disconnect, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, removeEventFilter, sender, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, tr, trUtf8

Inherited from sip.simplewrapper: __delattr__, __getattribute__, __new__, __setattr__

Inherited from object: __format__, __hash__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from PyQt4.QtGui.QGraphicsScene: AllLayers, BackgroundLayer, BspTreeIndex, ForegroundLayer, ItemLayer, NoIndex

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, rootnode=None, style=None, *args)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

mousePressEvent(self, e)

source code 
Overrides: PyQt4.QtGui.QGraphicsScene.mousePressEvent

mouseReleaseEvent(self, e)

source code 
Overrides: PyQt4.QtGui.QGraphicsScene.mouseReleaseEvent

mouseMoveEvent(self, e)

source code 
Overrides: PyQt4.QtGui.QGraphicsScene.mouseMoveEvent

mouseDoubleClickEvent(self, e)

source code 
Overrides: PyQt4.QtGui.QGraphicsScene.mouseDoubleClickEvent

update_node_areas(self, node)

source code 

This recursive function scans all nodes hunging from the given root node and calculates the coordinates and room necessary to draw a rectangular tree. IT reads the face content of each node, which ones have to be drawn, and how much room they use.