Ejemplo n.º 1
0
    def currentChanged ( self, curr, prev ):
        """ Reimplemented to tell the editor when the current index has
            changed.
        """
        QTreeView.currentChanged( self, curr, prev )

        self._editor.update_object( curr )

#-- EOF ------------------------------------------------------------------------
Ejemplo n.º 2
0
    def currentChanged(self, current, previous):
        QTreeView.currentChanged(self.directoryTree, current, previous)
        currentIndex = self.directoryTree.selectionModel().currentIndex()
        path = str(self.directoryTree.model().filePath(currentIndex))

        if self.directoryTree.model().isDir(currentIndex):
            self.directorySelectedSignal.emit(path)
        else:
            self.directorySelectedSignal.emit(os.path.dirname(path))
            self.fileSelectedSignal.emit(path)
Ejemplo n.º 3
0
 def currentChanged(self, current, previous):
     QTreeView.currentChanged(self.directoryTree, current, previous)
     currentIndex = self.directoryTree.selectionModel().currentIndex()
     path = str ( self.directoryTree.model().filePath(currentIndex) )
     
     if self.directoryTree.model().isDir(currentIndex):
         self.directorySelectedSignal.emit(path)
     else:
         self.directorySelectedSignal.emit(os.path.dirname(path))
         self.fileSelectedSignal.emit(path)