File indexing completed on 2024-04-21 16:13:08

0001 /*
0002     SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez <aleixpol@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "RecordMe.h"
0008 #include <QCommandLineParser>
0009 #include <QGuiApplication>
0010 
0011 int main(int argc, char **argv)
0012 {
0013     QGuiApplication app(argc, argv);
0014 
0015     {
0016         QCommandLineParser parser;
0017         QCommandLineOption duration(QStringLiteral("duration"), QStringLiteral("seconds length of the video"), QStringLiteral("duration"));
0018         parser.addOption(duration);
0019         parser.process(app);
0020 
0021         RecordMe *me = new RecordMe(&app);
0022         if (parser.isSet(duration)) {
0023             me->setDuration(parser.value(duration).toInt() * 1000);
0024         }
0025     }
0026 
0027     return app.exec();
0028 }