15 #include <QApplication>
18 #include <QDesktopServices>
19 #include <QDialogButtonBox>
23 #include <QFontMetrics>
24 #include <QHBoxLayout>
28 #include <QPlainTextEdit>
30 #include <QTextBrowser>
31 #include <QTextStream>
34 #include <QVBoxLayout>
37 #include "../util/btconnect.h"
38 #include "../util/bticons.h"
39 #include "../util/directory.h"
43 #include <swversion.h>
46 #define MAKE_STYLE(t) "<style type=\"text/css\">"\
48 "background-color:" + (t)->palette().color(QPalette::Window).name() + ";"\
49 "color:" + (t)->palette().color(QPalette::WindowText).name() +\
51 "h3{font-weight:bold;text-align:center}"\
52 "a{text-decoration:underline}"\
53 "a:link{color:" + (t)->palette().color(QPalette::Link).name() + "}"\
54 "a:visited{color:" + (t)->palette().color(QPalette::LinkVisited).name() + "}"\
56 #define MAKE_HTML(t,x) "<html><head>" MAKE_STYLE(t) "</head><body>" + (x) + "</body></html>"
57 #define MAKE_LINK(c,u,t) "<a href=\"" u "\">"; (c) += (t); (c) += "</a>"
58 #define MAKE_LINK_STATIC(u,t) "<a href=\"" u "\">" t "</a>"
59 #define MAKE_CONTR(c,n,r) "<li>" n " (";\
62 #define MAKE_CONTR2(c,n,r,r2) "<li>" n " (";\
77 auto *
const mainLayout =
new QVBoxLayout(
this);
84 QFont licenseFont(QStringLiteral(
"BibleTime nonexistant font"));
85 licenseFont.setStyleHint(QFont::Monospace);
106 setAttribute(Qt::WA_DeleteOnClose);
109 QVBoxLayout *mainLayout =
new QVBoxLayout;
112 QHBoxLayout *topLayout =
new QHBoxLayout;
118 font.setPointSize(font.pointSize()+6);
122 top->setLayout(topLayout);
123 mainLayout->addWidget(top, 0, Qt::AlignCenter);
128 auto const addTab = [
this]{
130 tab->setOpenLinks(
false);
133 [](QUrl
const & url) {
134 if (url.scheme() ==
"qt") {
137 QDesktopServices::openUrl(url);
150 QFile licenseFile(licensePath);
151 if (licenseFile.open(QFile::ReadOnly)) {
157 qWarning() <<
"Failed to read license from" << licensePath;
161 m_buttonBox =
new QDialogButtonBox(QDialogButtonBox::Close, Qt::Horizontal,
this);
163 setLayout(mainLayout);
166 this, &BtAboutDialog::reject);
173 QString version =
"BibleTime " BT_VERSION;
176 QString shortVersion = fm.elidedText(version, Qt::ElideMiddle, w);
181 setWindowTitle(tr(
"About BibleTime"));
195 QString content(
"<p>");
196 content += tr(
"BibleTime is an easy to use but powerful Bible study tool.");
197 content +=
"</p><p>";
198 content += tr(
"(c)1999-2021, The BibleTime Team");
199 content +=
"</p><p>" MAKE_LINK_STATIC(
"https://bibletime.info",
"bibletime.info")
207 const QString developer(tr(
"developer"));
208 const QString designer(tr(
"designer"));
209 const QString artist(tr(
"artist"));
215 QString content(
"<p><b>");
216 content += tr(
"The following people contributed to BibleTime:");
217 content +=
"</b></p><ul>"
218 MAKE_CONTR(content,
"Thomas Abthorpe", tr(
"documentation and translation manager"))
219 MAKE_CONTR2(content,
"Joachim Ansorg", tr(
"project founder"), developer)
222 MAKE_CONTR(content,
"Timothy R. Butler", designer)
223 MAKE_CONTR(content,
"Jim Campbell", developer)
224 MAKE_CONTR(content,
"Lee Carpenter", developer)
225 MAKE_CONTR(content,
"Jeremy Erickson", tr(
"packager"))
226 MAKE_CONTR(content,
"Troy A. Griffitts", tr(
"creator of The Sword Project"))
227 MAKE_CONTR(content,
"Martin Gruner", developer)
228 MAKE_CONTR(content,
"Thomas Hagedorn", tr(
"domain sponsor"))
229 MAKE_CONTR(content,
"Bob Harman", tr(
"howto"))
230 MAKE_CONTR(content,
"Gary Holmlund", developer)
231 MAKE_CONTR(content,
"Nikolay Igotti", developer)
232 MAKE_CONTR(content,
"Laurent Valentin Jospin", artist)
233 MAKE_CONTR(content,
"Eeli Kaikkonnen", developer)
234 MAKE_CONTR(content,
"Chris Kujawa", developer)
235 MAKE_CONTR(content,
"Mark Lybarger", developer)
236 MAKE_CONTR(content,
"Konstantin Maslyuk", developer)
237 MAKE_CONTR(content,
"Luke Mauldin", developer)
240 MAKE_CONTR2(content,
"Jaak Ristioja", tr(
"project manager"), developer)
241 MAKE_CONTR(content,
"Fred Saalbach", tr(
"documentation"))
242 MAKE_CONTR(content,
"Erik Schanze", tr(
"documentation"))
244 MAKE_CONTR2(content,
"Wolfgang Stradner", tr(
"tester"), tr(
"usability expert"))
246 MAKE_CONTR(content,
"Thorsten Uhlmann", developer)
247 MAKE_CONTR(content,
"John Turpish", developer)
250 MAKE_CONTR(content,
"Patrick Sebastian Zimmermann", developer)
257 content += tr(
"The following people translated BibleTime into their language:");
258 content +=
"</b></p><ul>"
259 "<li>Roy Alvear Aguirre</li>"
260 "<li>Horatiu Alexe</li>"
261 "<li>Andrew Alfy</li>"
262 "<li>Jan Bělohoubek</li>"
263 "<li>Luis Barron</li>"
264 "<li>Mário Castanheira</li>"
265 "<li>Chun-shek Chan</li>"
266 "<li>Ján Ďanovský</li>"
267 "<li>Nouhoun Y. Diarra</li>"
268 "<li>Rafael Fagundes</li>"
269 "<li>Eeli Kaikkonen</li>"
270 "<li>Ilpo Kantonen</li>"
271 "<li>Pavel Laukko</li>"
272 "<li>Johan van der Lingen</li>"
273 "<li>Piotr Markiewicz</li>"
274 "<li>Konstantin Maslyuk</li>"
275 "<li>Géza Novák</li>"
276 "<li>Gabriel Pérez</li>"
277 "<li>Igor Plisco</li>"
278 "<li>Zdenko Podobný</li>"
279 "<li>Jaak Ristioja</li>"
280 "<li>Igor Rykhlin</li>"
281 "<li>Vlad Savitsky</li>"
282 "<li>Jean Van Schaftingen</li>"
283 "<li>Flavio Theodor de Lima Silva</li>"
284 "<li>Henrik Sonesson</li>"
285 "<li>Giovanni Tedaldi</li>"
286 "<li>Roland Teschner</li>"
287 "<li>Damian Wrzalski</li>"
288 "<li>Dmitry Yurevich</li>"
289 "<li>Esteban Zeller</li>"
290 "<li>Aaron Zhou</li>"
292 content += tr(
"Some names may be missing, please file an issue at %1 if "
294 "https://github.com/bibletime/bibletime/issues",
295 "https://github.com/bibletime/bibletime/issues"));
305 QString version(sword::SWVersion::currentVersion.getText());
306 QString content(
"<h3>");
307 content += tr(
"SWORD library version %1").arg(version);
308 content +=
"</h3><p>";
309 content += tr(
"BibleTime makes use of the SWORD Project. The SWORD Project is the "
310 "CrossWire Bible Society's free Bible software project. Its purpose is to "
311 "create cross-platform open-source tools — covered by the GNU "
312 "General Public License — that allow programmers and Bible "
313 "societies to write new Bible software more quickly and easily.");
314 content +=
"</p><p>";
315 content += tr(
"The SWORD Project: ");
317 "www.crosswire.org/sword")
"</p>";
325 QString content(
"<h3>");
326 content += tr(
"Qt toolkit version %1").arg(qVersion());
327 content +=
"</h3><p>";
328 content += tr(
"This program uses Qt version %1.").arg(qVersion());
329 content +=
"</p><p>";
330 content += tr(
"Qt is a cross-platform application and UI framework, created with C++ "
331 "language. It has been released under the LGPL license.");
333 content +=
" " MAKE_LINK(content,
"qt://about", tr(
"More info..."))
"</p>";
345 QStringLiteral(
"<p>%1</p><p>%2</p>")
346 .arg(tr(
"BibleTime is released under the GPL license. You "
347 "can download and use the program for personal, "
348 "private, public or commercial purposes without "
349 "restrictions, but can give away or distribute the "
350 "program only if you also distribute the "
351 "corresponding source code."),
352 tr(
"The complete legally binding license is below.")));
#define MAKE_LINK(c, u, t)
#define MAKE_CONTR(c, n, r)
#define MAKE_CONTR2(c, n, r, r2)
#define MAKE_LINK_STATIC(u, t)
void setLicense(QString const &license)
QPlainTextEdit *const m_licenseBrowser
LicenseTab(QWidget *parent)
void setLabelText(QString const &text)
BtAboutDialog(QWidget *parent=nullptr, Qt::WindowFlags wflags=Qt::Dialog)
QTextBrowser * m_bibletimeTab
QTextBrowser * m_swordTab
QDialogButtonBox * m_buttonBox
void retranslateSwordTab()
void retranslateLicenceTab()
void retranslateContributorsTab()
void resizeEvent(QResizeEvent *event) override
QTextBrowser * m_contributorsTab
LicenseTab * m_licenseTab
static BtIcons & instance()
void prepareDialogBox(QDialogButtonBox *box)
QString const & getLicensePath()