--- a/TimeTracker/TimeTrackEntry.py Fri Oct 19 13:06:56 2012 +0200 +++ b/TimeTracker/TimeTrackEntry.py Fri Oct 19 15:54:12 2012 +0200 @@ -31,6 +31,14 @@ self.__continueDateTime = QDateTime() self.__paused = False + def __lt__(self, other): + """ + Special method implementing the less than function. + + @param other reference to the other object (TimeTrackEntry) + """ + return self.__startDateTime < other.getStartDateTime() + def toString(self): """ Public method to get a string representation of the entry. @@ -188,3 +196,11 @@ self.__comment, self.__paused, ) + + def getStartDateTime(self): + """ + Public method to get the start date and time. + + @return start date and time (QDateTime) + """ + return self.__startDateTime