Improved releasenotes manual can also be opened from a databasewindow now.

This commit is contained in:
eelke 2022-09-05 15:01:33 +02:00
parent 487f84cf95
commit 0483dc8b3d
9 changed files with 31 additions and 5 deletions

View file

@ -1,7 +1,9 @@
#include "About.h" #include "About.h"
#include <QCoreApplication> #include <QCoreApplication>
#include <QDesktopServices>
#include <QMessageBox> #include <QMessageBox>
#include <QString> #include <QString>
#include <QUrl>
void ShowAboutDialog(QWidget *parent) void ShowAboutDialog(QWidget *parent)
{ {
@ -21,3 +23,8 @@ void ShowAboutDialog(QWidget *parent)
"attribution 3.0 license.</p>" "attribution 3.0 license.</p>"
).arg(year).arg(releaseNotesUrl).arg(pgLabVersionString)); ).arg(year).arg(releaseNotesUrl).arg(pgLabVersionString));
} }
void OpenManual()
{
QDesktopServices::openUrl(QString("https://eelke.gitlab.io/pgLab/#pglab-user-manual"));
}

View file

@ -3,3 +3,4 @@
#include <QWidget> #include <QWidget>
void ShowAboutDialog(QWidget *parent); void ShowAboutDialog(QWidget *parent);
void OpenManual();

View file

@ -4,7 +4,6 @@
#include "MasterController.h" #include "MasterController.h"
#include "ConnectionController.h" #include "ConnectionController.h"
#include "ConnectionListModel.h" #include "ConnectionListModel.h"
#include <QDesktopServices>
#include <QDir> #include <QDir>
#include <QMessageBox> #include <QMessageBox>
#include <QStandardItemModel> #include <QStandardItemModel>
@ -112,7 +111,7 @@ void ConnectionManagerWindow::on_actionAbout_triggered()
void ConnectionManagerWindow::on_actionManual_triggered() void ConnectionManagerWindow::on_actionManual_triggered()
{ {
QDesktopServices::openUrl(QString("https://eelke.gitlab.io/pgLab/#pglab-user-manual")); OpenManual();
} }

View file

@ -442,3 +442,9 @@ void DatabaseWindow::on_actionShow_connection_manager_triggered()
{ {
m_masterController->connectionController()->showConnectionManager(); m_masterController->connectionController()->showConnectionManager();
} }
void DatabaseWindow::on_actionManual_triggered()
{
OpenManual();
}

View file

@ -106,6 +106,8 @@ private slots:
void on_actionSave_copy_of_query_as_triggered(); void on_actionSave_copy_of_query_as_triggered();
void on_actionShow_connection_manager_triggered(); void on_actionShow_connection_manager_triggered();
void on_actionManual_triggered();
public: public:
virtual void setTitleForWidget(QWidget *widget, QString title, QString hint) override; virtual void setTitleForWidget(QWidget *widget, QString title, QString hint) override;
virtual void setIconForWidget(QWidget *widget, QIcon icon) override; virtual void setIconForWidget(QWidget *widget, QIcon icon) override;

View file

@ -94,6 +94,7 @@
<property name="title"> <property name="title">
<string>Help</string> <string>Help</string>
</property> </property>
<addaction name="actionManual"/>
<addaction name="actionAbout"/> <addaction name="actionAbout"/>
</widget> </widget>
<addaction name="menuFile"/> <addaction name="menuFile"/>
@ -325,6 +326,11 @@
<string>Show connection manager</string> <string>Show connection manager</string>
</property> </property>
</action> </action>
<action name="actionManual">
<property name="text">
<string>Manual</string>
</property>
</action>
</widget> </widget>
<resources> <resources>
<include location="resources.qrc"/> <include location="resources.qrc"/>

View file

@ -1,6 +1,6 @@
--- ---
other: other:
- The connection window now has an About item in the file menu. - The connection window now has an :menuselection:`Help --> About` menuitem.
- The about dialog now uses html for enhanced formatting and hyperlinks. - The about dialog now uses html for enhanced formatting and hyperlinks.
- | - |
The about dialog now declares the usage of Icons8 icons and provides a The about dialog now declares the usage of Icons8 icons and provides a

View file

@ -0,0 +1,4 @@
---
features:
- |
The user manual can now be accessed from the menu :menuselection:`Help --> Manual`.

View file

@ -1,5 +1,6 @@
--- ---
features: features:
- | - |
Added menu option to reset the password managers master password. Added :menuselection:`File --> Reset password manager` menu option to reset
This will ofcourse also clear all saved passwords. the password managers master password. This will ofcourse also clear all
saved passwords.