# Path: pythics/settings.py
# _TRY_PYSIDE = True


import sys
    import PySide2.QtCore as _QtCore
    import PySide2.QtGui as _QtGui
    import PySide2.QtWidgets as _QtWidgets
    import PySide2.QtPrintSupport as _QtPrintSupport
    import PyQt5.QtCore as _QtCore
    import PyQt5.QtGui as _QtGui
    import PyQt5.QtWidgets as _QtWidgets
    import PyQt5.QtPrintSupport as _QtPrintSupport
from math import pi, isinf, sqrt, asin, ceil, cos, sin
from pythics.settings import _TRY_PYSIDE
        painter.setBrush(QtCore.Qt.red)
        self.polygon = QtGui.QPolygon()
        # easy way to set polygon is
        #self.polygon.setPoints(0,-2,int(radius)-scaleWidth,-2,int(radius)-scaleWidth/2,0,
        #                  int(radius)-scaleWidth,2,0,2)
        # but that doesn't work in PySide
        # instead, use
        self.polygon.append(QtCore.QPoint(0, -2))
        self.polygon.append(QtCore.QPoint(int(radius)-scaleWidth, -2))
        self.polygon.append(QtCore.QPoint(int(radius)-scaleWidth/2, 0))
        self.polygon.append(QtCore.QPoint(int(radius)-scaleWidth, 2))
        self.polygon.append(QtCore.QPoint(0, 2))

        painter.drawConvexPolygon(self.polygon)
        painter.resetTransform()
        
        # draw cover
        painter.setPen(QtCore.Qt.NoPen)
        painter.setBrush(self.palette().color(QtGui.QPalette.Mid))
        
        if vertical:
            painter.drawRect(QtCore.QRect(0,0,self.m_borderWidth,self.height()))
            center = QtCore.QPoint(self.width()-center.y()-wLabel/4.0, 0.5*self.height())
            u = 0.25*(hWidget-wLabel)-center.x()-self.m_borderWidth
        else:
            pass
            painter.drawRect(QtCore.QRect(0,hWidget,wWidget, -self.m_borderWidth))
            u = center.y() - self.m_borderWidth - 0.75*hWidget
        
        u = max(u,0.25*radius)

# Path: pythics/settings.py
# _TRY_PYSIDE = True


# Path: pythics/meter.py
import sys
    import PySide2.QtCore as _QtCore
    import PySide2.QtGui as _QtGui
    import PySide2.QtWidgets as _QtWidgets
    import PySide2.QtPrintSupport as _QtPrintSupport
    import PyQt5.QtCore as _QtCore
    import PyQt5.QtGui as _QtGui
    import PyQt5.QtWidgets as _QtWidgets
    import PyQt5.QtPrintSupport as _QtPrintSupport
from math import pi, isinf, sqrt, asin, ceil, cos, sin
from pythics.settings import _TRY_PYSIDE

        painter.setBrush(QtCore.Qt.red)
        self.polygon = QtGui.QPolygon()
        # easy way to set polygon is
        #self.polygon.setPoints(0,-2,int(radius)-scaleWidth,-2,int(radius)-scaleWidth/2,0,
        #                  int(radius)-scaleWidth,2,0,2)
        # but that doesn't work in PySide
        # instead, use
        self.polygon.append(QtCore.QPoint(0, -2))
        self.polygon.append(QtCore.QPoint(int(radius)-scaleWidth, -2))
        self.polygon.append(QtCore.QPoint(int(radius)-scaleWidth/2, 0))
        self.polygon.append(QtCore.QPoint(int(radius)-scaleWidth, 2))
        self.polygon.append(QtCore.QPoint(0, 2))

        painter.drawConvexPolygon(self.polygon)
        painter.resetTransform()
        
        # draw cover
        painter.setPen(QtCore.Qt.NoPen)
        painter.setBrush(self.palette().color(QtGui.QPalette.Mid))
        
        if vertical:
            painter.drawRect(QtCore.QRect(0,0,self.m_borderWidth,self.height()))
            center = QtCore.QPoint(self.width()-center.y()-wLabel/4.0, 0.5*self.height())
            u = 0.25*(hWidget-wLabel)-center.x()-self.m_borderWidth
        else:
            pass
            painter.drawRect(QtCore.QRect(0,hWidget,wWidget, -self.m_borderWidth))
            u = center.y() - self.m_borderWidth - 0.75*hWidget
        
        u = max(u,0.25*radius)

        painter.drawEllipse(center, u, u)