Exemplo n.º 1
0
    def __init__(self, parent):
        QtGui.QPlainTextEdit.__init__(self, parent)
        font = self.document().defaultFont()
        font.setPixelSize(1)
        self.document().setDefaultFont(font)
        self.setWordWrapMode(QtGui.QTextOption.NoWrap)
        self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.setReadOnly(True)
        self.setCenterOnScroll(True)
        self.setMouseTracking(True)
        self.viewport().setCursor(QtCore.Qt.PointingHandCursor)
        self.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)

        self.editor = None
        self.highlighter = None
        self.lines_count = 0

        self.goe = QtGui.QGraphicsOpacityEffect()
        self.setGraphicsEffect(self.goe)
        self.goe.setOpacity(50)
        self.animation = QtCore.QPropertyAnimation(self.goe, "opacity")

        self.slider = SliderArea(self)
        self.slider.show()
        self.setFixedWidth(60)
Exemplo n.º 2
0
    def __init__(self, parent):
        '''
        This label is managed from PMXMessageOverlay mixin, should not be
        used outside this module
        '''
        QtGui.QLabel.__init__(self, parent)
        
        self.setStyleSheet(self.STYLESHEET)
        self.linkActivated.connect(self.linkHandler)
        
        self.goe = QtGui.QGraphicsOpacityEffect(self)
        self.setGraphicsEffect(self.goe)

        self.timeoutTimer = QtCore.QTimer(self)
        self.timeoutTimer.setSingleShot(True)
        
        self.animationIn = QtCore.QPropertyAnimation(self.goe, "opacity")
        self.animationIn.setDuration(300)
        self.animationIn.setStartValue(0)
        self.animationIn.setEndValue(1.0)
        self.animationIn.finished.connect(self.timeoutTimer.start)

        self.animationOut = QtCore.QPropertyAnimation(self.goe, "opacity")
        self.animationOut.setDuration(300)
        self.animationOut.setStartValue(1.0)
        self.animationOut.setEndValue(0)
        self.animationOut.finished.connect(self.hide)

        self.timeoutTimer.timeout.connect(self.animationOut.start)
        self.hide()
Exemplo n.º 3
0
    def __init__(self, parent):
        QtGui.QFrame.__init__(self, parent)
        self._parent = parent
        self.setMouseTracking(True)
        self.setCursor(QtCore.Qt.OpenHandCursor)
        self.setStyleSheet("background: red;")
        self.goe = QtGui.QGraphicsOpacityEffect()
        self.setGraphicsEffect(self.goe)
        self.goe.setOpacity(50 / 2)

        self.pressed = False
        self.__scroll_margins = None