MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / About

Method About

DSView/pv/dialogs/about.cpp:42–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40namespace dialogs {
41
42About::About(QWidget *parent) :
43 DSDialog(parent, true)
44{
45 setFixedHeight(600);
46 setFixedWidth(800);
47
48 #if defined(__x86_64__) || defined(_M_X64)
49 QString arch = "x64";
50 #elif defined(__i386) || defined(_M_IX86)
51 QString arch = "x86";
52 #elif defined(__arm__) || defined(_M_ARM)
53 QString arch = "arm";
54 #elif defined(__aarch64__)
55 QString arch = "arm64";
56 #else
57 QString arch = "other";
58 #endif
59
60 QString version = tr("<font size=24>DSView %1 (%2)</font><br />")
61 .arg(QApplication::applicationVersion())
62 .arg(arch);
63
64 QString site_url = QApplication::organizationDomain();
65 if (site_url.startsWith("http") == false){
66 site_url = "https://" + site_url;
67 }
68
69 QString url = tr("Website: <a href=\"%1\" style=\"color:#C0C0C0\">%1</a><br />"
70 "Github: <a href=\"%2\" style=\"color:#C0C0C0\">%2</a><br />"
71 "Copyright: <label href=\"#\" style=\"color:#C0C0C0\">%3</label><br />"
72 "<br /><br />")
73 .arg(site_url)
74 .arg("https://github.com/DreamSourceLab/DSView")
75 .arg(tr("© DreamSourceLab. All rights reserved."));
76
77 QString thanks = tr("<font size=16>Special Thanks</font><br />"
78 "<a href=\"%1\" style=\"color:#C0C0C0\">All backers on kickstarter</a><br />"
79 "<a href=\"%2\" style=\"color:#C0C0C0\">All members of Sigrok project</a><br />"
80 "All contributors of all open-source projects</a><br />"
81 "<br /><br />")
82 .arg("https://www.kickstarter.com/projects/dreamsourcelab/dslogic-multifunction-instruments-for-everyone")
83 .arg("http://sigrok.org/");
84
85 QString changlogs = tr("<font size=16>Changelogs</font><br />");
86
87 QDir dir(GetAppDataDir());
88 AppConfig &app = AppConfig::Instance();
89 int lan = app.frameOptions.language;
90
91 QString filename = dir.absolutePath() + "/NEWS" + QString::number(lan);
92 QFile news(filename);
93 if (news.open(QIODevice::ReadOnly)) {
94
95 QTextStream stream(&news);
96 encoding::set_utf8(stream);
97
98 QString line;
99 while (!stream.atEnd()){

Callers

nothing calls this directly

Calls 3

GetAppDataDirFunction · 0.85
set_utf8Function · 0.85
closeMethod · 0.80

Tested by

no test coverage detected