Prepare loading of events from load dialog into main window

Add nicer label for counting events by type
This commit is contained in:
Xevion
2021-08-25 07:13:24 -05:00
parent 0d6909a9b1
commit ce3759bd60
5 changed files with 57 additions and 12 deletions

View File

@@ -140,7 +140,7 @@ class Event(object):
table.setItem(row, 3, QTableWidgetItem(self.end.strftime(formatString)))
@classmethod
def parse_raw(self, input: Tuple[str]) -> 'Event':
def parse_raw(cls, input: Tuple[str]) -> 'Event':
"""Takes in input that has been separated by a RegEx expression into groups and creates a Event object"""
first_time = re.match(TIME_REGEX, input[2]) is not None
second_time = re.match(TIME_REGEX, input[3 + (1 if first_time else 0)])