comparison src/gui/pages/statistics.cpp @ 75:d3e9310598b1

*: refactor some stuff text: "TextParagraph"s are now called sections, because that's the actual word for it :P text: new classes: Line and OneLineSection, solves many problems with paragraphs that are only one line long (ex. going out of bounds) http: reworked http stuff to allow threaded get requests, also moved it to its own file to (hopefully) remove clutter eventually I'll make a threaded post request method and use that in the "basic" function
author Paper <mrpapersonic@gmail.com>
date Wed, 04 Oct 2023 01:42:30 -0400
parents fe719c109dbc
children
comparison
equal deleted inserted replaced
74:5ccb99bfa605 75:d3e9310598b1
20 QPalette pal = QPalette(); 20 QPalette pal = QPalette();
21 pal.setColor(QPalette::Window, pal.color(QPalette::Base)); 21 pal.setColor(QPalette::Window, pal.color(QPalette::Base));
22 setPalette(pal); 22 setPalette(pal);
23 setAutoFillBackground(true); 23 setAutoFillBackground(true);
24 24
25 TextWidgets::LabelledTextParagraph* anime_list_paragraph = new TextWidgets::LabelledTextParagraph( 25 TextWidgets::LabelledSection* anime_list_paragraph = new TextWidgets::LabelledSection(
26 tr("Anime list"), 26 tr("Anime list"),
27 tr("Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:"), 27 tr("Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:"),
28 "\n\n\n\n\n\n", this); 28 "\n\n\n\n\n\n", 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::LabelledSection* application_paragraph =
32 new TextWidgets::LabelledTextParagraph(tr("Minori"), tr("Uptime:\nRequests made:"), "\n\n", this); 32 new TextWidgets::LabelledSection(tr("Minori"), tr("Uptime:\nRequests made:"), "\n\n", 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 layout->addStretch(); 37 layout->addStretch();