• R/O
  • SSH
  • HTTPS

twitturn: Commit


Commit MetaInfo

Revision79 (tree)
Zeit2010-02-27 16:10:52
Autoryoucharmanums

Log Message

* ticker2.py pilot lamp blinking animation added.

Ändern Zusammenfassung

Diff

--- trunk/ticker2.py (revision 78)
+++ trunk/ticker2.py (revision 79)
@@ -46,7 +46,7 @@
4646 p.fillRect(self.rect(), Qt.transparent)
4747
4848 p.setPen( QPen( Qt.black, 1, Qt.SolidLine))
49- p.setBrush( QColor(0,0,0,64))
49+ p.setBrush( QColor(0,0,0,86))
5050 p.drawRoundedRect(self.rect(), 5, 5)
5151
5252 if self.sock.state() == QAbstractSocket.ConnectedState:
@@ -62,6 +62,8 @@
6262 self.displayStringBoundRect,
6363 self.displayStringPosition
6464 )
65+ if 25 < self.displayStringPosition%30 < 30:
66+ paintBlinkingIndicator(p, self.indicatorRect)
6567
6668 p.end()
6769
@@ -127,6 +129,11 @@
127129 p.setBrush(Qt.green)
128130 p.drawEllipse(rect)
129131 pass
132+def paintBlinkingIndicator(p, rect):
133+ p.setPen( QPen( Qt.black, 1, Qt.SolidLine))
134+ p.setBrush(Qt.black)
135+ p.drawEllipse(rect)
136+ pass
130137
131138 def paintText(p, text, rect, x):
132139 p.setPen(Qt.white)
Show on old repository browser