Ejemplo n.º 1
0
    def __init__(self, parent=None, maxDepth=100):
        logging.debug(__name__ + ": __init__")
        AbstractView.__init__(self)
        QTreeWidget.__init__(self, parent)

        self._operationId = 0
        self._firstItem = None
        self._itemDict = {}
        self._maxDepth = maxDepth
        self._selection = None
        self._updatingFlag = 0
        self._treeDepth = 1
        self._updateCounter = 0

        self.setSortingEnabled(False)
        self.setColumnCount(1)
        self.setRootIsDecorated(True)
        self.header().hide()

        self.connect(self, SIGNAL("itemSelectionChanged()"),
                     self.itemSelectionChanged)
        self.connect(self, SIGNAL("itemCollapsed(QTreeWidgetItem*)"),
                     self.itemExpanded)
        self.connect(self, SIGNAL("itemExpanded(QTreeWidgetItem*)"),
                     self.itemExpanded)
Ejemplo n.º 2
0
 def setDataAccessor(self, accessor):
     """ Sets the DataAccessor from which the object properties are read.
     
     You need to call updateContent() in order to make the changes visible.
     """
     if not isinstance(accessor, BasicDataAccessor):
         raise TypeError(__name__ + " requires data accessor of type BasicDataAccessor.")
     AbstractView.setDataAccessor(self, accessor)
Ejemplo n.º 3
0
 def setDataAccessor(self, accessor):
     """ Sets the DataAccessor from which the nodes are created.
     
     You need to call updateContent() in order to make the changes visible.   
     """
     if not isinstance(accessor, BasicDataAccessor):
         raise TypeError(__name__ + " requires data accessor of type BasicDataAccessor.")
     AbstractView.setDataAccessor(self, accessor)
Ejemplo n.º 4
0
    def __init__(self, parent=None):
        logging.debug(__name__ + ": __init__")
        AbstractView.__init__(self)
        ZoomableScrollableWidgetOwner.__init__(self, parent)

        self._widgetDict = {}
        self._selection = None
        self._updatingFlag = 0
Ejemplo n.º 5
0
    def __init__(self, parent=None):
        logging.debug(__name__ + ": __init__")
        AbstractView.__init__(self)
        ZoomableScrollableWidgetOwner.__init__(self, parent)

        self._widgetDict = {}
        self._selection = None
        self._updatingFlag = 0
Ejemplo n.º 6
0
 def __init__(self, parent=None):
     AbstractView.__init__(self)
     QWidget.__init__(self, parent)
     ROOT.gROOT.SetStyle('Plain')
     #ROOT.gStyle.SetPalette(1)
     self.canvas = ROOT.TCanvas()
     #self.canvas.SetEditable(False)
     #self.canvas = None 
     self._operationId = 0
     self._updatingFlag = 0
Ejemplo n.º 7
0
 def __init__(self, parent=None):
     AbstractView.__init__(self)
     QWidget.__init__(self, parent)
     ROOT.gROOT.SetStyle('Plain')
     #ROOT.gStyle.SetPalette(1)
     self.canvas = ROOT.TCanvas()
     #self.canvas.SetEditable(False)
     #self.canvas = None 
     self._operationId = 0
     self._updatingFlag = 0
Ejemplo n.º 8
0
 def __init__(self, parent=None, name=None):
     """ Constructor """
     logging.debug(self.__class__.__name__ + ": __init__()")
     AbstractView.__init__(self)
     QTableWidget.__init__(self, parent)
 
     self._itemDict = {}
    
     self.setSelectionMode(QTableWidget.SingleSelection)
     self.clear() # Sets headers
Ejemplo n.º 9
0
    def __init__(self, parent=None, name=None):
        """ Constructor """
        logging.debug(self.__class__.__name__ + ": __init__()")
        AbstractView.__init__(self)
        QTableWidget.__init__(self, parent)

        self._itemDict = {}

        self.setSelectionMode(QTableWidget.SingleSelection)
        self.clear()  # Sets headers
Ejemplo n.º 10
0
    def __init__(self, parent=None, name=None):
        """ Constructor """
        #logging.debug(self.__class__.__name__ + ": __init__()")
        AbstractView.__init__(self)
        QTableWidget.__init__(self, parent)
       
        self._operationId = 0
        self._updatingFlag=0
        self.updateIni = False
        self._currentCategoryName = ""
        self._relativePath=None
        self.setSortingEnabled(False)
        self.verticalHeader().hide()
        self.setSelectionMode(QTableWidget.NoSelection)
        self.clear()        # sets header

        self._readOnly = False
        self._showAddDeleteButtonFlag = False
        
        self.connect(self.horizontalHeader(), SIGNAL("sectionResized(int,int,int)"), self.sectionResized)
        self.connect(self, SIGNAL("itemDoubleClicked(QTableWidgetItem *)"), self.itemDoubleClickedSlot)
Ejemplo n.º 11
0
    def __init__(self, parent=None, name=None):
        """ Constructor """
        #logging.debug(self.__class__.__name__ + ": __init__()")
        AbstractView.__init__(self)
        QTableWidget.__init__(self, parent)
       
        self._operationId = 0
        self._updatingFlag=0
        self.updateIni = False
        self._currentCategoryName = ""
        self._relativePath=None
        self.setSortingEnabled(False)
        self.verticalHeader().hide()
        self.setSelectionMode(QTableWidget.NoSelection)
        self.clear()        # sets header

        self._readOnly = False
        self._showAddDeleteButtonFlag = False
        
        self.connect(self.horizontalHeader(), SIGNAL("sectionResized(int,int,int)"), self.sectionResized)
        self.connect(self, SIGNAL("itemDoubleClicked(QTableWidgetItem *)"), self.itemDoubleClickedSlot)
Ejemplo n.º 12
0
    def __init__(self, parent=None):
        logging.debug(__name__ + ": __init__")
        AbstractView.__init__(self)
        QTableWidget.__init__(self, parent)

        self._operationId = 0
        self._selection = (None,None)
        self._updatingFlag = 0
        self._columns=[]
        self._sortingFlag=False
        self._filteredColumns=[]
        self._firstColumn=0
        self._updateCounter=0
        self._autosizeColumns=True

        self.setSortingEnabled(False)
        self.verticalHeader().hide()
        self.setSelectionMode(QTableWidget.SingleSelection)
        self.setSelectionBehavior(QAbstractItemView.SelectRows)
        self.setSizePolicy(QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding))

        self.connect(self, SIGNAL("itemSelectionChanged()"), self.itemSelectionChanged)
Ejemplo n.º 13
0
    def __init__(self, parent=None, maxDepth=100):
        logging.debug(__name__ + ": __init__")
        AbstractView.__init__(self)
        QTreeWidget.__init__(self, parent)

        self._operationId = 0
        self._firstItem = None
        self._itemDict = {}
        self._maxDepth = maxDepth
        self._selection = None
        self._updatingFlag = 0
        self._treeDepth=1
        self._updateCounter=0

        self.setSortingEnabled(False)
        self.setColumnCount(1)
        self.setRootIsDecorated(True)
        self.header().hide()

        self.connect(self, SIGNAL("itemSelectionChanged()"), self.itemSelectionChanged)
        self.connect(self, SIGNAL("itemCollapsed(QTreeWidgetItem*)"), self.itemExpanded)
        self.connect(self, SIGNAL("itemExpanded(QTreeWidgetItem*)"), self.itemExpanded)
Ejemplo n.º 14
0
 def setDataObjects(self, objects):
     AbstractView.setDataObjects(self, objects)
     self.clear()
Ejemplo n.º 15
0
 def setDataObjects(self, objects):
     AbstractView.setDataObjects(self, objects)
     self.clear()