File indexing completed on 2025-01-19 03:57:44
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2009-12-01 0007 * Description : demo-program for geolocation interface 0008 * 0009 * SPDX-FileCopyrightText: 2009-2010 by Michael G. Hansen <mike at mghansen dot de> 0010 * SPDX-FileCopyrightText: 2014 by Justus Schwartz <justus at gmx dot li> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 // Qt includes 0017 0018 #include <QApplication> 0019 #include <QCommandLineParser> 0020 #include <QCommandLineOption> 0021 0022 // local includes 0023 0024 #include "digikam_debug.h" 0025 #include "mainwindow.h" 0026 #include "digikam_version.h" 0027 0028 int main(int argc, char* argv[]) 0029 { 0030 QApplication app(argc, argv); 0031 QCommandLineParser parser; 0032 parser.addVersionOption(); 0033 parser.addHelpOption(); 0034 parser.addOption(QCommandLineOption(QStringList() << QLatin1String("demopoints_single"), QLatin1String("Add built-in demo points as single markers"))); 0035 parser.addOption(QCommandLineOption(QStringList() << QLatin1String("demopoints_group"), QLatin1String("Add built-in demo points as groupable markers"))); 0036 parser.addOption(QCommandLineOption(QStringList() << QLatin1String("single"), QLatin1String("Do not group the displayed images"))); 0037 parser.addPositionalArgument(QString::fromLatin1("images"), QLatin1String("List of images"), QString::fromLatin1("[images...]")); 0038 parser.process(app); 0039 0040 // get the list of images to load on startup: 0041 QList<QUrl> imagesList; 0042 0043 Q_FOREACH (const QString& file, parser.positionalArguments()) 0044 { 0045 const QUrl argUrl = QUrl::fromLocalFile(file); 0046 qCDebug(DIGIKAM_TESTS_LOG) << argUrl; 0047 imagesList << argUrl; 0048 } 0049 0050 MainWindow* const myMainWindow = new MainWindow(&parser); 0051 myMainWindow->show(); 0052 myMainWindow->slotScheduleImagesForLoading(imagesList); 0053 0054 return app.exec(); 0055 }