chore: make use of Qt::Literals::StringLiterals u""_s
Migrate string literal handling to Qt’s built‐in `u""_s` literals for consistency and readability.
This commit is contained in:
@ -14,6 +14,8 @@
|
||||
#include <QPushButton>
|
||||
#include <QFile>
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_tabWidget(new QTabWidget)
|
||||
@ -27,60 +29,60 @@ AboutDialog::AboutDialog(QWidget *parent)
|
||||
this->setWindowTitle(tr("About"));
|
||||
|
||||
const QStringList helpStr {
|
||||
QStringLiteral("<p>%1</p>").arg(tr("Launch application with image file path as argument to load the file.")),
|
||||
QStringLiteral("<p>%1</p>").arg(tr("Drag and drop image file onto the window is also supported.")),
|
||||
QStringLiteral("<p>%1</p>").arg(tr("None of the operations in this application will alter the pictures on disk.")),
|
||||
QStringLiteral("<p>%1</p>").arg(tr("Context menu option explanation:")),
|
||||
QStringLiteral("<ul>"),
|
||||
u"<p>%1</p>"_s.arg(tr("Launch application with image file path as argument to load the file.")),
|
||||
u"<p>%1</p>"_s.arg(tr("Drag and drop image file onto the window is also supported.")),
|
||||
u"<p>%1</p>"_s.arg(tr("None of the operations in this application will alter the pictures on disk.")),
|
||||
u"<p>%1</p>"_s.arg(tr("Context menu option explanation:")),
|
||||
u"<ul>"_s,
|
||||
// blumia: Chain two arg() here since it seems lupdate will remove one of them if we use
|
||||
// the old `arg(QCoreApp::translate(), tr())` way, but it's worth to mention
|
||||
// `arg(QCoreApp::translate(), this->tr())` works, but lupdate will complain about the usage.
|
||||
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
||||
.arg(QCoreApplication::translate("MainWindow", "Stay on top"))
|
||||
.arg(tr("Make window stay on top of all other windows.")),
|
||||
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
||||
.arg(QCoreApplication::translate("MainWindow", "Protected mode"))
|
||||
.arg(tr("Avoid close window accidentally. (eg. by double clicking the window)")),
|
||||
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
||||
.arg(QCoreApplication::translate("MainWindow", "Keep transformation", "The 'transformation' means the flip/rotation status that currently applied to the image view"))
|
||||
.arg(tr("Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.")),
|
||||
QStringLiteral("</ul>")
|
||||
u"<li><b>%1</b>:<br/>%2</li>"_s
|
||||
.arg(QCoreApplication::translate("MainWindow", "Stay on top"))
|
||||
.arg(tr("Make window stay on top of all other windows.")),
|
||||
u"<li><b>%1</b>:<br/>%2</li>"_s
|
||||
.arg(QCoreApplication::translate("MainWindow", "Protected mode"))
|
||||
.arg(tr("Avoid close window accidentally. (eg. by double clicking the window)")),
|
||||
u"<li><b>%1</b>:<br/>%2</li>"_s
|
||||
.arg(QCoreApplication::translate("MainWindow", "Keep transformation", "The 'transformation' means the flip/rotation status that currently applied to the image view"))
|
||||
.arg(tr("Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.")),
|
||||
u"</ul>"_s
|
||||
};
|
||||
|
||||
const QStringList aboutStr {
|
||||
QStringLiteral("<center><img width='128' height='128' src=':/icons/app-icon.svg'/><br/>"),
|
||||
u"<center><img width='128' height='128' src=':/icons/app-icon.svg'/><br/>"_s,
|
||||
qApp->applicationDisplayName(),
|
||||
(QStringLiteral("<br/>") + tr("Version: %1").arg(
|
||||
(u"<br/>"_s + tr("Version: %1").arg(
|
||||
#ifdef GIT_DESCRIBE_VERSION_STRING
|
||||
GIT_DESCRIBE_VERSION_STRING
|
||||
#else
|
||||
qApp->applicationVersion()
|
||||
#endif // GIT_DESCRIBE_VERSION_STRING
|
||||
)),
|
||||
QStringLiteral("<hr/>"),
|
||||
u"<hr/>"_s,
|
||||
tr("Copyright (c) %1 %2", "%1 is year, %2 is the name of copyright holder(s)")
|
||||
.arg(QStringLiteral("2025"), 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/>"),
|
||||
.arg(u"2025"_s, u"<a href='https://github.com/BLumia'>@BLumia</a>"_s),
|
||||
u"<br/>"_s,
|
||||
tr("Logo designed by %1").arg(u"<a href='https://github.com/Lovelyblack'>@Lovelyblack</a>"_s),
|
||||
u"<hr/>"_s,
|
||||
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("</center>")
|
||||
u"</center>"_s
|
||||
};
|
||||
|
||||
QFile translaterHtml(":/plain/translators.html");
|
||||
QFile translaterHtml(u":/plain/translators.html"_s);
|
||||
bool canOpenFile = translaterHtml.open(QIODevice::ReadOnly);
|
||||
const QByteArray & translatorList = canOpenFile ? translaterHtml.readAll() : QByteArrayLiteral("");
|
||||
|
||||
const QStringList specialThanksStr {
|
||||
QStringLiteral("<h1 align='center'>%1</h1><a href='%2'>%3</a><p>%4</p>").arg(
|
||||
u"<h1 align='center'>%1</h1><a href='%2'>%3</a><p>%4</p>"_s.arg(
|
||||
tr("Contributors"),
|
||||
QStringLiteral("https://github.com/BLumia/pineapple-pictures/graphs/contributors"),
|
||||
u"https://github.com/BLumia/pineapple-pictures/graphs/contributors"_s,
|
||||
tr("List of contributors on GitHub"),
|
||||
tr("Thanks to all people who contributed to this project.")
|
||||
),
|
||||
|
||||
QStringLiteral("<h1 align='center'>%1</h1><p>%2</p>%3").arg(
|
||||
u"<h1 align='center'>%1</h1><p>%2</p>%3"_s.arg(
|
||||
tr("Translators"),
|
||||
tr("I would like to thank the following people who volunteered to translate this application."),
|
||||
translatorList
|
||||
@ -88,17 +90,17 @@ AboutDialog::AboutDialog(QWidget *parent)
|
||||
};
|
||||
|
||||
const QStringList licenseStr {
|
||||
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Your Rights")),
|
||||
QStringLiteral("<p>%1</p><p>%2</p><ul><li>%3</li><li>%4</li><li>%5</li><li>%6</li></ul>").arg(
|
||||
u"<h1 align='center'><b>%1</b></h1>"_s.arg(tr("Your Rights")),
|
||||
u"<p>%1</p><p>%2</p><ul><li>%3</li><li>%4</li><li>%5</li><li>%6</li></ul>"_s.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>")
|
||||
).arg(u"<i>%1</i>"_s),
|
||||
u"<p>%1</p>"_s.arg(tr("The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.")),
|
||||
u"<hr/><pre>%2</pre>"_s
|
||||
};
|
||||
|
||||
const QString mitLicense(QStringLiteral(R"(Expat/MIT License
|
||||
@ -125,14 +127,14 @@ SOFTWARE.
|
||||
)"));
|
||||
|
||||
const QStringList thirdPartyLibsStr {
|
||||
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Third-party Libraries used by %1")),
|
||||
u"<h1 align='center'><b>%1</b></h1>"_s.arg(tr("Third-party Libraries used by %1")),
|
||||
tr("%1 is built on the following free software libraries:", "Free as in freedom"),
|
||||
QStringLiteral("<ul>"),
|
||||
u"<ul>"_s,
|
||||
#ifdef HAVE_EXIV2_VERSION
|
||||
QStringLiteral("<li><a href='%1'>%2</a>: %3</li>").arg("https://www.exiv2.org/", "Exiv2", "GPLv2"),
|
||||
u"<li><a href='%1'>%2</a>: %3</li>"_s.arg("https://www.exiv2.org/", "Exiv2", "GPLv2"),
|
||||
#endif // EXIV2_VERSION
|
||||
QStringLiteral("<li><a href='%1'>%2</a>: %3</li>").arg("https://www.qt.io/", "Qt", "GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3"),
|
||||
QStringLiteral("</ul>")
|
||||
u"<li><a href='%1'>%2</a>: %3</li>"_s.arg("https://www.qt.io/", "Qt", "GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3"),
|
||||
u"</ul>"_s
|
||||
};
|
||||
|
||||
m_helpTextEdit->setText(helpStr.join('\n'));
|
||||
@ -145,7 +147,7 @@ SOFTWARE.
|
||||
|
||||
m_licenseTextEdit->setText(licenseStr.join('\n').arg(qApp->applicationDisplayName(), mitLicense));
|
||||
|
||||
m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(QStringLiteral("<i>%1</i>").arg(qApp->applicationDisplayName())));
|
||||
m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(u"<i>%1</i>"_s).arg(qApp->applicationDisplayName()));
|
||||
m_3rdPartyLibsTextEdit->setOpenExternalLinks(true);
|
||||
|
||||
m_tabWidget->addTab(m_helpTextEdit, tr("&Help"));
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "opacityhelper.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <QDebug>
|
||||
|
10
app/main.cpp
10
app/main.cpp
@ -17,9 +17,11 @@
|
||||
#include <QTranslator>
|
||||
#include <QUrl>
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setApplicationName("Pineapple Pictures");
|
||||
QCoreApplication::setApplicationName(u"Pineapple Pictures"_s);
|
||||
QCoreApplication::setApplicationVersion(PPIC_VERSION_STRING);
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Settings::instance()->hiDpiScaleFactorBehavior());
|
||||
|
||||
@ -27,20 +29,20 @@ int main(int argc, char *argv[])
|
||||
|
||||
QTranslator translator;
|
||||
#if defined(TRANSLATION_RESOURCE_EMBEDDING)
|
||||
const QString qmDir = QLatin1String(":/i18n/");
|
||||
const QString qmDir = u":/i18n/"_s;
|
||||
#elif defined(QM_FILE_INSTALL_ABSOLUTE_DIR)
|
||||
const QString qmDir = QT_STRINGIFY(QM_FILE_INSTALL_ABSOLUTE_DIR);
|
||||
#else
|
||||
const QString qmDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("translations");
|
||||
#endif
|
||||
if (translator.load(QLocale(), QLatin1String("PineapplePictures"), QLatin1String("_"), qmDir)) {
|
||||
if (translator.load(QLocale(), u"PineapplePictures"_s, u"_"_s, qmDir)) {
|
||||
QCoreApplication::installTranslator(&translator);
|
||||
}
|
||||
|
||||
QGuiApplication::setApplicationDisplayName(QCoreApplication::translate("main", "Pineapple Pictures"));
|
||||
|
||||
// commandline options
|
||||
QCommandLineOption supportedImageFormats(QStringLiteral("supported-image-formats"), QCoreApplication::translate("main", "List supported image format suffixes, and quit program."));
|
||||
QCommandLineOption supportedImageFormats(u"supported-image-formats"_s, QCoreApplication::translate("main", "List supported image format suffixes, and quit program."));
|
||||
// parse commandline arguments
|
||||
QCommandLineParser parser;
|
||||
parser.addOption(supportedImageFormats);
|
||||
|
@ -44,6 +44,8 @@
|
||||
#include <QDBusConnectionInterface>
|
||||
#endif // HAVE_QTDBUS
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: FramelessWindow(parent)
|
||||
, m_am(new ActionManager)
|
||||
@ -56,17 +58,17 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
this->setMinimumSize(350, 330);
|
||||
this->setWindowIcon(QIcon(":/icons/app-icon.svg"));
|
||||
this->setWindowIcon(QIcon(u":/icons/app-icon.svg"_s));
|
||||
this->setMouseTracking(true);
|
||||
this->setAcceptDrops(true);
|
||||
|
||||
m_pm->setAutoLoadFilterSuffixes(supportedImageFormats());
|
||||
|
||||
m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity");
|
||||
m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity"_ba);
|
||||
m_fadeOutAnimation->setDuration(300);
|
||||
m_fadeOutAnimation->setStartValue(1);
|
||||
m_fadeOutAnimation->setEndValue(0);
|
||||
m_floatUpAnimation = new QPropertyAnimation(this, "geometry");
|
||||
m_floatUpAnimation = new QPropertyAnimation(this, "geometry"_ba);
|
||||
m_floatUpAnimation->setDuration(300);
|
||||
m_floatUpAnimation->setEasingCurve(QEasingCurve::OutCirc);
|
||||
m_exitAnimationGroup = new QParallelAnimationGroup(this);
|
||||
@ -92,7 +94,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
||||
|
||||
connect(m_graphicsView, &GraphicsView::navigatorViewRequired,
|
||||
this, [ = ](bool required, const QTransform & tf){
|
||||
this, [this](bool required, const QTransform & tf){
|
||||
m_gv->setTransform(GraphicsView::resetScale(tf));
|
||||
m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
||||
m_gv->setVisible(required);
|
||||
@ -447,13 +449,11 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
||||
QMenu * menu = new QMenu;
|
||||
QMenu * copyMenu = new QMenu(tr("&Copy"));
|
||||
QUrl currentFileUrl = currentImageFileUrl();
|
||||
QImage clipboardImage;
|
||||
QUrl clipboardFileUrl;
|
||||
|
||||
QAction * copyPixmap = m_am->actionCopyPixmap;
|
||||
QAction * copyFilePath = m_am->actionCopyFilePath;
|
||||
|
||||
copyMenu->setIcon(QIcon::fromTheme(QLatin1String("edit-copy")));
|
||||
copyMenu->setIcon(QIcon::fromTheme(u"edit-copy"_s));
|
||||
copyMenu->addAction(copyPixmap);
|
||||
if (currentFileUrl.isValid()) {
|
||||
copyMenu->addAction(copyFilePath);
|
||||
@ -780,7 +780,7 @@ void MainWindow::on_actionTrash_triggered()
|
||||
if (result == QMessageBox::Yes) {
|
||||
bool succ = file.moveToTrash();
|
||||
if (!succ) {
|
||||
QMessageBox::warning(this, "Failed to move file to trash",
|
||||
QMessageBox::warning(this, tr("Failed to move file to trash"),
|
||||
tr("Move to trash failed, it might caused by file permission issue, file system limitation, or platform limitation."));
|
||||
} else {
|
||||
m_pm->removeAt(index);
|
||||
@ -891,9 +891,9 @@ void MainWindow::on_actionLocateInFileManager_triggered()
|
||||
QDesktopServices::openUrl(folderUrl);
|
||||
return;
|
||||
}
|
||||
QDBusInterface fm1Iface(QStringLiteral("org.freedesktop.FileManager1"),
|
||||
QStringLiteral("/org/freedesktop/FileManager1"),
|
||||
QStringLiteral("org.freedesktop.FileManager1"));
|
||||
QDBusInterface fm1Iface(u"org.freedesktop.FileManager1"_s,
|
||||
u"/org/freedesktop/FileManager1"_s,
|
||||
u"org.freedesktop.FileManager1"_s);
|
||||
fm1Iface.setTimeout(1000);
|
||||
fm1Iface.callWithArgumentList(QDBus::Block, "ShowItems", {
|
||||
QStringList{currentFileUrl.toString()},
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include <QFileInfo>
|
||||
#include <QImageReader>
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
MetadataModel::MetadataModel(QObject *parent)
|
||||
: QAbstractItemModel(parent)
|
||||
{
|
||||
@ -37,131 +39,131 @@ void MetadataModel::setFile(const QString &imageFilePath)
|
||||
const QString & imageDimensionsString = imageSize(imgReader.size());
|
||||
const QString & imageRatioString = imageSizeRatio(imgReader.size());
|
||||
|
||||
appendSection(QStringLiteral("Description"), tr("Description", "Section name."));
|
||||
appendSection(QStringLiteral("Origin"), tr("Origin", "Section name."));
|
||||
appendSection(QStringLiteral("Image"), tr("Image", "Section name."));
|
||||
appendSection(QStringLiteral("Camera"), tr("Camera", "Section name."));
|
||||
appendSection(QStringLiteral("AdvancedPhoto"), tr("Advanced photo", "Section name."));
|
||||
appendSection(QStringLiteral("GPS"), tr("GPS", "Section name."));
|
||||
appendSection(QStringLiteral("File"), tr("File", "Section name."));
|
||||
appendSection(u"Description"_s, tr("Description", "Section name."));
|
||||
appendSection(u"Origin"_s, tr("Origin", "Section name."));
|
||||
appendSection(u"Image"_s, tr("Image", "Section name."));
|
||||
appendSection(u"Camera"_s, tr("Camera", "Section name."));
|
||||
appendSection(u"AdvancedPhoto"_s, tr("Advanced photo", "Section name."));
|
||||
appendSection(u"GPS"_s, tr("GPS", "Section name."));
|
||||
appendSection(u"File"_s, tr("File", "Section name."));
|
||||
|
||||
if (imgReader.supportsOption(QImageIOHandler::Size)) {
|
||||
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.Dimensions"),
|
||||
appendProperty(u"Image"_s, u"Image.Dimensions"_s,
|
||||
tr("Dimensions"), imageDimensionsString);
|
||||
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.SizeRatio"),
|
||||
appendProperty(u"Image"_s, u"Image.SizeRatio"_s,
|
||||
tr("Aspect ratio"), imageRatioString);
|
||||
}
|
||||
if (imgReader.supportsAnimation() && imgReader.imageCount() > 1) {
|
||||
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.FrameCount"),
|
||||
appendProperty(u"Image"_s, u"Image.FrameCount"_s,
|
||||
tr("Frame count"), QString::number(imgReader.imageCount()));
|
||||
}
|
||||
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.Name"),
|
||||
appendProperty(u"File"_s, u"File.Name"_s,
|
||||
tr("Name"), fileInfo.fileName());
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.ItemType"),
|
||||
appendProperty(u"File"_s, u"File.ItemType"_s,
|
||||
tr("Item type"), itemTypeString);
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.Path"),
|
||||
appendProperty(u"File"_s, u"File.Path"_s,
|
||||
tr("Folder path"), QDir::toNativeSeparators(fileInfo.path()));
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.Size"),
|
||||
appendProperty(u"File"_s, u"File.Size"_s,
|
||||
tr("Size"), sizeString);
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.CreatedTime"),
|
||||
appendProperty(u"File"_s, u"File.CreatedTime"_s,
|
||||
tr("Date created"), birthTimeString);
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.LastModified"),
|
||||
appendProperty(u"File"_s, u"File.LastModified"_s,
|
||||
tr("Date modified"), lastModifiedTimeString);
|
||||
|
||||
Exiv2Wrapper wrapper;
|
||||
if (wrapper.load(imageFilePath)) {
|
||||
wrapper.cacheSections();
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
||||
QStringLiteral("Xmp.dc.title"), tr("Title"), true);
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
||||
QStringLiteral("Exif.Image.ImageDescription"), tr("Subject"), true);
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
||||
QStringLiteral("Exif.Image.Rating"), tr("Rating"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
||||
QStringLiteral("Xmp.dc.subject"), tr("Tags"));
|
||||
appendPropertyIfNotEmpty(QStringLiteral("Description"), QStringLiteral("Description.Comments"),
|
||||
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||
u"Xmp.dc.title"_s, tr("Title"), true);
|
||||
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||
u"Exif.Image.ImageDescription"_s, tr("Subject"), true);
|
||||
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||
u"Exif.Image.Rating"_s, tr("Rating"));
|
||||
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||
u"Xmp.dc.subject"_s, tr("Tags"));
|
||||
appendPropertyIfNotEmpty(u"Description"_s, u"Description.Comments"_s,
|
||||
tr("Comments"), wrapper.comment());
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
QStringLiteral("Exif.Image.Artist"), tr("Authors"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
QStringLiteral("Exif.Photo.DateTimeOriginal"), tr("Date taken"));
|
||||
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||
u"Exif.Image.Artist"_s, tr("Authors"));
|
||||
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||
u"Exif.Photo.DateTimeOriginal"_s, tr("Date taken"));
|
||||
// FIXME: We may fetch the same type of metadata from different metadata collection.
|
||||
// Current implementation is not pretty and may need to do a rework...
|
||||
// appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
// QStringLiteral("Xmp.xmp.CreatorTool"), tr("Program name"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
QStringLiteral("Exif.Image.Software"), tr("Program name"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
QStringLiteral("Exif.Image.Copyright"), tr("Copyright"));
|
||||
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||
u"Exif.Image.Software"_s, tr("Program name"));
|
||||
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||
u"Exif.Image.Copyright"_s, tr("Copyright"));
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
||||
QStringLiteral("Exif.Image.XResolution"), tr("Horizontal resolution"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
||||
QStringLiteral("Exif.Image.YResolution"), tr("Vertical resolution"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
||||
QStringLiteral("Exif.Image.ResolutionUnit"), tr("Resolution unit"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
||||
QStringLiteral("Exif.Photo.ColorSpace"), tr("Colour representation"));
|
||||
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||
u"Exif.Image.XResolution"_s, tr("Horizontal resolution"));
|
||||
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||
u"Exif.Image.YResolution"_s, tr("Vertical resolution"));
|
||||
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||
u"Exif.Image.ResolutionUnit"_s, tr("Resolution unit"));
|
||||
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||
u"Exif.Photo.ColorSpace"_s, tr("Colour representation"));
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Image.Make"), tr("Camera maker"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Image.Model"), tr("Camera model"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.FNumber"), tr("F-stop"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.ExposureTime"), tr("Exposure time"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.ISOSpeedRatings"), tr("ISO speed"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.ExposureBiasValue"), tr("Exposure bias"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.FocalLength"), tr("Focal length"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.MaxApertureValue"), tr("Max aperture"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.MeteringMode"), tr("Metering mode"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.SubjectDistance"), tr("Subject distance"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.Flash"), tr("Flash mode"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.FocalLengthIn35mmFilm"), tr("35mm focal length"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Image.Make"_s, tr("Camera maker"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Image.Model"_s, tr("Camera model"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.FNumber"_s, tr("F-stop"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.ExposureTime"_s, tr("Exposure time"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.ISOSpeedRatings"_s, tr("ISO speed"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.ExposureBiasValue"_s, tr("Exposure bias"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.FocalLength"_s, tr("Focal length"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.MaxApertureValue"_s, tr("Max aperture"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.MeteringMode"_s, tr("Metering mode"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.SubjectDistance"_s, tr("Subject distance"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.Flash"_s, tr("Flash mode"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.FocalLengthIn35mmFilm"_s, tr("35mm focal length"));
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.LensModel"), tr("Lens model"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.Contrast"), tr("Contrast"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.BrightnessValue"), tr("Brightness"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.ExposureProgram"), tr("Exposure program"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.Saturation"), tr("Saturation"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.Sharpness"), tr("Sharpness"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.WhiteBalance"), tr("White balance"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.DigitalZoomRatio"), tr("Digital zoom"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.ExifVersion"), tr("EXIF version"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.LensModel"_s, tr("Lens model"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.Contrast"_s, tr("Contrast"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.BrightnessValue"_s, tr("Brightness"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.ExposureProgram"_s, tr("Exposure program"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.Saturation"_s, tr("Saturation"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.Sharpness"_s, tr("Sharpness"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.WhiteBalance"_s, tr("White balance"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.DigitalZoomRatio"_s, tr("Digital zoom"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.ExifVersion"_s, tr("EXIF version"));
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSLatitudeRef"), tr("Latitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSLatitude"), tr("Latitude"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSLongitudeRef"), tr("Longitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSLongitude"), tr("Longitude"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSAltitudeRef"), tr("Altitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSAltitude"), tr("Altitude"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
u"Exif.GPSInfo.GPSLatitudeRef"_s, tr("Latitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
u"Exif.GPSInfo.GPSLatitude"_s, tr("Latitude"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
u"Exif.GPSInfo.GPSLongitudeRef"_s, tr("Longitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
u"Exif.GPSInfo.GPSLongitude"_s, tr("Longitude"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
u"Exif.GPSInfo.GPSAltitudeRef"_s, tr("Altitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
u"Exif.GPSInfo.GPSAltitude"_s, tr("Altitude"));
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user