gui: mainwindow: Add menu action to open web user manual

Esse commit está contido em:
Albert S. 2022-07-23 20:16:14 +02:00
commit ab064c3e3b
4 arquivos alterados com 15 adições e 0 exclusões

Ver arquivo

@ -171,6 +171,9 @@ void MainWindow::connectSignals()
connect(ui->menuAboutQtAction, &QAction::triggered, this,
[this](bool checked) { QMessageBox::aboutQt(this, "About Qt"); });
connect(ui->menuSyncIndexAction, &QAction::triggered, this, &MainWindow::startIndexSync);
connect(ui->menuOpenUserManualAction, &QAction::triggered, this,
[this]() { QDesktopServices::openUrl(Common::userManualUrl()); });
connect(indexSyncer, &IndexSyncer::finished, this,
[&](unsigned int totalUpdated, unsigned int totalDeleted, unsigned int totalErrored)
{

Ver arquivo

@ -626,6 +626,7 @@
<string>looqs</string>
</property>
<addaction name="menuSyncIndexAction"/>
<addaction name="menuOpenUserManualAction"/>
<addaction name="menuAboutAction"/>
<addaction name="menuAboutQtAction"/>
<addaction name="separator"/>
@ -647,6 +648,11 @@
<string>Sync index (remove deleted, update existing files)</string>
</property>
</action>
<action name="menuOpenUserManualAction">
<property name="text">
<string>Open user manual</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>

Ver arquivo

@ -234,3 +234,8 @@ QString Common::versionText()
QString tag = GIT_TAG;
return tag + " (" + commitid + ") built " + __DATE__ + " " + __TIME__;
}
QString Common::userManualUrl()
{
return QString("https://github.com/quitesimpleorg/looqs/blob/%1/USAGE.md").arg(QString(GIT_COMMIT_ID));
}

Ver arquivo

@ -25,5 +25,6 @@ bool isTextFile(QFileInfo fileInfo);
bool isMountPath(QString path);
bool noSandboxModeRequested();
QString versionText();
QString userManualUrl();
} // namespace Common
#endif