File indexing completed on 2024-04-14 14:45:58

0001 /*
0002     A command line tool to print all tags list supported by Exiv2
0003 
0004     SPDX-FileCopyrightText: 2009-2012 Gilles Caulier <caulier dot gilles at gmail dot com>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 // Qt includes
0010 
0011 #include <QStringList>
0012 #include <QDebug>
0013 
0014 // Local includes
0015 
0016 #include "kexiv2.h"
0017 
0018 using namespace KExiv2Iface;
0019 
0020 int main (int /*argc*/, char** /*argv*/)
0021 {
0022     KExiv2  meta;
0023 
0024     qDebug() << "-- Standard Exif Tags -------------------------------------------------------------";
0025     KExiv2::TagsMap exiftags = meta.getStdExifTagsList();
0026 
0027     for (KExiv2::TagsMap::const_iterator it = exiftags.constBegin(); it != exiftags.constEnd(); ++it )
0028     {
0029         QString     key    = it.key();
0030         QStringList values = it.value();
0031         QString     name   = values[0]; 
0032         QString     title  = values[1];
0033         QString     desc   = values[2];
0034         qDebug() << key << " :: " << name << " :: " << title << " :: " << desc;
0035     }
0036 
0037     qDebug() << "-- Makernote Tags -----------------------------------------------------------------";
0038     KExiv2::TagsMap mntags = meta.getMakernoteTagsList();
0039 
0040     for (KExiv2::TagsMap::const_iterator it = mntags.constBegin(); it != mntags.constEnd(); ++it )
0041     {
0042         QString     key    = it.key();
0043         QStringList values = it.value();
0044         QString     name   = values[0];
0045         QString     title  = values[1];
0046         QString     desc   = values[2];
0047         qDebug() << key << " :: " << name << " :: " << title << " :: " << desc;
0048     }
0049 
0050     qDebug() << "-- Standard Iptc Tags -----------------------------------------------------------------";
0051     KExiv2::TagsMap iptctags = meta.getIptcTagsList();
0052 
0053     for (KExiv2::TagsMap::const_iterator it = iptctags.constBegin(); it != iptctags.constEnd(); ++it )
0054     {
0055         QString     key    = it.key();
0056         QStringList values = it.value();
0057         QString     name   = values[0];
0058         QString     title  = values[1];
0059         QString     desc   = values[2];
0060         qDebug() << key << " :: " << name << " :: " << title << " :: " << desc;
0061     }
0062 
0063     qDebug() << "-- Standard Xmp Tags -----------------------------------------------------------------";
0064     KExiv2::TagsMap xmptags = meta.getXmpTagsList();
0065 
0066     for (KExiv2::TagsMap::const_iterator it = xmptags.constBegin(); it != xmptags.constEnd(); ++it )
0067     {
0068         QString     key    = it.key();
0069         QStringList values = it.value();
0070         QString     name   = values[0];
0071         QString     title  = values[1];
0072         QString     desc   = values[2];
0073         qDebug() << key << " :: " << name << " :: " << title << " :: " << desc;
0074     }
0075 
0076     return 0;
0077 }