MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / showAbout

Method showAbout

gui/qt/mainwindow.cpp:1803–1851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1801#endif
1802
1803void MainWindow::showAbout() {
1804 QMessageBox *aboutBox = new QMessageBox(this);
1805
1806 aboutBox->setStyleSheet("QLabel{min-width: 620px;}");
1807 aboutBox->setWindowTitle(tr("About CEmu"));
1808
1809 QAbstractButton *buttonUpdateCheck = aboutBox->addButton(tr("Check for updates"), QMessageBox::ActionRole);
1810 connect(buttonUpdateCheck, &QAbstractButton::clicked, this, [this](){ this->checkUpdate(true); });
1811
1812 QAbstractButton *buttonCopyVersion = aboutBox->addButton(tr("Copy version"), QMessageBox::ActionRole);
1813 // Needed to prevent the button from closing the dialog
1814 buttonCopyVersion->disconnect();
1815 connect(buttonCopyVersion, &QAbstractButton::clicked, this, [this, buttonCopyVersion](){ QApplication::clipboard()->setText("CEmu " CEMU_VERSION " (git: " CEMU_GIT_SHA ")", QClipboard::Clipboard); buttonCopyVersion->setEnabled(false); buttonCopyVersion->setText(tr("Version copied!")); });
1816
1817 QAbstractButton *okButton = aboutBox->addButton(QMessageBox::Ok);
1818 okButton->setFocus();
1819
1820 aboutBox->setText(tr("%1<h3>CEmu %2</h3>"
1821 "<a href='https://github.com/CE-Programming/CEmu'>On GitHub</a><br>"
1822 "<br>Main authors:<br>%3"
1823 "<br>Other contributors include:<br>%4"
1824 "<br>Translations provided by:<br>%5"
1825 "<br>Many thanks to the following projects: %6<br>In-program icons are courtesy of %7.<br>"
1826 "<br>CEmu is licensed under the %8, and is not a TI product nor is it affiliated to/endorsed by TI.<br><br>")
1827 .arg(QStringLiteral("<img src=':/icons/resources/icons/icon.png' align='right'>"),
1828 QStringLiteral(CEMU_VERSION " <small><i>(git: " CEMU_GIT_SHA ")</i></small>"),
1829 QStringLiteral("- Matt Waltz (<a href='https://github.com/mateoconlechuga'>MateoConLechuga</a>)<br>"
1830 "- Jacob Young (<a href='https://github.com/jacobly0'>jacobly0</a>)<br>"
1831 "- Brendan Fletcher (<a href='https://github.com/calc84maniac'>calc84maniac</a>)<br>"
1832 "- Adrien Bertrand (<a href='https://github.com/adriweb'>adriweb</a>)<br>"),
1833 QStringLiteral("- Zachary Wassall (<a href='https://github.com/runer112'>Runer112</a>)<br>"
1834 "- Albert Huang (<a href='https://github.com/alberthdev'>alberthdev</a>)<br>"
1835 "- Lionel Debroux (<a href='https://github.com/debrouxl'>debrouxl</a>)<br>"
1836 "- Fabian Vogt (<a href='https://github.com/Vogtinator'>Vogtinator</a>)<br>"),
1837 QStringLiteral("Matt Waltz (ES), Adrien Bertrand (FR), Stephan Paternotte &amp; Peter Tillema (NL), Jerry23011 (ZH)<br>"),
1838 QStringLiteral("<a href='https://github.com/KnightOS/z80e'>z80e</a>, "
1839 "<a href='https://github.com/nspire-emus/firebird'>Firebird Emu</a>, "
1840 "<a href='https://github.com/debrouxl/tilibs'>tilibs</a>, "
1841 "<a href='https://github.com/adriweb/tivars_lib_cpp'>tivars_lib_cpp</a>."),
1842 QStringLiteral("<a href='https://www.fatcow.com/free-icons'>FatCow's 'Farm-Fresh Web Icons'</a>"),
1843 QStringLiteral("<a href='https://www.gnu.org/licenses/gpl-3.0.html'>GPLv3</a>")
1844 ));
1845
1846 aboutBox->setTextInteractionFlags(Qt::TextSelectableByMouse);
1847 aboutBox->setTextFormat(Qt::RichText);
1848 aboutBox->setWindowModality(Qt::NonModal);
1849 aboutBox->setAttribute(Qt::WA_DeleteOnClose);
1850 aboutBox->show();
1851}
1852
1853void MainWindow::contextLcd(const QPoint &posa) {
1854 QMenu menu;

Callers

nothing calls this directly

Calls 1

checkUpdateMethod · 0.95

Tested by

no test coverage detected