chore: about dialog strings, also add a thanks tab
This commit is contained in:
parent
c78eb1a272
commit
5ace4e219c
|
@ -15,19 +15,26 @@ AboutDialog::AboutDialog(QWidget *parent)
|
||||||
, m_buttonBox(new QDialogButtonBox)
|
, m_buttonBox(new QDialogButtonBox)
|
||||||
, m_helpTextEdit(new QTextBrowser)
|
, m_helpTextEdit(new QTextBrowser)
|
||||||
, m_aboutTextEdit(new QTextBrowser)
|
, m_aboutTextEdit(new QTextBrowser)
|
||||||
|
, m_specialThanksTextEdit(new QTextBrowser)
|
||||||
, m_licenseTextEdit(new QTextBrowser)
|
, m_licenseTextEdit(new QTextBrowser)
|
||||||
|
, m_3rdPartyLibsTextEdit(new QTextBrowser)
|
||||||
{
|
{
|
||||||
this->setWindowTitle(tr("About"));
|
this->setWindowTitle(tr("About"));
|
||||||
|
|
||||||
QStringList helpStr {
|
QStringList helpStr {
|
||||||
tr("Launch application with image file path as argument to load the file."),
|
QStringLiteral("<p>%1</p>").arg(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."),
|
QStringLiteral("<p>%1</p>").arg(tr("Drag and drop image file onto the window is also supported.")),
|
||||||
"",
|
QStringLiteral("<p>%1</p>").arg(tr("Context menu option explanation:")),
|
||||||
tr("Context menu option explanation:"),
|
QStringLiteral("<ul>"),
|
||||||
("* " + QCoreApplication::translate("MainWindow", "Stay on top") + " : "
|
QStringLiteral("<li><b>%1</b>:<br/>%2</li>").arg(
|
||||||
+ this->tr("Make window stay on top of all other windows.")),
|
QCoreApplication::translate("MainWindow", "Stay on top"),
|
||||||
("* " + QCoreApplication::translate("MainWindow", "Protected mode") + " : "
|
this->tr("Make window stay on top of all other windows.")
|
||||||
+ this->tr("Avoid close window accidentally. (eg. by double clicking the window)"))
|
),
|
||||||
|
QStringLiteral("<li><b>%1</b>:<br/>%2</li>").arg(
|
||||||
|
QCoreApplication::translate("MainWindow", "Protected mode"),
|
||||||
|
this->tr("Avoid close window accidentally. (eg. by double clicking the window)")
|
||||||
|
),
|
||||||
|
QStringLiteral("</ul>")
|
||||||
};
|
};
|
||||||
|
|
||||||
QStringList aboutStr {
|
QStringList aboutStr {
|
||||||
|
@ -36,27 +43,42 @@ AboutDialog::AboutDialog(QWidget *parent)
|
||||||
#ifdef GIT_DESCRIBE_VERSION_STRING
|
#ifdef GIT_DESCRIBE_VERSION_STRING
|
||||||
(QStringLiteral("<br/>") + tr("Version: %1").arg(GIT_DESCRIBE_VERSION_STRING)),
|
(QStringLiteral("<br/>") + tr("Version: %1").arg(GIT_DESCRIBE_VERSION_STRING)),
|
||||||
#endif // GIT_DESCRIBE_VERSION_STRING
|
#endif // GIT_DESCRIBE_VERSION_STRING
|
||||||
"<hr/>",
|
QStringLiteral("<hr/>"),
|
||||||
|
tr("Copyright (c) 2020 %1").arg(QStringLiteral("<a href='https://github.com/BLumia'>@BLumia</a>")),
|
||||||
|
QStringLiteral("<br/>"),
|
||||||
|
tr("Logo designed by %1").arg(QStringLiteral("<a href='https://github.com/Lovelyblack'>@Lovelyblack</a>")),
|
||||||
|
QStringLiteral("<hr/>"),
|
||||||
tr("Built with Qt %1 (%2)").arg(QT_VERSION_STR, QSysInfo::buildCpuArchitecture()),
|
tr("Built with Qt %1 (%2)").arg(QT_VERSION_STR, QSysInfo::buildCpuArchitecture()),
|
||||||
QStringLiteral("<br/><a href='%1'>%2</a>").arg("https://github.com/BLumia/pineapple-pictures", tr("Source code")),
|
QStringLiteral("<br/><a href='%1'>%2</a>").arg("https://github.com/BLumia/pineapple-pictures", tr("Source code")),
|
||||||
"</center>"
|
QStringLiteral("</center>")
|
||||||
};
|
};
|
||||||
|
|
||||||
QString licenseDescStr(tr(
|
QStringList specialThanksStr {
|
||||||
"<p><i>%1</i> is released under the MIT License.</p>"
|
QStringLiteral("<h1 align='center'>%1</h1><a href='%2'>%3</a><p>%4</p>").arg(
|
||||||
"<p>This license grants people a number of freedoms:</p>"
|
tr("Contributors"),
|
||||||
"<ul>"
|
QStringLiteral("https://github.com/BLumia/pineapple-pictures/graphs/contributors"),
|
||||||
"<li>You are free to use <i>%1</i>, for any purpose</li>"
|
tr("List of contributors on GitHub"),
|
||||||
"<li>You are free to distribute <i>%1</i></li>"
|
tr("Thanks to all people who contributed to this project.")
|
||||||
"<li>You can study how <i>%1</i> works and change it</li>"
|
),
|
||||||
"<li>You can distribute changed versions of <i>%1</i></li>"
|
#if 0
|
||||||
"</ul>"
|
QStringLiteral("<h1 align='center'>%1</h1><p>%2</p>").arg(
|
||||||
"<p>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</p>"
|
tr("Translators"),
|
||||||
));
|
tr("I would like to thank the following people who volunteered to translate this application.")
|
||||||
|
),
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
QStringList licenseStr {
|
QStringList licenseStr {
|
||||||
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Your Rights")),
|
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Your Rights")),
|
||||||
licenseDescStr,
|
QStringLiteral("<p>%1</p><p>%2</p><ul><li>%3</li><li>%4</li><li>%5</li><li>%6</li></ul>").arg(
|
||||||
|
tr("%1 is released under the MIT License."), // %1
|
||||||
|
tr("This license grants people a number of freedoms:"), // %2
|
||||||
|
tr("You are free to use %1, for any purpose"), // %3
|
||||||
|
tr("You are free to distribute %1"), // %4
|
||||||
|
tr("You can study how %1 works and change it"), // %5
|
||||||
|
tr("You can distribute changed versions of %1") // %6
|
||||||
|
).arg(QStringLiteral("<i>%1</i>")),
|
||||||
|
QStringLiteral("<p>%1</p>").arg(tr("The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.")),
|
||||||
QStringLiteral("<hr/><pre>%2</pre>")
|
QStringLiteral("<hr/><pre>%2</pre>")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -83,16 +105,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
)"));
|
)"));
|
||||||
|
|
||||||
|
QStringList thirdPartyLibsStr {
|
||||||
|
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Third-party Libraries used by %1")),
|
||||||
|
tr("%1 is built on the following free software libraries:"),
|
||||||
|
QStringLiteral("<ul>"),
|
||||||
|
QStringLiteral("<li><a href='%1'>%2</a>: %3</li>").arg("https://www.qt.io/", "Qt", "GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3"),
|
||||||
|
QStringLiteral("</ul>")
|
||||||
|
};
|
||||||
|
|
||||||
m_helpTextEdit->setText(helpStr.join('\n'));
|
m_helpTextEdit->setText(helpStr.join('\n'));
|
||||||
|
|
||||||
m_aboutTextEdit->setText(aboutStr.join('\n'));
|
m_aboutTextEdit->setText(aboutStr.join('\n'));
|
||||||
m_aboutTextEdit->setOpenExternalLinks(true);
|
m_aboutTextEdit->setOpenExternalLinks(true);
|
||||||
|
|
||||||
|
m_specialThanksTextEdit->setText(specialThanksStr.join('\n'));
|
||||||
|
m_specialThanksTextEdit->setOpenExternalLinks(true);
|
||||||
|
|
||||||
m_licenseTextEdit->setText(licenseStr.join('\n').arg(qApp->applicationDisplayName(), mitLicense));
|
m_licenseTextEdit->setText(licenseStr.join('\n').arg(qApp->applicationDisplayName(), mitLicense));
|
||||||
|
|
||||||
|
m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(qApp->applicationDisplayName()));
|
||||||
|
m_3rdPartyLibsTextEdit->setOpenExternalLinks(true);
|
||||||
|
|
||||||
m_tabWidget->addTab(m_helpTextEdit, tr("&Help"));
|
m_tabWidget->addTab(m_helpTextEdit, tr("&Help"));
|
||||||
m_tabWidget->addTab(m_aboutTextEdit, tr("&About"));
|
m_tabWidget->addTab(m_aboutTextEdit, tr("&About"));
|
||||||
|
m_tabWidget->addTab(m_specialThanksTextEdit, tr("&Special Thanks"));
|
||||||
m_tabWidget->addTab(m_licenseTextEdit, tr("&License"));
|
m_tabWidget->addTab(m_licenseTextEdit, tr("&License"));
|
||||||
|
m_tabWidget->addTab(m_3rdPartyLibsTextEdit, tr("&Third-party Libraries"));
|
||||||
|
|
||||||
m_buttonBox->setStandardButtons(QDialogButtonBox::Close);
|
m_buttonBox->setStandardButtons(QDialogButtonBox::Close);
|
||||||
connect(m_buttonBox, QOverload<QAbstractButton *>::of(&QDialogButtonBox::clicked), this, [this](){
|
connect(m_buttonBox, QOverload<QAbstractButton *>::of(&QDialogButtonBox::clicked), this, [this](){
|
||||||
|
@ -106,7 +144,7 @@ SOFTWARE.
|
||||||
|
|
||||||
this->setLayout(mainLayout);
|
this->setLayout(mainLayout);
|
||||||
this->setMinimumSize(361, 161); // not sure why it complain "Unable to set geometry"
|
this->setMinimumSize(361, 161); // not sure why it complain "Unable to set geometry"
|
||||||
this->resize(520, 330);
|
this->resize(520, 350);
|
||||||
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,9 @@ private:
|
||||||
|
|
||||||
QTextBrowser * m_helpTextEdit = nullptr;
|
QTextBrowser * m_helpTextEdit = nullptr;
|
||||||
QTextBrowser * m_aboutTextEdit = nullptr;
|
QTextBrowser * m_aboutTextEdit = nullptr;
|
||||||
|
QTextBrowser * m_specialThanksTextEdit = nullptr;
|
||||||
QTextBrowser * m_licenseTextEdit = nullptr;
|
QTextBrowser * m_licenseTextEdit = nullptr;
|
||||||
|
QTextBrowser * m_3rdPartyLibsTextEdit = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ABOUTDIALOG_H
|
#endif // ABOUTDIALOG_H
|
||||||
|
|
|
@ -4,72 +4,157 @@
|
||||||
<context>
|
<context>
|
||||||
<name>AboutDialog</name>
|
<name>AboutDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="20"/>
|
<location filename="../aboutdialog.cpp" line="22"/>
|
||||||
<source>About</source>
|
<source>About</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="23"/>
|
<location filename="../aboutdialog.cpp" line="25"/>
|
||||||
<source>Launch application with image file path as argument to load the file.</source>
|
<source>Launch application with image file path as argument to load the file.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="24"/>
|
<location filename="../aboutdialog.cpp" line="26"/>
|
||||||
<source>Drag and drop image file onto the window is also supported.</source>
|
<source>Drag and drop image file onto the window is also supported.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="26"/>
|
<location filename="../aboutdialog.cpp" line="27"/>
|
||||||
<source>Context menu option explanation:</source>
|
<source>Context menu option explanation:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="28"/>
|
<location filename="../aboutdialog.cpp" line="31"/>
|
||||||
<source>Make window stay on top of all other windows.</source>
|
<source>Make window stay on top of all other windows.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="30"/>
|
<location filename="../aboutdialog.cpp" line="35"/>
|
||||||
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="37"/>
|
<location filename="../aboutdialog.cpp" line="44"/>
|
||||||
<source>Version: %1</source>
|
<source>Version: %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="40"/>
|
<location filename="../aboutdialog.cpp" line="47"/>
|
||||||
|
<source>Copyright (c) 2020 %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="49"/>
|
||||||
|
<source>Logo designed by %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="51"/>
|
||||||
<source>Built with Qt %1 (%2)</source>
|
<source>Built with Qt %1 (%2)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="41"/>
|
<location filename="../aboutdialog.cpp" line="52"/>
|
||||||
<source>Source code</source>
|
<source>Source code</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="45"/>
|
<location filename="../aboutdialog.cpp" line="58"/>
|
||||||
<source><p><i>%1</i> is released under the MIT License.</p><p>This license grants people a number of freedoms:</p><ul><li>You are free to use <i>%1</i>, for any purpose</li><li>You are free to distribute <i>%1</i></li><li>You can study how <i>%1</i> works and change it</li><li>You can distribute changed versions of <i>%1</i></li></ul><p>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</p></source>
|
<source>Contributors</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="58"/>
|
<location filename="../aboutdialog.cpp" line="60"/>
|
||||||
|
<source>List of contributors on GitHub</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="61"/>
|
||||||
|
<source>Thanks to all people who contributed to this project.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="65"/>
|
||||||
|
<source>Translators</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="66"/>
|
||||||
|
<source>I would like to thank the following people who volunteered to translate this application.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="131"/>
|
||||||
|
<source>&Special Thanks</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="133"/>
|
||||||
|
<source>&Third-party Libraries</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="72"/>
|
||||||
<source>Your Rights</source>
|
<source>Your Rights</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="93"/>
|
<location filename="../aboutdialog.cpp" line="74"/>
|
||||||
|
<source>%1 is released under the MIT License.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="75"/>
|
||||||
|
<source>This license grants people a number of freedoms:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="76"/>
|
||||||
|
<source>You are free to use %1, for any purpose</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="77"/>
|
||||||
|
<source>You are free to distribute %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="78"/>
|
||||||
|
<source>You can study how %1 works and change it</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="79"/>
|
||||||
|
<source>You can distribute changed versions of %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="81"/>
|
||||||
|
<source>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="109"/>
|
||||||
|
<source>Third-party Libraries used by %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="110"/>
|
||||||
|
<source>%1 is built on the following free software libraries:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="129"/>
|
||||||
<source>&Help</source>
|
<source>&Help</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="94"/>
|
<location filename="../aboutdialog.cpp" line="130"/>
|
||||||
<source>&About</source>
|
<source>&About</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="95"/>
|
<location filename="../aboutdialog.cpp" line="132"/>
|
||||||
<source>&License</source>
|
<source>&License</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -138,13 +223,13 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="27"/>
|
<location filename="../aboutdialog.cpp" line="30"/>
|
||||||
<location filename="../mainwindow.cpp" line="455"/>
|
<location filename="../mainwindow.cpp" line="455"/>
|
||||||
<source>Stay on top</source>
|
<source>Stay on top</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="29"/>
|
<location filename="../aboutdialog.cpp" line="34"/>
|
||||||
<location filename="../mainwindow.cpp" line="462"/>
|
<location filename="../mainwindow.cpp" line="462"/>
|
||||||
<source>Protected mode</source>
|
<source>Protected mode</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -163,27 +248,32 @@
|
||||||
<context>
|
<context>
|
||||||
<name>SettingsDialog</name>
|
<name>SettingsDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog.cpp" line="18"/>
|
<location filename="../settingsdialog.cpp" line="15"/>
|
||||||
<source>Do nothing</source>
|
<source>Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../settingsdialog.cpp" line="19"/>
|
|
||||||
<source>Close the window</source>
|
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog.cpp" line="20"/>
|
<location filename="../settingsdialog.cpp" line="20"/>
|
||||||
|
<source>Do nothing</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="21"/>
|
||||||
|
<source>Close the window</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="22"/>
|
||||||
<source>Toggle maximize</source>
|
<source>Toggle maximize</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog.cpp" line="28"/>
|
<location filename="../settingsdialog.cpp" line="30"/>
|
||||||
<source>Stay on top when start-up</source>
|
<source>Stay on top when start-up</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog.cpp" line="29"/>
|
<location filename="../settingsdialog.cpp" line="31"/>
|
||||||
<source>Double-click behavior</source>
|
<source>Double-click behavior</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -4,72 +4,157 @@
|
||||||
<context>
|
<context>
|
||||||
<name>AboutDialog</name>
|
<name>AboutDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="20"/>
|
<location filename="../aboutdialog.cpp" line="22"/>
|
||||||
<source>About</source>
|
<source>About</source>
|
||||||
<translation>关于</translation>
|
<translation>关于</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="23"/>
|
<location filename="../aboutdialog.cpp" line="25"/>
|
||||||
<source>Launch application with image file path as argument to load the file.</source>
|
<source>Launch application with image file path as argument to load the file.</source>
|
||||||
<translation>以图片文件的路径作为参数运行程序即可直接打开图片文件。</translation>
|
<translation>以图片文件的路径作为参数运行程序即可直接打开图片文件。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="24"/>
|
<location filename="../aboutdialog.cpp" line="26"/>
|
||||||
<source>Drag and drop image file onto the window is also supported.</source>
|
<source>Drag and drop image file onto the window is also supported.</source>
|
||||||
<translation>也支持拖放图片文件到窗口内来加载图片。</translation>
|
<translation>也支持拖放图片文件到窗口内来加载图片。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="26"/>
|
<location filename="../aboutdialog.cpp" line="27"/>
|
||||||
<source>Context menu option explanation:</source>
|
<source>Context menu option explanation:</source>
|
||||||
<translation>菜单项说明:</translation>
|
<translation>菜单项说明:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="28"/>
|
<location filename="../aboutdialog.cpp" line="31"/>
|
||||||
<source>Make window stay on top of all other windows.</source>
|
<source>Make window stay on top of all other windows.</source>
|
||||||
<translation>使窗口始终至于其它非置顶窗口上方。</translation>
|
<translation>使窗口始终至于其它非置顶窗口上方。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="30"/>
|
<location filename="../aboutdialog.cpp" line="35"/>
|
||||||
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
||||||
<translation>避免窗口意外关闭。(如:不小心双击了窗口触发了关闭窗口行为)</translation>
|
<translation>避免窗口意外关闭。(如:不小心双击了窗口触发了关闭窗口行为)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="37"/>
|
<location filename="../aboutdialog.cpp" line="44"/>
|
||||||
<source>Version: %1</source>
|
<source>Version: %1</source>
|
||||||
<translation>版本: %1</translation>
|
<translation>版本: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="40"/>
|
<location filename="../aboutdialog.cpp" line="47"/>
|
||||||
|
<source>Copyright (c) 2020 %1</source>
|
||||||
|
<translation>版权所有 (c) 2020 %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="49"/>
|
||||||
|
<source>Logo designed by %1</source>
|
||||||
|
<translation>Logo 由 %1 设计</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="51"/>
|
||||||
<source>Built with Qt %1 (%2)</source>
|
<source>Built with Qt %1 (%2)</source>
|
||||||
<translation>使用 Qt %1 (%2) 进行构建</translation>
|
<translation>使用 Qt %1 (%2) 进行构建</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="41"/>
|
<location filename="../aboutdialog.cpp" line="52"/>
|
||||||
<source>Source code</source>
|
<source>Source code</source>
|
||||||
<translation>源代码</translation>
|
<translation>源代码</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="45"/>
|
<location filename="../aboutdialog.cpp" line="58"/>
|
||||||
<source><p><i>%1</i> is released under the MIT License.</p><p>This license grants people a number of freedoms:</p><ul><li>You are free to use <i>%1</i>, for any purpose</li><li>You are free to distribute <i>%1</i></li><li>You can study how <i>%1</i> works and change it</li><li>You can distribute changed versions of <i>%1</i></li></ul><p>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</p></source>
|
<source>Contributors</source>
|
||||||
<translation><p><i>%1</i> 是在 MIT 许可协议下发布的。</p><p>此许可证赋予人们以下自由的权利:</p><ul><li>任何人都可以为了任何目的自由地使用 <i>%1</i></li><li>任何人都可以自由地分发 <i>%1</i></li><li>任何人都可以自由地研究 <i>%1</i> 的工作原理并对其进行修改</li><li>任何人都可以自由地分发修改过的 <i>%1</i> 版本</li></ul><p>此软件通过 MIT 许可证赋予用户上述自由,任何人无权剥夺。</p></translation>
|
<translation>贡献者</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="58"/>
|
<location filename="../aboutdialog.cpp" line="60"/>
|
||||||
|
<source>List of contributors on GitHub</source>
|
||||||
|
<translation>GitHub 上的贡献者列表</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="61"/>
|
||||||
|
<source>Thanks to all people who contributed to this project.</source>
|
||||||
|
<translation>感谢所有参与此项目的朋友。</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="65"/>
|
||||||
|
<source>Translators</source>
|
||||||
|
<translation>翻译者</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="66"/>
|
||||||
|
<source>I would like to thank the following people who volunteered to translate this application.</source>
|
||||||
|
<translation>我想要感谢下列自愿参与翻译此应用程序的朋友。</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="131"/>
|
||||||
|
<source>&Special Thanks</source>
|
||||||
|
<translation>致谢(&S)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="133"/>
|
||||||
|
<source>&Third-party Libraries</source>
|
||||||
|
<translation>第三方程序库(&T)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="72"/>
|
||||||
<source>Your Rights</source>
|
<source>Your Rights</source>
|
||||||
<translation>用户的权利</translation>
|
<translation>用户的权利</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="93"/>
|
<location filename="../aboutdialog.cpp" line="74"/>
|
||||||
|
<source>%1 is released under the MIT License.</source>
|
||||||
|
<translation>%1 是在 MIT 许可协议下发布的。</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="75"/>
|
||||||
|
<source>This license grants people a number of freedoms:</source>
|
||||||
|
<translation>此许可证赋予人们以下自由的权利:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="76"/>
|
||||||
|
<source>You are free to use %1, for any purpose</source>
|
||||||
|
<translation>任何人都可以为了任何目的自由地使用 %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="77"/>
|
||||||
|
<source>You are free to distribute %1</source>
|
||||||
|
<translation>任何人都可以自由地分发 %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="78"/>
|
||||||
|
<source>You can study how %1 works and change it</source>
|
||||||
|
<translation>任何人都可以自由地研究 %1 的工作原理并对其进行修改</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="79"/>
|
||||||
|
<source>You can distribute changed versions of %1</source>
|
||||||
|
<translation>任何人都可以自由地分发修改过的 %1 版本</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="81"/>
|
||||||
|
<source>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</source>
|
||||||
|
<translation>此软件通过 MIT 许可证赋予用户上述自由,任何人无权剥夺。</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="109"/>
|
||||||
|
<source>Third-party Libraries used by %1</source>
|
||||||
|
<translation>%1 使用的第三方程序库</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="110"/>
|
||||||
|
<source>%1 is built on the following free software libraries:</source>
|
||||||
|
<translation>%1 采用了下列自由软件程序库进行构建:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="129"/>
|
||||||
<source>&Help</source>
|
<source>&Help</source>
|
||||||
<translation>帮助(&H)</translation>
|
<translation>帮助(&H)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="94"/>
|
<location filename="../aboutdialog.cpp" line="130"/>
|
||||||
<source>&About</source>
|
<source>&About</source>
|
||||||
<translation>关于(&A)</translation>
|
<translation>关于(&A)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="95"/>
|
<location filename="../aboutdialog.cpp" line="132"/>
|
||||||
<source>&License</source>
|
<source>&License</source>
|
||||||
<translation>软件许可证(&L)</translation>
|
<translation>软件许可证(&L)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -117,10 +202,6 @@
|
||||||
<source>&Copy</source>
|
<source>&Copy</source>
|
||||||
<translation>复制(&C)</translation>
|
<translation>复制(&C)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Copy &Pixmap</source>
|
|
||||||
<translation type="vanished">复制位图(&P)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="429"/>
|
<location filename="../mainwindow.cpp" line="429"/>
|
||||||
<source>Copy P&ixmap</source>
|
<source>Copy P&ixmap</source>
|
||||||
|
@ -142,13 +223,13 @@
|
||||||
<translation>粘贴图像文件(&P)</translation>
|
<translation>粘贴图像文件(&P)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="27"/>
|
<location filename="../aboutdialog.cpp" line="30"/>
|
||||||
<location filename="../mainwindow.cpp" line="455"/>
|
<location filename="../mainwindow.cpp" line="455"/>
|
||||||
<source>Stay on top</source>
|
<source>Stay on top</source>
|
||||||
<translation>总在最前</translation>
|
<translation>总在最前</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../aboutdialog.cpp" line="29"/>
|
<location filename="../aboutdialog.cpp" line="34"/>
|
||||||
<location filename="../mainwindow.cpp" line="462"/>
|
<location filename="../mainwindow.cpp" line="462"/>
|
||||||
<source>Protected mode</source>
|
<source>Protected mode</source>
|
||||||
<translation>保护模式</translation>
|
<translation>保护模式</translation>
|
||||||
|
@ -163,62 +244,36 @@
|
||||||
<source>Help</source>
|
<source>Help</source>
|
||||||
<translation>帮助</translation>
|
<translation>帮助</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Launch application with image file path as argument to load the file.</source>
|
|
||||||
<translation type="vanished">以图片文件的路径作为参数运行程序即可直接打开图片文件。</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Drag and drop image file onto the window is also supported.</source>
|
|
||||||
<translation type="vanished">也支持拖放图片文件到窗口内来加载图片。</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Context menu option explanation:</source>
|
|
||||||
<translation type="vanished">菜单项说明:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Make window stay on top of all other windows.</source>
|
|
||||||
<translation type="vanished">使窗口始终至于其它非置顶窗口上方。</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
|
||||||
<translation type="vanished">避免窗口意外关闭。(如:不小心双击了窗口触发了关闭窗口行为)</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>QCoreApplication</name>
|
|
||||||
<message>
|
|
||||||
<source>Make window stay on top of all other windows.</source>
|
|
||||||
<translation type="vanished">使窗口始终至于其它非置顶窗口上方。</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
|
||||||
<translation type="vanished">避免窗口意外关闭。(如:不小心双击了窗口触发了关闭窗口行为)</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SettingsDialog</name>
|
<name>SettingsDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog.cpp" line="18"/>
|
<location filename="../settingsdialog.cpp" line="15"/>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation>设定</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="20"/>
|
||||||
<source>Do nothing</source>
|
<source>Do nothing</source>
|
||||||
<translation>什么也不做</translation>
|
<translation>什么也不做</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog.cpp" line="19"/>
|
<location filename="../settingsdialog.cpp" line="21"/>
|
||||||
<source>Close the window</source>
|
<source>Close the window</source>
|
||||||
<translation>关闭窗口</translation>
|
<translation>关闭窗口</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog.cpp" line="20"/>
|
<location filename="../settingsdialog.cpp" line="22"/>
|
||||||
<source>Toggle maximize</source>
|
<source>Toggle maximize</source>
|
||||||
<translation>最大化窗口</translation>
|
<translation>最大化窗口</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog.cpp" line="28"/>
|
<location filename="../settingsdialog.cpp" line="30"/>
|
||||||
<source>Stay on top when start-up</source>
|
<source>Stay on top when start-up</source>
|
||||||
<translation>启动时保持窗口总在最前</translation>
|
<translation>启动时保持窗口总在最前</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog.cpp" line="29"/>
|
<location filename="../settingsdialog.cpp" line="31"/>
|
||||||
<source>Double-click behavior</source>
|
<source>Double-click behavior</source>
|
||||||
<translation>双击时的行为</translation>
|
<translation>双击时的行为</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -37,7 +37,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
}
|
}
|
||||||
|
|
||||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
this->setMinimumSize(350, 350);
|
this->setMinimumSize(350, 330);
|
||||||
this->setWindowIcon(QIcon(":/icons/app-icon.svg"));
|
this->setWindowIcon(QIcon(":/icons/app-icon.svg"));
|
||||||
this->setMouseTracking(true);
|
this->setMouseTracking(true);
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ SettingsDialog::SettingsDialog(QWidget *parent)
|
||||||
, m_stayOnTop(new QCheckBox)
|
, m_stayOnTop(new QCheckBox)
|
||||||
, m_doubleClickBehavior(new QComboBox)
|
, m_doubleClickBehavior(new QComboBox)
|
||||||
{
|
{
|
||||||
|
this->setWindowTitle(tr("Settings"));
|
||||||
|
|
||||||
QFormLayout * settingsForm = new QFormLayout(this);
|
QFormLayout * settingsForm = new QFormLayout(this);
|
||||||
|
|
||||||
static QMap<DoubleClickBehavior, QString> _map {
|
static QMap<DoubleClickBehavior, QString> _map {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user