| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | // Copyright 2016 Dolphin Emulator Project
 | 
					
						
							|  |  |  | // Licensed under GPLv2+
 | 
					
						
							|  |  |  | // Refer to the license.txt file included.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QLabel>
 | 
					
						
							|  |  |  | #include <QTextEdit>
 | 
					
						
							|  |  |  | #include <QVBoxLayout>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-09 15:52:35 -04:00
										 |  |  | #include "Common/Version.h"
 | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | #include "DolphinQt2/AboutDialog.h"
 | 
					
						
							|  |  |  | #include "DolphinQt2/Resources.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  | AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent) | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   setWindowTitle(tr("About Dolphin")); | 
					
						
							| 
									
										
										
										
											2017-06-29 18:52:53 -06:00
										 |  |  |   setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   QString text = QStringLiteral(""); | 
					
						
							| 
									
										
										
										
											2017-09-14 17:10:00 +02:00
										 |  |  |   QString small = QStringLiteral("<p style='margin-top:0; margin-bottom:0; font-size:small;'>"); | 
					
						
							|  |  |  |   QString medium = QStringLiteral("<p style='margin-top:15px;'>"); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-14 17:10:00 +02:00
										 |  |  |   text.append(QStringLiteral("<p style='font-size:38pt; font-weight:400; margin-bottom:0;'>") + | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |               tr("Dolphin") + QStringLiteral("</p>")); | 
					
						
							| 
									
										
										
										
											2017-09-14 17:10:00 +02:00
										 |  |  |   text.append(QStringLiteral("<p style='font-size:18pt; margin-top:0;'>%1</p>") | 
					
						
							| 
									
										
										
										
											2017-09-09 15:52:35 -04:00
										 |  |  |                   .arg(QString::fromUtf8(Common::scm_desc_str.c_str()))); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-09 15:52:35 -04:00
										 |  |  |   text.append(small + tr("Branch: ") + QString::fromUtf8(Common::scm_branch_str.c_str()) + | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |               QStringLiteral("</p>")); | 
					
						
							| 
									
										
										
										
											2017-09-09 15:52:35 -04:00
										 |  |  |   text.append(small + tr("Revision: ") + QString::fromUtf8(Common::scm_rev_git_str.c_str()) + | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |               QStringLiteral("</p>")); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   text.append(medium + tr("Check for updates: ") + | 
					
						
							|  |  |  |               QStringLiteral( | 
					
						
							|  |  |  |                   "<a href='https://dolphin-emu.org/download'>dolphin-emu.org/download</a></p>")); | 
					
						
							| 
									
										
										
										
											2017-07-23 12:58:32 +02:00
										 |  |  |   // i18n: The word "free" in the standard phrase "free and open source"
 | 
					
						
							|  |  |  |   // is "free" as in "freedom" - it refers to certain properties of the
 | 
					
						
							|  |  |  |   // software's license, not the software's price. (It is true that Dolphin
 | 
					
						
							|  |  |  |   // can be downloaded at no cost, but that's not what this message says.)
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   text.append(medium + tr("Dolphin is a free and open-source GameCube and Wii emulator.") + | 
					
						
							|  |  |  |               QStringLiteral("</p>")); | 
					
						
							|  |  |  |   text.append(medium + | 
					
						
							|  |  |  |               tr("This software should not be used to play games you do not legally own.") + | 
					
						
							|  |  |  |               QStringLiteral("</p>")); | 
					
						
							|  |  |  |   text.append( | 
					
						
							|  |  |  |       medium + | 
					
						
							|  |  |  |       QStringLiteral( | 
					
						
							|  |  |  |           "<a href='https://github.com/dolphin-emu/dolphin/blob/master/license.txt'>%1</a> | " | 
					
						
							|  |  |  |           "<a href='https://github.com/dolphin-emu/dolphin/graphs/contributors'>%2</a> | " | 
					
						
							|  |  |  |           "<a href='https://forums.dolphin-emu.org/'>%3</a></p>") | 
					
						
							| 
									
										
										
										
											2017-07-23 12:58:32 +02:00
										 |  |  |           .arg(tr("License")) | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |           .arg(tr("Authors")) | 
					
						
							|  |  |  |           .arg(tr("Support"))); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   QLabel* text_label = new QLabel(text); | 
					
						
							|  |  |  |   text_label->setTextInteractionFlags(Qt::TextBrowserInteraction); | 
					
						
							|  |  |  |   text_label->setOpenExternalLinks(true); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   QLabel* copyright = | 
					
						
							| 
									
										
										
										
											2017-09-14 17:34:04 +02:00
										 |  |  |       new QLabel(small + | 
					
						
							| 
									
										
										
										
											2017-11-02 14:32:16 +01:00
										 |  |  |                  // i18n: This message uses curly quotes in English. If you want to use curly quotes
 | 
					
						
							|  |  |  |                  // in your translation, please use the type of curly quotes that's appropriate for
 | 
					
						
							|  |  |  |                  // your language. If you aren't sure which type is appropriate, see
 | 
					
						
							|  |  |  |                  // https://en.wikipedia.org/wiki/Quotation_mark#Specific_language_features
 | 
					
						
							| 
									
										
										
										
											2017-09-14 17:34:04 +02:00
										 |  |  |                  tr("\u00A9 2003-2015+ Dolphin Team. \u201cGameCube\u201d and \u201cWii\u201d are " | 
					
						
							|  |  |  |                     "trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.") + | 
					
						
							|  |  |  |                  QStringLiteral("</p>")); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   QLabel* logo = new QLabel(); | 
					
						
							|  |  |  |   logo->setPixmap(Resources::GetMisc(Resources::LOGO_LARGE)); | 
					
						
							|  |  |  |   logo->setContentsMargins(30, 0, 30, 0); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   QVBoxLayout* main_layout = new QVBoxLayout; | 
					
						
							|  |  |  |   QHBoxLayout* h_layout = new QHBoxLayout; | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   setLayout(main_layout); | 
					
						
							|  |  |  |   main_layout->addLayout(h_layout); | 
					
						
							|  |  |  |   main_layout->addWidget(copyright); | 
					
						
							|  |  |  |   copyright->setAlignment(Qt::AlignCenter); | 
					
						
							|  |  |  |   copyright->setContentsMargins(0, 15, 0, 0); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-24 10:43:46 +02:00
										 |  |  |   h_layout->setAlignment(Qt::AlignLeft); | 
					
						
							|  |  |  |   h_layout->addWidget(logo); | 
					
						
							|  |  |  |   h_layout->addWidget(text_label); | 
					
						
							| 
									
										
										
										
											2016-02-11 22:59:44 +11:00
										 |  |  | } |