Ejemplo n.º 1
0
 def styleQwtPlot(self,name,elem):
     font = QFont()
     font.setPixelSize(12)
     title = QwtText(name)
     title.setFont(font)
     elem.setTitle(title)
     canvas = elem.canvas()
     canvas.setLineWidth(0);
     elem.setCanvas(canvas)
Ejemplo n.º 2
0
def qwtUnscaleFont(painter):
    if painter.font().pixelSize() >= 0:
        return
    screenResolution = qwtScreenResolution()
    pd = painter.device()
    if pd.logicalDpiX() != screenResolution.width() or\
       pd.logicalDpiY() != screenResolution.height():
        pixelFont = QFont(painter.font(), QApplication.desktop())
        pixelFont.setPixelSize(QFontInfo(pixelFont).pixelSize())
        painter.setFont(pixelFont)
Ejemplo n.º 3
0
def qwtUnscaleFont(painter):
    if painter.font().pixelSize() >= 0:
        return
    screenResolution = qwtScreenResolution()
    pd = painter.device()
    if pd.logicalDpiX() != screenResolution.width() or\
       pd.logicalDpiY() != screenResolution.height():
        pixelFont = QFont(painter.font(), QApplication.desktop())
        pixelFont.setPixelSize(QFontInfo(pixelFont).pixelSize())
        painter.setFont(pixelFont)
Ejemplo n.º 4
0
 def styleQwtPlot(self, name, elem):
     font = QFont()
     font.setPixelSize(24)
     title = QwtText(name)
     title.setFont(font)
     elem.setTitle(title)