Exemplo n.º 1
0
    def __init__( self, parent = None ):

        FilesBrowser.__init__( self, FileSystemBrowserModel(), False, parent )

        self.setWindowTitle( 'Filesystem browser' )
        self.setWindowIcon( PixmapCache().getIcon( 'icon.png' ) )

        GlobalData().project.fsChanged.connect( self._onFSChanged )
        return
Exemplo n.º 2
0
    def __init__(self, parent=None):

        FilesBrowser.__init__(self, FileSystemBrowserModel(), False, parent)

        self.setWindowTitle('Filesystem browser')
        self.setWindowIcon(PixmapCache().getIcon('icon.png'))

        GlobalData().project.fsChanged.connect(self._onFSChanged)
        return
Exemplo n.º 3
0
    def __init__( self, uuid, shortName, info, parent = None ):

        FilesBrowser.__init__( self, OutlineBrowserModel( shortName, info ),
                               False, parent )

        self.__bufferUUID = uuid
        self.__bufferBroken = False

        self.header().setAutoFillBackground( True )
        self.__origHeaderBackground = self.__getOriginalHeaderBackground()
        self.__brokenHeaderBackground = self.__getBrokenHeaderBackground()
        self.setHeaderHighlight( False )

        self.setWindowTitle( 'File outline' )
        self.setWindowIcon( PixmapCache().getIcon( 'icon.png' ) )
        return
Exemplo n.º 4
0
    def __init__(self, uuid, shortName, info, parent=None):

        FilesBrowser.__init__(self, OutlineBrowserModel(shortName, info),
                              False, parent)

        self.__bufferUUID = uuid
        self.__bufferBroken = False

        self.header().setAutoFillBackground(True)
        self.__origHeaderBackground = self.__getOriginalHeaderBackground()
        self.__brokenHeaderBackground = self.__getBrokenHeaderBackground()
        self.setHeaderHighlight(False)

        self.setWindowTitle('File outline')
        self.setWindowIcon(PixmapCache().getIcon('icon.png'))
        return
Exemplo n.º 5
0
    def drawBranches( self, painter, rect, index ):
        """ Helps to draw the solid highlight line for the project browser.
            This part is responsible for the beginning of the background line
            till +/- icon.
            See also the ProjectBrowserModel::data(...) method which draws
            the rest of the background
            http://stackoverflow.com/questions/14255224/changing-the-row-background-color-of-a-qtreeview-does-not-work
        """
        if index.isValid():
            if index != self.currentIndex():
                item = self.model().item( index )
                if item.vcsStatus:
                    indicator = self.__mainWindow.vcsManager.getStatusIndicator( item.vcsStatus )
                    if indicator and indicator.backgroundColor:
                        painter.fillRect( rect, indicator.backgroundColor )

        FilesBrowser.drawBranches( self, painter, rect, index )
        return
Exemplo n.º 6
0
    def drawBranches(self, painter, rect, index):
        """ Helps to draw the solid highlight line for the project browser.
            This part is responsible for the beginning of the background line
            till +/- icon.
            See also the ProjectBrowserModel::data(...) method which draws
            the rest of the background
            http://stackoverflow.com/questions/14255224/changing-the-row-background-color-of-a-qtreeview-does-not-work
        """
        if index.isValid():
            if index != self.currentIndex():
                item = self.model().item(index)
                if item.vcsStatus:
                    indicator = self.__mainWindow.vcsManager.getStatusIndicator(
                        item.vcsStatus)
                    if indicator and indicator.backgroundColor:
                        painter.fillRect(rect, indicator.backgroundColor)

        FilesBrowser.drawBranches(self, painter, rect, index)
        return
Exemplo n.º 7
0
    def __init__(self, parent):

        self.__mainWindow = parent
        FilesBrowser.__init__(self, ProjectBrowserModel(self.__mainWindow),
                              True, self.__mainWindow)

        self.setWindowTitle('Project browser')
        self.setWindowIcon(PixmapCache().getIcon('icon.png'))

        GlobalData().project.projectChanged.connect(self.__onProjectChanged)
        GlobalData().project.fsChanged.connect(self._onFSChanged)

        # VCS status support
        self.connect(GlobalData().pluginManager, SIGNAL('PluginDeactivated'),
                     self.__onPluginDeactivated)
        self.connect(self.__mainWindow.vcsManager, SIGNAL("VCSFileStatus"),
                     self.__onVCSFileStatus)
        self.connect(self.__mainWindow.vcsManager, SIGNAL("VCSDirStatus"),
                     self.__onVCSDirStatus)
        return
Exemplo n.º 8
0
    def __init__( self, parent ):

        self.__mainWindow = parent
        FilesBrowser.__init__( self, ProjectBrowserModel( self.__mainWindow ),
                               True, self.__mainWindow )

        self.setWindowTitle( 'Project browser' )
        self.setWindowIcon( PixmapCache().getIcon( 'icon.png' ) )

        GlobalData().project.projectChanged.connect( self.__onProjectChanged )
        GlobalData().project.fsChanged.connect( self._onFSChanged )

        # VCS status support
        self.connect( GlobalData().pluginManager, SIGNAL( 'PluginDeactivated' ),
                      self.__onPluginDeactivated )
        self.connect( self.__mainWindow.vcsManager,
                      SIGNAL( "VCSFileStatus" ), self.__onVCSFileStatus )
        self.connect( self.__mainWindow.vcsManager,
                      SIGNAL( "VCSDirStatus" ), self.__onVCSDirStatus )
        return