Skip to content

Commit

Permalink
Qt: Add Wiki and Documentation to 'Help' menu
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechnician27 authored and F0bes committed Jan 29, 2025
1 parent e93f81c commit 32a67c4
Show file tree
Hide file tree
Showing 215 changed files with 524 additions and 2,087 deletions.
10 changes: 10 additions & 0 deletions pcsx2-qt/AboutDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ QString AboutDialog::getThirdPartyLicensesUrl()
return GetDocFileUrl("ThirdPartyLicenses.html");
}

QString AboutDialog::getWikiUrl()
{
return QString::fromUtf8(PCSX2_WIKI_URL);
}

QString AboutDialog::getDocumentationUrl()
{
return QString::fromUtf8(PCSX2_DOCUMENTATION_URL);
}

QString AboutDialog::getDiscordServerUrl()
{
return QString::fromUtf8(PCSX2_DISCORD_URL);
Expand Down
2 changes: 2 additions & 0 deletions pcsx2-qt/AboutDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class AboutDialog final : public QDialog
static QString getGitHubRepositoryUrl();
static QString getLicenseUrl();
static QString getThirdPartyLicensesUrl();
static QString getWikiUrl();
static QString getDocumentationUrl();
static QString getDiscordServerUrl();

static void showHTMLDialog(QWidget* parent, const QString& title, const QString& url);
Expand Down
12 changes: 12 additions & 0 deletions pcsx2-qt/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ void MainWindow::connectSignals()
connect(m_ui.actionViewGameProperties, &QAction::triggered, this, &MainWindow::onViewGamePropertiesActionTriggered);
connect(m_ui.actionGitHubRepository, &QAction::triggered, this, &MainWindow::onGitHubRepositoryActionTriggered);
connect(m_ui.actionSupportForums, &QAction::triggered, this, &MainWindow::onSupportForumsActionTriggered);
connect(m_ui.actionWiki, &QAction::triggered, this, &MainWindow::onWikiActionTriggered);
connect(m_ui.actionDocumentation, &QAction::triggered, this, &MainWindow::onDocumentationActionTriggered);
connect(m_ui.actionDiscordServer, &QAction::triggered, this, &MainWindow::onDiscordServerActionTriggered);
connect(m_ui.actionAboutQt, &QAction::triggered, qApp, &QApplication::aboutQt);
connect(m_ui.actionAbout, &QAction::triggered, this, &MainWindow::onAboutActionTriggered);
Expand Down Expand Up @@ -1598,6 +1600,16 @@ void MainWindow::onSupportForumsActionTriggered()
QtUtils::OpenURL(this, AboutDialog::getSupportForumsUrl());
}

void MainWindow::onWikiActionTriggered()
{
QtUtils::OpenURL(this, AboutDialog::getWikiUrl());
}

void MainWindow::onDocumentationActionTriggered()
{
QtUtils::OpenURL(this, AboutDialog::getDocumentationUrl());
}

void MainWindow::onDiscordServerActionTriggered()
{
QtUtils::OpenURL(this, AboutDialog::getDiscordServerUrl());
Expand Down
2 changes: 2 additions & 0 deletions pcsx2-qt/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ private Q_SLOTS:
void onViewGamePropertiesActionTriggered();
void onGitHubRepositoryActionTriggered();
void onSupportForumsActionTriggered();
void onWikiActionTriggered();
void onDocumentationActionTriggered();
void onDiscordServerActionTriggered();
void onAboutActionTriggered();
void onToolsOpenDataDirectoryTriggered();
Expand Down
18 changes: 18 additions & 0 deletions pcsx2-qt/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
</property>
<addaction name="actionGitHubRepository"/>
<addaction name="actionSupportForums"/>
<addaction name="actionWiki"/>
<addaction name="actionDocumentation"/>
<addaction name="actionDiscordServer"/>
<addaction name="separator"/>
<addaction name="actionCheckForUpdates"/>
Expand Down Expand Up @@ -514,6 +516,22 @@
<string>Support &amp;Forums...</string>
</property>
</action>
<action name="actionWiki">
<property name="icon">
<iconset theme="book"/>
</property>
<property name="text">
<string>PCSX2 &amp;Wiki...</string>
</property>
</action>
<action name="actionDocumentation">
<property name="icon">
<iconset theme="booklet"/>
</property>
<property name="text">
<string>D&amp;ocumentation...</string>
</property>
</action>
<action name="actionDiscordServer">
<property name="icon">
<iconset theme="discord"/>
Expand Down
14 changes: 1 addition & 13 deletions pcsx2-qt/resources/icons/black/svg/Popn-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions pcsx2-qt/resources/icons/black/svg/artboard-2-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 1 addition & 41 deletions pcsx2-qt/resources/icons/black/svg/at.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 1 addition & 47 deletions pcsx2-qt/resources/icons/black/svg/band-aid-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pcsx2-qt/resources/icons/black/svg/book.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pcsx2-qt/resources/icons/black/svg/booklet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions pcsx2-qt/resources/icons/black/svg/brush-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions pcsx2-qt/resources/icons/black/svg/camera-video.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 32a67c4

Please sign in to comment.