diff src/gui/dialog/information.cpp @ 15:cde8f67a7c7d

*: update, megacommit :)
author Paper <mrpapersonic@gmail.com>
date Tue, 19 Sep 2023 22:36:08 -0400
parents 4b198a111713
children 2743011a6042
line wrap: on
line diff
--- a/src/gui/dialog/information.cpp	Tue Sep 19 16:33:07 2023 -0400
+++ b/src/gui/dialog/information.cpp	Tue Sep 19 22:36:08 2023 -0400
@@ -13,7 +13,7 @@
 #include <functional>
 
 InformationDialog::InformationDialog(Anime::Anime& anime, std::function<void()> accept, QWidget* parent)
-	: QDialog(parent) {
+    : QDialog(parent) {
 	setFixedSize(842, 613);
 	setWindowTitle(tr("Anime Information"));
 	setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
@@ -33,7 +33,7 @@
 
 	/* anime title header text */
 	UiUtils::Paragraph* anime_title =
-		new UiUtils::Paragraph(QString::fromUtf8(anime.GetUserPreferredTitle().c_str()), main_widget);
+	    new UiUtils::Paragraph(QString::fromUtf8(anime.GetUserPreferredTitle().c_str()), main_widget);
 	anime_title->setReadOnly(true);
 	anime_title->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
 	anime_title->setWordWrapMode(QTextOption::NoWrap);
@@ -53,25 +53,25 @@
 
 	/* alt titles */
 	main_information_widget->layout()->addWidget(new UiUtils::SelectableTextParagraph(
-		"Alternative titles", QString::fromUtf8(Strings::Implode(anime.GetTitleSynonyms(), ", ").c_str()),
-		main_information_widget));
+	    "Alternative titles", QString::fromUtf8(Strings::Implode(anime.GetTitleSynonyms(), ", ").c_str()),
+	    main_information_widget));
 
 	/* details */
 	QString details_data;
 	QTextStream details_data_s(&details_data);
-	details_data_s << Translate::TranslateSeriesFormat(anime.GetFormat()).c_str() << "\n"
-				   << anime.GetEpisodes() << "\n"
-				   << Translate::TranslateListStatus(anime.GetUserStatus()).c_str() << "\n"
-				   << Translate::TranslateSeriesSeason(anime.GetSeason()).c_str() << " " << anime.GetAirDate().GetYear()
-				   << "\n"
-				   << Strings::Implode(anime.GetGenres(), ", ").c_str() << "\n"
-				   << anime.GetAudienceScore() << "%";
+	details_data_s << Translate::ToString(anime.GetFormat()).c_str() << "\n"
+	               << anime.GetEpisodes() << "\n"
+	               << Translate::ToString(anime.GetUserStatus()).c_str() << "\n"
+	               << Translate::ToString(anime.GetSeason()).c_str() << " " << anime.GetAirDate().GetYear()
+	               << "\n"
+	               << Strings::Implode(anime.GetGenres(), ", ").c_str() << "\n"
+	               << anime.GetAudienceScore() << "%";
 	main_information_widget->layout()->addWidget(new UiUtils::LabelledTextParagraph(
-		"Details", "Type:\nEpisodes:\nStatus:\nSeason:\nGenres:\nScore:", details_data, main_information_widget));
+	    "Details", "Type:\nEpisodes:\nStatus:\nSeason:\nGenres:\nScore:", details_data, main_information_widget));
 
 	/* synopsis */
 	UiUtils::SelectableTextParagraph* synopsis = new UiUtils::SelectableTextParagraph(
-		"Synopsis", QString::fromUtf8(anime.GetSynopsis().c_str()), main_information_widget);
+	    "Synopsis", QString::fromUtf8(anime.GetSynopsis().c_str()), main_information_widget);
 
 	synopsis->GetParagraph()->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
 	((QVBoxLayout*)main_information_widget->layout())->addWidget(synopsis);