Mercurial > minori
comparison src/gui/pages/statistics.cpp @ 47:d8eb763e6661
information.cpp: add widgets to the list tab, and add an
"optional date" widget like taiga has so users can specify whether to
set the date or not
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Mon, 25 Sep 2023 00:43:38 -0400 |
| parents | d0adc4aedfc8 |
| children | e613772f41d5 |
comparison
equal
deleted
inserted
replaced
| 46:d0adc4aedfc8 | 47:d8eb763e6661 |
|---|---|
| 27 "Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:", "\n\n\n\n\n", | 27 "Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:", "\n\n\n\n\n", |
| 28 this); | 28 this); |
| 29 anime_list_data = anime_list_paragraph->GetParagraph(); | 29 anime_list_data = anime_list_paragraph->GetParagraph(); |
| 30 | 30 |
| 31 TextWidgets::LabelledTextParagraph* application_paragraph = | 31 TextWidgets::LabelledTextParagraph* application_paragraph = |
| 32 new TextWidgets::LabelledTextParagraph("Minori", "Uptime:", "", this); | 32 new TextWidgets::LabelledTextParagraph("Minori", "Uptime:\nRequests made:", "", this); |
| 33 application_data = application_paragraph->GetParagraph(); | 33 application_data = application_paragraph->GetParagraph(); |
| 34 | 34 |
| 35 layout()->addWidget(anime_list_paragraph); | 35 layout()->addWidget(anime_list_paragraph); |
| 36 layout()->addWidget(application_paragraph); | 36 layout()->addWidget(application_paragraph); |
| 37 ((QBoxLayout*)layout())->addStretch(); | 37 ((QBoxLayout*)layout())->addStretch(); |
| 102 ts << MinutesToDateString(Anime::db.GetTotalPlannedAmount()).c_str() << '\n'; | 102 ts << MinutesToDateString(Anime::db.GetTotalPlannedAmount()).c_str() << '\n'; |
| 103 ts << Anime::db.GetAverageScore() << '\n'; | 103 ts << Anime::db.GetAverageScore() << '\n'; |
| 104 ts << Anime::db.GetScoreDeviation(); | 104 ts << Anime::db.GetScoreDeviation(); |
| 105 TextWidgets::SetPlainTextEditData(anime_list_data, string); | 105 TextWidgets::SetPlainTextEditData(anime_list_data, string); |
| 106 | 106 |
| 107 string = ""; | |
| 108 ts << QString::fromUtf8(SecondsToDateString(session.uptime() / 1000).c_str()) << '\n'; | |
| 109 ts << session.GetRequests(); | |
| 107 /* Application */ | 110 /* Application */ |
| 108 // UiUtils::SetPlainTextEditData(application_data, QString::number(session.uptime() / 1000)); | 111 // UiUtils::SetPlainTextEditData(application_data, QString::number(session.uptime() / 1000)); |
| 109 TextWidgets::SetPlainTextEditData(application_data, QString(SecondsToDateString(session.uptime() / 1000).c_str())); | 112 TextWidgets::SetPlainTextEditData(application_data, string); |
| 110 } | 113 } |
| 111 | 114 |
| 112 #include "gui/pages/moc_statistics.cpp" | 115 #include "gui/pages/moc_statistics.cpp" |
