Example #1
0
    def drawShape( self, painter ):
        size = self.rect().size()

        #print "drawShape(%s) [%s] <%s>" % (self.rect(),self._orig.name(),self._parentView.tileColor( self._orig ))

        if size.height() < 1 or size.width() < 1 :
            return

        def iconv(name) :
            result = ""
            for letter in name :
                if ord(letter) < 255 :
                    result += chr(ord(letter))
                else :
                    result += "."
            return result

        painter.addrect(
            x=self.rect().x(),
            y=self.rect().y(),
            width=self.rect().width(),
            height=self.rect().height(),
            color=self._parentView.tileColor( self._orig ),
            filename=self._orig.url(),
            #filenamestr=str(self._orig.url().encode('iso-8859-1','replace')),
            #filenamestr=str(iconv(self._orig.url())),
            #filenamestr=iconv(self._orig.url()),
            filenamestr=iconv(self._orig.url()),
            filesize=fmtsize(self._orig.totalSize())
            )
    def drawShape( self, painter ):
        """Draw the tile in a painter/dumper."""
        size = self.rect().size()

        if size.height() < 1 or size.width() < 1 :
            return

        def iconv(name) :
            result = ""
            for letter in name :
                if ord(letter) < 255 :
                    result += chr(ord(letter))
                else :
                    result += "."
            return result

        painter.addrect(
            x=self.rect().x(),
            y=self.rect().y(),
            width=self.rect().width(),
            height=self.rect().height(),
            color=self.tileColor(),
            filename=self._fileinfo.url(),
            filenamestr=iconv(self._fileinfo.url()),
            filesize=fmtsize(self._fileinfo.totalArea())
            )
Example #3
0
 def get_metadata(self) :
     '''This method may be called by plugin to print metadata'''
     return [
         ('Generator', 'pydirstat'),
         ('Version', __version__),
         ('Directory', os.path.abspath(self._rootpath)),
         ('Total Size',fmtsize(self._treemapview.rootTile().fileinfo().totalSize())),
         ('Date', time.strftime("%Y-%m-%d %H:%M:%S",time.localtime())),
         ('Configuration File',self._configuration.get_filename()),
         ('Python version',sys.version),
         ]
Example #4
0
 def get_metadata(self) :
     '''This method may be called by plugin to print metadata'''
     return [
         ('Generator', 'pydirstat'),
         ('Version', __version__),
         ('Directory', os.path.abspath(self._rootpath)),
         ('Date', time.strftime("%Y-%m-%d %H:%M:%S",time.localtime())),
         ('Configuration File',self._configuration.get_filename()),
         ('Total Size',fmtsize(self._tmv.rootTile().orig().totalSize())),
         ('Python version',sys.version),
         ]
Example #5
0
 def get_metadata(self):
     """This method may be called by plugin to print metadata"""
     return [
         ("Generator", "pydirstat"),
         ("Version", __version__),
         ("Directory", os.path.abspath(self._rootpath)),
         ("Date", time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())),
         ("Configuration File", self._configuration.get_filename()),
         ("Total Size", fmtsize(self._tmv.rootTile().orig().totalSize())),
         ("Python version", sys.version),
     ]
    def drawShape(self, painter):
        """Draw the tile in a painter/dumper."""
        size = self.rect().size()

        if size.height() < 1 or size.width() < 1:
            return

        def iconv(name):
            result = ""
            for letter in name:
                if ord(letter) < 255:
                    result += chr(ord(letter))
                else:
                    result += "."
            return result

        painter.addrect(x=self.rect().x(),
                        y=self.rect().y(),
                        width=self.rect().width(),
                        height=self.rect().height(),
                        color=self.tileColor(),
                        filename=self._fileinfo.url(),
                        filenamestr=iconv(self._fileinfo.url()),
                        filesize=fmtsize(self._fileinfo.totalArea()))