Implement Help menu items
This commit is contained in:
@@ -16,6 +16,10 @@ extern "C" {
|
||||
#include <QKeyEvent>
|
||||
#include <QMessageBox>
|
||||
#include <QFocusEvent>
|
||||
#include <QApplication>
|
||||
#include <QPushButton>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
#include <array>
|
||||
#include <unordered_map>
|
||||
@@ -48,6 +52,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
ui->ogl->setRenderType(HardwareRenderer::RenderType::OpenGL);
|
||||
ui->gles->setRenderType(HardwareRenderer::RenderType::OpenGLES);
|
||||
|
||||
this->setWindowIcon(QIcon(":/settings/win/icons/86Box-yellow.ico"));
|
||||
|
||||
connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::BlockingQueuedConnection);
|
||||
|
||||
connect(this, &MainWindow::setTitleForNonQtThread, this, &MainWindow::setTitle_, Qt::BlockingQueuedConnection);
|
||||
@@ -1071,3 +1077,36 @@ void MainWindow::on_actionBT709_HDTV_triggered() {
|
||||
void MainWindow::on_actionAverage_triggered() {
|
||||
update_greyscale_type_checkboxes(ui, ui->actionAverage, 2);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionAbout_Qt_triggered()
|
||||
{
|
||||
QApplication::aboutQt();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionAbout_86Box_triggered()
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setTextFormat(Qt::RichText);
|
||||
msgBox.setText("<b>About 86Box</b>");
|
||||
msgBox.setInformativeText(R"(
|
||||
An emulator of old computers
|
||||
|
||||
Authors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, Tiseno100, reenigne, leilei, JohnElliott, greatpsycho, and others.
|
||||
|
||||
Released under the GNU General Public License version 2 or later. See LICENSE for more information.
|
||||
)");
|
||||
msgBox.setWindowTitle("About 86Box");
|
||||
msgBox.addButton("OK", QMessageBox::ButtonRole::AcceptRole);
|
||||
auto webSiteButton = msgBox.addButton("86box.net", QMessageBox::ButtonRole::HelpRole);
|
||||
webSiteButton->connect(webSiteButton, &QPushButton::released, []()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://86box.net/"));
|
||||
});
|
||||
msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-yellow.ico").pixmap(32, 32));
|
||||
msgBox.exec();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDocumentation_triggered()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://86box.readthedocs.io"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user