[Pymoul-svn] SF.net SVN: pymoul: [241] pymoul/trunk/src/moul
Status: Alpha
Brought to you by:
tiran
|
From: <ti...@us...> - 2007-03-08 02:28:10
|
Revision: 241
http://pymoul.svn.sourceforge.net/pymoul/?rev=241&view=rev
Author: tiran
Date: 2007-03-07 18:28:11 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Fixed name of Pahrtahvo
Modified Paths:
--------------
pymoul/trunk/src/moul/qt/dninumbers.py
pymoul/trunk/src/moul/time/dni.py
Modified: pymoul/trunk/src/moul/qt/dninumbers.py
===================================================================
--- pymoul/trunk/src/moul/qt/dninumbers.py 2007-03-08 02:12:19 UTC (rev 240)
+++ pymoul/trunk/src/moul/qt/dninumbers.py 2007-03-08 02:28:11 UTC (rev 241)
@@ -586,7 +586,7 @@
self._prorahn = dnitime._prorahn
#self.clocktext.setPlainText(str(dnitime))
- self.circle.setPahrtovo(dnitime.getPahrtovoFraction())
+ self.circle.setPahrtahvo(dnitime.getPahrtahvoFraction())
hahr = decimal2dni(dnitime.hahr, digits=3)
self.hahrl.setNumber(hahr[0])
@@ -615,15 +615,15 @@
def __init__(self, parent=None, scene=None):
QtGui.QGraphicsItem.__init__(self, parent, scene)
- self._pahrtovo = 0.0
+ self._Pahrtahvo = 0.0
self._dni = QDniNumbers()
def boundingRect(self):
return self.outrect
- def setPahrtovo(self, value):
- if value != self._pahrtovo:
- self._pahrtovo = value
+ def setPahrtahvo(self, value):
+ if value != self._Pahrtahvo:
+ self._Pahrtahvo = value
self.update()
def paint(self, painter, option, widget):
@@ -672,7 +672,7 @@
painter.restore()
# number
- pm = self._dni.get(self._pahrtovo, height=self.pm_height)
+ pm = self._dni.get(self._Pahrtahvo, height=self.pm_height)
w = pm.width()
posx, posy = self.center[0]-w/2.0, self.center[1]-25.0-self.pm_height
#painter.save()
@@ -688,7 +688,7 @@
pen.setWidthF(2.5)
pen.setCapStyle(Qt.RoundCap)
painter.setPen(pen)
- rot = self.angel * self._pahrtovo + self.offset
+ rot = self.angel * self._Pahrtahvo + self.offset
end = QtCore.QPointF(self.center[0] + (self.r-self.rdot) * math.cos(rot),
self.center[1] + (self.r-self.rdot) * math.sin(rot))
painter.drawLine(QtCore.QPointF(*self.center), end)
Modified: pymoul/trunk/src/moul/time/dni.py
===================================================================
--- pymoul/trunk/src/moul/time/dni.py 2007-03-08 02:12:19 UTC (rev 240)
+++ pymoul/trunk/src/moul/time/dni.py 2007-03-08 02:28:11 UTC (rev 241)
@@ -57,11 +57,11 @@
>>> compareDT(dni.toUTC(), other)
True
->>> dni.pahrtovo
+>>> dni.pahrtahvo
24
->>> dni.secondsToPahrtovo(25)
+>>> dni.secondsToPahrtahvo(25)
2616
->>> dni.secondsToPahrtovo(18)
+>>> dni.secondsToPahrtahvo(18)
80964
>>> dni = DniTime.fromDni(9655, 1, 1, 0, 0, 0, 0)
@@ -144,7 +144,7 @@
PRORAHN_PER_VAILEE = 2265625 # ~ 36 days, 25 * 25 * 25 * 5 * 29
PRORAHN_PER_YAHR = 78125 # ~30h 14min, 25 * 25 * 25 * 5
PRORAHN_PER_GAHRTAHVO = 15625 # ~6h 3min, 25 * 25 * 25
-PRORAHN_PER_PAHRTOVO = 3125 # ~74min, 25 * 25 * 5
+PRORAHN_PER_PAHRTAHVO = 3125 # ~74min, 25 * 25 * 5
PRORAHN_PER_TAHVO = 625 # ~14,5 min, 25 * 25
PRORAHN_PER_GORAHN = 25 # ~34,8 sec, 25
FACTOR_SP = float(SECONDS_PER_HAHR) / float(PRORAHN_PER_HAHR) # 1.39285737931
@@ -205,7 +205,7 @@
vailee month 10 per year
yahr day 29 per vailee, about 30h 14min
gahrtahvo section about 6h, 3min
- pahrtovo hour about 1h 14min
+ pahrtahvo hour about 1h 14min
tahvo quarter about 14,5min
gorahn minute 36 seconds
prorahn second about 1.3929 seconds
@@ -279,8 +279,8 @@
td = timedelta(days=0, seconds=hahr_sec + prorahn_sec)
return UTC.normalize(BASE_GREGORIAN + td)
- def secondsToPahrtovo(self, bell):
- """Calculate seconds until bell (pahr-to-vo)
+ def secondsToPahrtahvo(self, bell):
+ """Calculate seconds until bell (pahr-ah-vo)
"""
if bell < 1 or bell > 25:
raise ValueError("%s too large or small" % bell)
@@ -330,12 +330,12 @@
self._addProrahn(value * PRORAHN_PER_GAHRTAHVO)
gahrtahvo = property(_getGahrtahvo, _setGahrtahvo)
- def _getPahrtovo(self):
- return (self._prorahn // PRORAHN_PER_PAHRTOVO) % 25
- pahrtovo = property(_getPahrtovo)
+ def _getPahrtahvo(self):
+ return (self._prorahn // PRORAHN_PER_PAHRTAHVO) % 25
+ pahrtahvo = property(_getPahrtahvo)
- def getPahrtovoFraction(self):
- """Get Pahrtovo with decimal fraction
+ def getPahrtahvoFraction(self):
+ """Get Pahrtahvo with decimal fraction
"""
return ((self._prorahn // PRORAHN_PER_TAHVO) % 125) / 5.0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|