annotate src/gui/pages/statistics.cc @ 295:b82841e76e79

*: better support on Windows things now look much better in dark mode
author Paper <paper@paper.us.eu.org>
date Sun, 12 May 2024 20:24:09 -0400
parents 9a88e1725fd2
children 91ac90a34003
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #include "gui/pages/statistics.h"
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
2 #include "core/anime_db.h"
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
3 #include "core/session.h"
187
9613d72b097e *: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents: 178
diff changeset
4 #include "core/strings.h"
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 #include "gui/pages/anime_list.h"
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
6 #include "gui/widgets/graph.h"
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
7 #include "gui/widgets/text.h"
178
bc8d2ccff09c win32/dark: use existing STL classes for dwmapi
Paper <mrpapersonic@gmail.com>
parents: 172
diff changeset
8
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 #include <QString>
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 #include <QTextDocument>
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11 #include <QTextStream>
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12 #include <QTimer>
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13 #include <QVBoxLayout>
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14 #include <QWidget>
178
bc8d2ccff09c win32/dark: use existing STL classes for dwmapi
Paper <mrpapersonic@gmail.com>
parents: 172
diff changeset
15
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
16 #include <cmath>
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
17 #include <sstream>
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
18
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
19 enum class TimeUnits {
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
20 SECONDS,
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
21 MINUTES
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
22 };
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
23
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
24 StatisticsPage::StatisticsPage(QWidget* parent) : QFrame(parent) {
295
b82841e76e79 *: better support on Windows
Paper <paper@paper.us.eu.org>
parents: 291
diff changeset
25 setBackgroundRole(QPalette::Base);
b82841e76e79 *: better support on Windows
Paper <paper@paper.us.eu.org>
parents: 291
diff changeset
26
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
27 QVBoxLayout* layout = new QVBoxLayout(this);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
28
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
29 setFrameShape(QFrame::Box);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
30 setFrameShadow(QFrame::Sunken);
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
31
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
32 setAutoFillBackground(true);
37
9ae9365dd4ea window.cpp: fix sidebar on Linux
Paper <mrpapersonic@gmail.com>
parents: 15
diff changeset
33
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
34 _anime_list.reset(new TextWidgets::LabelledSection(
51
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 49
diff changeset
35 tr("Anime list"),
63
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 51
diff changeset
36 tr("Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:"),
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
37 "", this));
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
38 layout->addWidget(_anime_list.get());
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
39
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
40 {
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
41 QWidget* score_dist_widget = new QWidget(this);
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
42 QVBoxLayout* score_dist_layout = new QVBoxLayout(score_dist_widget);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
43
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
44 score_dist_layout->addWidget(new TextWidgets::Header(tr("Score distribution"), score_dist_widget));
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
45
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
46 /* Ew */
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
47 {
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
48 QWidget* score_graph_parent = new QWidget(score_dist_widget);
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
49 QVBoxLayout* score_parent_layout = new QVBoxLayout(score_graph_parent);
94
2f373d48f889 *: etc changes to graph stuff
Paper <mrpapersonic@gmail.com>
parents: 93
diff changeset
50
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
51 _score_distribution_graph.reset(new Graph<int>(score_graph_parent));
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
52 score_parent_layout->addWidget(_score_distribution_graph.get());
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
53
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
54 score_parent_layout->setSpacing(0);
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
55 score_parent_layout->setContentsMargins(12, 0, 0, 0);
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
56
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
57 score_dist_layout->addWidget(score_graph_parent);
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
58 }
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
59
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
60 score_dist_layout->setContentsMargins(0, 0, 0, 0);
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
61
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
62 layout->addWidget(score_dist_widget);
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
63 }
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
64
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
65 _application.reset(new TextWidgets::LabelledSection(tr("Minori"), tr("Uptime:\nRequests made:"), "\n\n", this));
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
66 layout->addWidget(_application.get());
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
67
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
68 layout->addStretch();
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
69
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
70 QTimer* timer = new QTimer(this);
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
71 connect(timer, &QTimer::timeout, this, [this] {
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
72 if (isVisible())
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
73 UpdateStatistics();
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
74 });
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
75 timer->start(1000); // update statistics every second
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
76 }
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
77
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
78 void StatisticsPage::showEvent(QShowEvent*) {
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
79 UpdateStatistics();
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
80 }
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
81
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
82 /* [in] enum TimeUnits unit:
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
83 * which unit to stop on
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
84 * [in] int amount:
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
85 * amount of units to parse
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
86 * [in, defaults to 1.0] double unit_in_seconds:
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
87 * equivalent of one of 'amount' in seconds, e.g. minutes would be 60.0
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
88 */
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
89 static std::string TimeToDateString(TimeUnits unit, int amount, double unit_in_seconds = 1.0) {
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
90 /* avoid calculating this twice */
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
91 const double years_conv = (31556952.0 / unit_in_seconds);
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
92 const double months_conv = (2629746.0 / unit_in_seconds);
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
93 const double days_conv = (86400.0 / unit_in_seconds);
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
94 const double hours_conv = (3600.0 / unit_in_seconds);
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
95 const double minutes_conv = (60.0 / unit_in_seconds);
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
96 const double seconds_conv = (1.0 / unit_in_seconds);
189
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
97
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
98 const int years = amount / years_conv;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
99 const int months = std::fmod(amount, years_conv) / months_conv;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
100 const int days = std::fmod(amount, months_conv) / days_conv;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
101 const int hours = std::fmod(amount, days_conv) / hours_conv;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
102 const int minutes = std::fmod(amount, hours_conv) / minutes_conv;
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
103 const int seconds = std::fmod(amount, minutes_conv) / seconds_conv;
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
104
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
105 const auto add_time_segment = [](std::ostringstream& str, int amount, const std::string_view& singular,
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 254
diff changeset
106 const std::string_view& plural, bool always = false) {
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
107 if (amount > 0 || always)
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
108 str << amount << ((amount == 1) ? singular : plural);
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
109 };
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
110
295
b82841e76e79 *: better support on Windows
Paper <paper@paper.us.eu.org>
parents: 291
diff changeset
111 /* for now, this function is very en_US specific */
b82841e76e79 *: better support on Windows
Paper <paper@paper.us.eu.org>
parents: 291
diff changeset
112
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
113 std::ostringstream string;
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
114 add_time_segment(string, years, " year ", " years ");
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
115 add_time_segment(string, months, " month ", " months ");
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
116 add_time_segment(string, days, " day ", " days ");
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
117 add_time_segment(string, hours, " hour ", " hours ");
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
118
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
119 if (unit == TimeUnits::MINUTES) {
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
120 add_time_segment(string, minutes, " minute", " minutes", true);
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
121 return string.str();
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
122 } else {
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
123 add_time_segment(string, minutes, " minute ", " minutes ");
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
124 }
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
125
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
126 add_time_segment(string, seconds, " second", " seconds", true);
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
127 return string.str();
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
128 }
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
129
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents: 94
diff changeset
130 inline int GetTotalWithScore(const int score) {
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
131 int count = 0;
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
132 for (const auto& item : Anime::db.items)
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
133 if (item.second.IsInUserList() && item.second.GetUserScore() == score)
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
134 count++;
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
135 return count;
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
136 }
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
137
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
138 void StatisticsPage::UpdateStatistics() {
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
139 /* Anime list */
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
140 QString string = "";
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
141 QTextStream ts(&string);
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
142 ts << Anime::db.GetTotalAnimeAmount() << '\n';
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
143 ts << Anime::db.GetTotalEpisodeAmount() << '\n';
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
144 ts << Strings::ToQString(TimeToDateString(TimeUnits::MINUTES, Anime::db.GetTotalWatchedAmount(), 60.0)) << '\n';
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
145 ts << Strings::ToQString(TimeToDateString(TimeUnits::MINUTES, Anime::db.GetTotalPlannedAmount(), 60.0)) << '\n';
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
146 ts << Anime::db.GetAverageScore() << '\n';
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
147 ts << Anime::db.GetScoreDeviation();
291
9a88e1725fd2 *: refactor lots of stuff
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
148 _anime_list->GetData()->setText(string);
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
149
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
150 _score_distribution_graph->Clear();
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
151 for (int i = 10; i <= 100; i += 10)
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
152 _score_distribution_graph->AddItem(i, GetTotalWithScore(i));
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
153
47
d8eb763e6661 information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
154 string = "";
250
c130f47f6f48 *: many many changes
Paper <paper@paper.us.eu.org>
parents: 236
diff changeset
155 ts << Strings::ToQString(TimeToDateString(TimeUnits::SECONDS, session.uptime() / 1000)) << '\n';
47
d8eb763e6661 information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
156 ts << session.GetRequests();
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
157 /* Application */
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
158 // UiUtils::SetPlainTextEditData(application_data, QString::number(session.uptime() / 1000));
291
9a88e1725fd2 *: refactor lots of stuff
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
159 _application->GetData()->setText(string);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
160 }