Ejemplo n.º 1
0
 def erase(self):
     _infoer.function = str(self.erase)
     _infoer.write("")
     """ delete the complete content """
     self.completeTree.erase()
     self.filteredTree.erase()
     self.__completeTreeKeyCounter = cLikeCounter() # reset
     self.__key2CaseItem.clear()
     self.__usefulOnlyWithChild = []
     self.__cases = []
Ejemplo n.º 2
0
    def __init__(self, parent=None, choicePolicy=TreeSelectionHandler):
        _infoer.function = str(self.__init__)
        _infoer.write("")
        QtWidgets.QDialog.__init__(self, parent)
        Ui_CasesFilterBase.__init__(self)
        self.setupUi(self)

        self.checkBox5.hide() # not working

        # hide dialog specific buttons
        self.pushButtonOK.hide()
        self.pushButtonCancel.hide()
            
        self.completeTree = KeyedTreeView(
            self.completeWidgetStack, None, 'All Parts')
        #self.completeTree.setSelectionMode(QListView.ExtendedSelection)
        self.completeWidgetStack.addWidget(self.completeTree)
        self.completeWidgetStack.setCurrentWidget(self.completeTree)

        self.filteredTree = KeyedTreeView(
            self.filteredWidgetStack, None, 'Selected Parts')
        #self.filteredTree.setSelectionMode(QListView.Extended)
        self.filteredWidgetStack.addWidget(self.filteredTree)
        self.filteredWidgetStack.setCurrentWidget(self.filteredTree)

        self.treeSelectionHandler = choicePolicy(
            self.completeTree, self.filteredTree)

        self.__completeTreeKeyCounter = cLikeCounter()
        self.__key2CaseItem = {} # for class-internal lookup
        self.__usefulOnlyWithChild = []
        self.__cases = []

        self.selectAllButton.clicked.connect(self.__selectAllInCompleteTree)
        self.deselectAllButton.clicked.connect(self.__deselectAllInCompleteTree)
        
        self.completeTree.clicked.connect(self.setCompleteChildrenSelected)
        self.filteredTree.clicked.connect(self.setFilteredChildrenSelected)
        
        self.completeTree.doubleClicked.connect(self.completeTreeDoubleClicked)
        self.filteredTree.doubleClicked.connect(self.filteredTreeDoubleClicked)
Ejemplo n.º 3
0
 def _initMembers(self):
     self._idCtr = cLikeCounter()
     self._rootNode = PartNode(None, -1)
     self._idNodeMap = {}
     self._idPartMap = {}