Mercurial > minori
comparison src/gui/pages/anime_list.cc @ 324:5d3c9b31aa6e
anime: add completed date member
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 12 Jun 2024 23:03:22 -0400 |
parents | 1b5c04268d6a |
children | b5d6c27c308f |
comparison
equal
deleted
inserted
replaced
323:1686fac290c5 | 324:5d3c9b31aa6e |
---|---|
141 QString::number(list[index.row()].GetEpisodes()); | 141 QString::number(list[index.row()].GetEpisodes()); |
142 case AL_EPISODES: return list[index.row()].GetEpisodes(); | 142 case AL_EPISODES: return list[index.row()].GetEpisodes(); |
143 case AL_SCORE: return Strings::ToQString(list[index.row()].GetUserPresentableScore()); | 143 case AL_SCORE: return Strings::ToQString(list[index.row()].GetUserPresentableScore()); |
144 case AL_TYPE: return Strings::ToQString(Translate::ToString(list[index.row()].GetFormat())); | 144 case AL_TYPE: return Strings::ToQString(Translate::ToString(list[index.row()].GetFormat())); |
145 case AL_SEASON: { | 145 case AL_SEASON: { |
146 std::optional<unsigned int> year = list[index.row()].GetAirDate().GetYear(); | 146 std::optional<unsigned int> year = list[index.row()].GetStartedDate().GetYear(); |
147 if (!year) | 147 if (!year) |
148 return tr("Unknown Unknown"); | 148 return tr("Unknown Unknown"); |
149 return Strings::ToQString(Translate::ToLocalString(list[index.row()].GetSeason()) + " " + | 149 return Strings::ToQString(Translate::ToLocalString(list[index.row()].GetSeason()) + " " + |
150 Strings::ToUtf8String(year.value())); | 150 Strings::ToUtf8String(year.value())); |
151 } | 151 } |
164 case Qt::UserRole: | 164 case Qt::UserRole: |
165 switch (index.column()) { | 165 switch (index.column()) { |
166 case AL_PROGRESS: return list[index.row()].GetUserProgress(); | 166 case AL_PROGRESS: return list[index.row()].GetUserProgress(); |
167 case AL_SCORE: return list[index.row()].GetUserScore(); | 167 case AL_SCORE: return list[index.row()].GetUserScore(); |
168 case AL_TYPE: return static_cast<int>(list[index.row()].GetFormat()); | 168 case AL_TYPE: return static_cast<int>(list[index.row()].GetFormat()); |
169 case AL_SEASON: return list[index.row()].GetAirDate().GetAsQDate(); | 169 case AL_SEASON: return list[index.row()].GetStartedDate().GetAsQDate(); |
170 case AL_AVG_SCORE: return list[index.row()].GetAudienceScore(); | 170 case AL_AVG_SCORE: return list[index.row()].GetAudienceScore(); |
171 case AL_UPDATED: return QVariant::fromValue(list[index.row()].GetUserTimeUpdated()); | 171 case AL_UPDATED: return QVariant::fromValue(list[index.row()].GetUserTimeUpdated()); |
172 default: return data(index, Qt::DisplayRole); | 172 default: return data(index, Qt::DisplayRole); |
173 } | 173 } |
174 break; | 174 break; |