annotate src/gui/pages/statistics.cc @ 198:bc1ae1810855

dep/animia: switch from using classes to global functions the old idea was ok, but sort of hackish; this method doesn't use classes at all, and this way (especially important!) we can do wayland stuff AND x11 at the same time, which wasn't really possible without stupid workarounds in the other method
author Paper <mrpapersonic@gmail.com>
date Sun, 24 Dec 2023 02:59:42 -0500
parents 649786bae914
children 4d461ef7d424
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"
187
9613d72b097e *: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents: 178
diff changeset
3 #include "core/strings.h"
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
4 #include "core/session.h"
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 #include "gui/pages/anime_list.h"
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
6 #include "gui/widgets/text.h"
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
7 #include "gui/widgets/graph.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
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16 #include <sstream>
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
17
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
18 StatisticsPage::StatisticsPage(QWidget* parent) : QFrame(parent) {
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
19 QVBoxLayout* layout = new QVBoxLayout(this);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
20
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
21 setFrameShape(QFrame::Box);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
22 setFrameShadow(QFrame::Sunken);
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
23
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
24 setAutoFillBackground(true);
37
9ae9365dd4ea window.cpp: fix sidebar on Linux
Paper <mrpapersonic@gmail.com>
parents: 15
diff changeset
25
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
26 _anime_list.reset(new TextWidgets::LabelledSection(
51
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 49
diff changeset
27 tr("Anime list"),
63
3d2decf093bb *: fix many clang warnings
Paper <mrpapersonic@gmail.com>
parents: 51
diff changeset
28 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
29 "", this));
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
30 layout->addWidget(_anime_list.get());
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
31
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
32 {
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
33 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
34 QVBoxLayout* score_dist_layout = new QVBoxLayout(score_dist_widget);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
35
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
36 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
37
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
38 /* Ew */
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
39 {
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
40 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
41 QVBoxLayout* score_parent_layout = new QVBoxLayout(score_graph_parent);
94
2f373d48f889 *: etc changes to graph stuff
Paper <mrpapersonic@gmail.com>
parents: 93
diff changeset
42
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
43 _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
44 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
45
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
46 score_parent_layout->setSpacing(0);
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
47 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
48
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
49 score_graph_parent->setContentsMargins(3, 0, 0, 0);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
50
172
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
51 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
52 }
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_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
55
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
56 layout->addWidget(score_dist_widget);
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
57 }
45a0967485f1 graph, statistics: make my code a little less messy
Paper <mrpapersonic@gmail.com>
parents: 105
diff changeset
58
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
59
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
60 _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
61 layout->addWidget(_application.get());
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
62
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
63 layout->addStretch();
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
64
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
65 QTimer* timer = new QTimer(this);
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
66 connect(timer, &QTimer::timeout, this, [this] {
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
67 if (isVisible())
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
68 UpdateStatistics();
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
69 });
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
70 timer->start(1000); // update statistics every second
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
71 }
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
72
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
73 void StatisticsPage::showEvent(QShowEvent*) {
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
74 UpdateStatistics();
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
75 }
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
76
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
77 /* me abusing macros :) */
189
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
78 static void add_time_segment(std::ostringstream& str, int x, const std::string_view& s, const std::string_view& p) {
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
79 if (x > 0)
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
80 str << x << ((x == 1) ? s : p);
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
81 }
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
82
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents: 94
diff changeset
83 std::string StatisticsPage::MinutesToDateString(const int minutes) {
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
84 /* ew */
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
85 int years = (minutes * (1 / 525949.2F));
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
86 int months = (minutes * (1 / 43829.1F)) - (years * 12);
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
87 int days = (minutes * (1 / 1440.0F)) - (years * 365.2425F) - (months * 30.436875F);
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
88 int hours = (minutes * (1 / 60.0F)) - (years * 8765.82F) - (months * 730.485F) - (days * 24);
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
89 int rest_minutes = (minutes) - (years * 525949.2F) - (months * 43829.1F) - (days * 1440) - (hours * 60);
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
90 std::ostringstream return_stream;
189
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
91 add_time_segment(return_stream, years, " year ", " years ");
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
92 add_time_segment(return_stream, months, " month ", " months ");
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
93 add_time_segment(return_stream, days, " day ", " days ");
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
94 add_time_segment(return_stream, hours, " hour ", " hours ");
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
95 if (rest_minutes > 0 || return_stream.str().size() == 0)
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
96 return_stream << rest_minutes << ((rest_minutes == 1) ? " minute" : " minutes");
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
97 return return_stream.str();
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
98 }
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
99
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents: 94
diff changeset
100 std::string StatisticsPage::SecondsToDateString(const int sec) {
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
101 /* this is all fairly unnecessary, but works:tm: */
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
102 int years = sec * (1 / 31556952.0F);
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
103 int months = sec * (1 / 2629746.0F) - (years * 12);
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
104 int days = sec * (1 / 86400.0F) - (years * 365.2425F) - (months * 30.436875F);
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
105 int hours = sec * (1 / 3600.0F) - (years * 8765.82F) - (months * 730.485F) - (days * 24);
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
106 int minutes = (sec) * (1 / 60.0F) - (years * 525949.2F) - (months * 43829.1F) - (days * 1440.0F) - (hours * 60.0F);
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
107 int seconds =
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
108 sec - (years * 31556952.0F) - (months * 2629746.0F) - (days * 86400.0F) - (hours * 3600.0F) - (minutes * 60.0F);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
109 std::ostringstream return_stream;
189
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
110 add_time_segment(return_stream, years, " year ", " years ");
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
111 add_time_segment(return_stream, months, " month ", " months ");
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
112 add_time_segment(return_stream, days, " day ", " days ");
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
113 add_time_segment(return_stream, hours, " hour ", " hours ");
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 187
diff changeset
114 add_time_segment(return_stream, minutes, " minute ", " minutes ");
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
115 if (seconds > 0 || return_stream.str().size() == 0)
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
116 return_stream << seconds << ((seconds == 1) ? " second" : " seconds");
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
117 return return_stream.str();
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
118 }
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
119
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents: 94
diff changeset
120 inline int GetTotalWithScore(const int score) {
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
121 int count = 0;
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
122 for (const auto& item : Anime::db.items)
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
123 if (item.second.IsInUserList() && item.second.GetUserScore() == score)
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
124 count++;
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
125 return count;
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
126 }
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
127
64
fe719c109dbc *: update
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
128 void StatisticsPage::UpdateStatistics() {
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
129 /* Anime list */
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
130 QString string = "";
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
131 QTextStream ts(&string);
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
132 ts << Anime::db.GetTotalAnimeAmount() << '\n';
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
133 ts << Anime::db.GetTotalEpisodeAmount() << '\n';
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
134 ts << MinutesToDateString(Anime::db.GetTotalWatchedAmount()).c_str() << '\n';
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
135 ts << MinutesToDateString(Anime::db.GetTotalPlannedAmount()).c_str() << '\n';
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
136 ts << Anime::db.GetAverageScore() << '\n';
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
137 ts << Anime::db.GetScoreDeviation();
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
138 _anime_list->GetParagraph()->SetText(string);
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
139
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
140 _score_distribution_graph->Clear();
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
141 for (int i = 10; i <= 100; i += 10)
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
142 _score_distribution_graph->AddItem(i, GetTotalWithScore(i));
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
143
47
d8eb763e6661 information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
144 string = "";
187
9613d72b097e *: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents: 178
diff changeset
145 ts << Strings::ToQString(SecondsToDateString(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
146 ts << session.GetRequests();
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
147 /* Application */
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
148 // UiUtils::SetPlainTextEditData(application_data, QString::number(session.uptime() / 1000));
93
d5efb81540b3 statistics: add graph!
Paper <mrpapersonic@gmail.com>
parents: 83
diff changeset
149 _application->GetParagraph()->SetText(string);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
150 }
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
151
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
152 #include "gui/pages/moc_statistics.cpp"