TimeTracker/TimeTrackEntry.py

changeset 2
058c6a316ca8
parent 1
a0beac325e5a
child 3
ce9309868f8a
equal deleted inserted replaced
1:a0beac325e5a 2:058c6a316ca8
28 self.__comment = "" # comment string 28 self.__comment = "" # comment string
29 self.__valid = False # flag for a valid entry 29 self.__valid = False # flag for a valid entry
30 30
31 self.__continueDateTime = QDateTime() 31 self.__continueDateTime = QDateTime()
32 self.__paused = False 32 self.__paused = False
33
34 def __lt__(self, other):
35 """
36 Special method implementing the less than function.
37
38 @param other reference to the other object (TimeTrackEntry)
39 """
40 return self.__startDateTime < other.getStartDateTime()
33 41
34 def toString(self): 42 def toString(self):
35 """ 43 """
36 Public method to get a string representation of the entry. 44 Public method to get a string representation of the entry.
37 45
186 self.__duration, 194 self.__duration,
187 self.__task, 195 self.__task,
188 self.__comment, 196 self.__comment,
189 self.__paused, 197 self.__paused,
190 ) 198 )
199
200 def getStartDateTime(self):
201 """
202 Public method to get the start date and time.
203
204 @return start date and time (QDateTime)
205 """
206 return self.__startDateTime

eric ide

mercurial