def __init__(self, view, cellWidth=20, cellHeight=18):
        """
        Constructor for the XNodeScene class \
        the inputed view will be treated as the main \
        view" that will be affected when the scene \
        modifications occur.  Other views can be \
        associated with the scene (such as an overview \
        view) that will not be affected.

        :param      view        <QGraphicsView>
        :param      cellWidth   <float> || <int>
        :param      cellHeight  <float> || <int>
        """
        super(XNodeScene, self).__init__(view)
        
        # set base QGraphicsScene properties
        w = 1170 * cellWidth
        h = 594 * cellWidth
        
        self.setSceneRect(-w/2.0, -h/2.0, w, h) # center on 0, 0
        self.setObjectName('XNodeScene')
        
        # initialize the main view
        view.setDragMode(view.RubberBandDrag)
        view.setAlignment(Qt.AlignLeft | Qt.AlignTop)
        view.setScene(self)
        
        # create custom parameters
        self._cache                     = set() # caches python pointers or
                                                # memory leaks...
        self._mainView                  = view
        self._minorLines                = []
        self._majorLines                = []
        self._centerLines               = []
        self._cellWidth                 = cellWidth
        self._cellHeight                = cellHeight
        self._minZoomAmount             = 20
        self._maxZoomAmount             = 100
        self._modified                  = False
        self._dirty                     = True
        self._viewMode                  = False
        self._selectionSignalsBlocked   = False
        self._showGrid                  = True
        self._removalQueue              = []
        self._layers                    = []
        self._loading                   = False
        self._isolationMode             = False
        self._activeConnection          = None
        self._currentLayer              = None
        self._palette                   = XNodePalette()
        
        self._defaultNodeClass          = XNode
        self._defaultConnectionClass    = XNodeConnection
        self._defaultLayerClass         = XNodeLayer
        
        # create connections
        self.selectionChanged.connect(self.updateIsolated)
        self.setBackgroundBrush(self._palette.color(XNodePalette.GridBackground))
def __init__ ( self , view , cellWidth = 20 , cellHeight = 18 ) : super ( XNodeScene , self ) . __init__ ( view ) w = 1170 * cellWidth h = 594 * cellWidth self . setSceneRect ( - w / 2.0 , - h / 2.0 , w , h ) self . setObjectName ( 'XNodeScene' ) view . setDragMode ( view . RubberBandDrag ) view . setAlignment ( Qt . AlignLeft | Qt . AlignTop ) view . setScene ( self ) self . _cache = set ( ) self . _mainView = view self . _minorLines = [ ] self . _majorLines = [ ] self . _centerLines = [ ] self . _cellWidth = cellWidth self . _cellHeight = cellHeight self . _minZoomAmount = 20 self . _maxZoomAmount = 100 self . _modified = False self . _dirty = True self . _viewMode = False self . _selectionSignalsBlocked = False self . _showGrid = True self . _removalQueue = [ ] self . _layers = [ ] self . _loading = False self . _isolationMode = False self . _activeConnection = None self . _currentLayer = None self . _palette = XNodePalette ( ) self . _defaultNodeClass = XNode self . _defaultConnectionClass = XNodeConnection self . _defaultLayerClass = XNodeLayer self . selectionChanged . connect ( self . updateIsolated ) self . setBackgroundBrush ( self . _palette . color ( XNodePalette . GridBackground ) )
Constructor for the XNodeScene class \
        the inputed view will be treated as the main \
        view" that will be affected when the scene \
        modifications occur.  Other views can be \
        associated with the scene (such as an overview \
        view) that will not be affected.

        :param      view        <QGraphicsView>
        :param      cellWidth   <float> || <int>
        :param      cellHeight  <float> || <int>