gui: mainwindow: Add menu action to open web user manual
This commit is contained in:
parent
a33c7f1859
commit
ab064c3e3b
@ -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)
|
||||
{
|
||||
|
@ -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/>
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -25,5 +25,6 @@ bool isTextFile(QFileInfo fileInfo);
|
||||
bool isMountPath(QString path);
|
||||
bool noSandboxModeRequested();
|
||||
QString versionText();
|
||||
QString userManualUrl();
|
||||
} // namespace Common
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user