i18n: zh_CN locale support
`CONFIG += embed_translations` is used.
This commit is contained in:
@@ -238,8 +238,22 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
||||
});
|
||||
protectedMode->setCheckable(true);
|
||||
protectedMode->setChecked(m_protectedMode);
|
||||
QAction * helpAction = new QAction(tr("Help"));
|
||||
connect(helpAction, &QAction::triggered, this, [ = ](){
|
||||
QStringList sl {
|
||||
tr("Launch application with image file path as argument to load the file."),
|
||||
tr("Drag and drop image file onto the window is also supported."),
|
||||
"",
|
||||
tr("Context menu option explanation:"),
|
||||
(tr("Stay on top") + " : " + tr("Make window stay on top of all other windows.")),
|
||||
(tr("Protected mode") + " : " + tr("Avoid close window accidentally. (eg. by double clicking the window)"))
|
||||
};
|
||||
m_graphicsView->showText(sl.join('\n'));
|
||||
});
|
||||
menu->addAction(stayOnTopMode);
|
||||
menu->addAction(protectedMode);
|
||||
menu->addSeparator();
|
||||
menu->addAction(helpAction);
|
||||
menu->exec(mapToGlobal(event->pos()));
|
||||
menu->deleteLater();
|
||||
|
||||
@@ -372,6 +386,7 @@ void MainWindow::toggleProtectedMode()
|
||||
void MainWindow::toggleStayOnTop()
|
||||
{
|
||||
setWindowFlag(Qt::WindowStaysOnTopHint, !stayOnTop());
|
||||
show();
|
||||
}
|
||||
|
||||
bool MainWindow::stayOnTop()
|
||||
|
||||
Reference in New Issue
Block a user