diff -r 44bfd9e7e65e -r 6deb942739dc TimeTracker/TimeTrackEntry.py --- a/TimeTracker/TimeTrackEntry.py Thu Dec 30 11:20:04 2021 +0100 +++ b/TimeTracker/TimeTrackEntry.py Thu Dec 30 12:37:37 2021 +0100 @@ -91,62 +91,7 @@ self.__valid = True return self.__id - -## def toString(self): -## """ -## Public method to get a string representation of the entry. -## -## @return string representation of the entry (string) -## """ -## if self.__valid: -## dataLine = TimeTrackEntry.Separator.join([ -## str(self.__id), -## self.__startDateTime.toString(Qt.DateFormat.ISODate), -## str(self.__duration), -## self.__task, -## self.__comment, -## ]) -## return "{0}{1}".format(TimeTrackEntry.LineMarker, dataLine) -## else: -## return "" -## -## def fromString(self, line): -## """ -## Public method to populate the entry from the given string. -## -## @param line stringified entry data as generated by toString() (string) -## @return ID of the tracker entry; -1 indicates an error (integer) -## """ -## if not line.startswith(TimeTrackEntry.LineMarker): -## return -1 -## -## line = line.replace(TimeTrackEntry.LineMarker, "") -## dataList = line.split(TimeTrackEntry.Separator) -## if len(dataList) != self.__entryMembersCount: -## return -1 -## -## try: -## self.__id = int(dataList[0]) -## except ValueError: -## return -1 -## -## dt = QDateTime.fromString(dataList[1], Qt.DateFormat.ISODate) -## if not dt.isValid(): -## return -1 -## self.__startDateTime = dt -## -## try: -## dt = int(dataList[2]) -## except ValueError: -## return -1 -## self.__duration = dt -## -## self.__task = dataList[3] -## self.__comment = dataList[4] -## -## self.__valid = True -## return self.__id -## + def isValid(self): """ Public method to check the validity of the entry.