gui: mainwindow: Add menu action to open web user manual
This commit is contained in:
부모
a33c7f1859
커밋
ab064c3e3b
@ -171,6 +171,9 @@ void MainWindow::connectSignals()
|
|||||||
connect(ui->menuAboutQtAction, &QAction::triggered, this,
|
connect(ui->menuAboutQtAction, &QAction::triggered, this,
|
||||||
[this](bool checked) { QMessageBox::aboutQt(this, "About Qt"); });
|
[this](bool checked) { QMessageBox::aboutQt(this, "About Qt"); });
|
||||||
connect(ui->menuSyncIndexAction, &QAction::triggered, this, &MainWindow::startIndexSync);
|
connect(ui->menuSyncIndexAction, &QAction::triggered, this, &MainWindow::startIndexSync);
|
||||||
|
connect(ui->menuOpenUserManualAction, &QAction::triggered, this,
|
||||||
|
[this]() { QDesktopServices::openUrl(Common::userManualUrl()); });
|
||||||
|
|
||||||
connect(indexSyncer, &IndexSyncer::finished, this,
|
connect(indexSyncer, &IndexSyncer::finished, this,
|
||||||
[&](unsigned int totalUpdated, unsigned int totalDeleted, unsigned int totalErrored)
|
[&](unsigned int totalUpdated, unsigned int totalDeleted, unsigned int totalErrored)
|
||||||
{
|
{
|
||||||
|
@ -626,6 +626,7 @@
|
|||||||
<string>looqs</string>
|
<string>looqs</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="menuSyncIndexAction"/>
|
<addaction name="menuSyncIndexAction"/>
|
||||||
|
<addaction name="menuOpenUserManualAction"/>
|
||||||
<addaction name="menuAboutAction"/>
|
<addaction name="menuAboutAction"/>
|
||||||
<addaction name="menuAboutQtAction"/>
|
<addaction name="menuAboutQtAction"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
@ -647,6 +648,11 @@
|
|||||||
<string>Sync index (remove deleted, update existing files)</string>
|
<string>Sync index (remove deleted, update existing files)</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="menuOpenUserManualAction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open user manual</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@ -234,3 +234,8 @@ QString Common::versionText()
|
|||||||
QString tag = GIT_TAG;
|
QString tag = GIT_TAG;
|
||||||
return tag + " (" + commitid + ") built " + __DATE__ + " " + __TIME__;
|
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 isMountPath(QString path);
|
||||||
bool noSandboxModeRequested();
|
bool noSandboxModeRequested();
|
||||||
QString versionText();
|
QString versionText();
|
||||||
|
QString userManualUrl();
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
#endif
|
#endif
|
||||||
|
불러오는 중...
Reference in New Issue
Block a user