source/riffle/model.py
def lessThan(self, left, right):
        '''Return ordering of *left* vs *right*.'''
        sourceModel = self.sourceModel()
        if sourceModel:
            leftItem = sourceModel.item(left)
            rightItem = sourceModel.item(right)

            if (isinstance(leftItem, Directory)
                and not isinstance(rightItem, Directory)):
                return self.sortOrder() == Qt.AscendingOrder

            elif (not isinstance(leftItem, Directory)
                and isinstance(rightItem, Directory)):
                return self.sortOrder() == Qt.DescendingOrder

        return super(FilesystemSortProxy, self).lessThan(left, right)
def lessThan(self, left, right):
        '''Return ordering of *left* vs *right*.'''
        sourceModel = self.sourceModel()
        if sourceModel:
            leftItem = sourceModel.item(left)
            rightItem = sourceModel.item(right)

            if (isinstance(leftItem, Directory)
                and not isinstance(rightItem, Directory)):
                return self.sortOrder() == Qt.AscendingOrder

            elif (not isinstance(leftItem, Directory)
                and isinstance(rightItem, Directory)):
                return self.sortOrder() == Qt.DescendingOrder

        return super(FilesystemSortProxy, self).lessThan(left, right)
def lessThan ( self , left , right ) : sourceModel = self . sourceModel ( ) if sourceModel : leftItem = sourceModel . item ( left ) rightItem = sourceModel . item ( right ) if ( isinstance ( leftItem , Directory ) and not isinstance ( rightItem , Directory ) ) : return self . sortOrder ( ) == Qt . AscendingOrder elif ( not isinstance ( leftItem , Directory ) and isinstance ( rightItem , Directory ) ) : return self . sortOrder ( ) == Qt . DescendingOrder return super ( FilesystemSortProxy , self ) . lessThan ( left , right )
Return ordering of *left* vs *right*.
Return ordering of * left * vs * right * .