comparison src/gui/pages/statistics.cpp @ 51:75c804f713b2

window: add about window, *: use tr() when applicable (useful for i18n)
author Paper <mrpapersonic@gmail.com>
date Mon, 25 Sep 2023 20:29:26 -0400
parents f4bea5ef5b8a
children 3d2decf093bb
comparison
equal deleted inserted replaced
50:10868c3fb2be 51:75c804f713b2
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::LabelledTextParagraph* anime_list_paragraph = new TextWidgets::LabelledTextParagraph(
26 "Anime list", 26 tr("Anime list"),
27 "Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:", "\n\n\n\n\n\n", 27 tr("Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:"), "\n\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:\nRequests made:", "\n\n", this); 32 new TextWidgets::LabelledTextParagraph(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 ((QBoxLayout*)layout())->addStretch(); 37 ((QBoxLayout*)layout())->addStretch();