File indexing completed on 2024-12-08 04:34:37
0001 /* 0002 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "dialogs/showvideodialog.h" 0008 #include <QApplication> 0009 #include <QCommandLineParser> 0010 #include <QUrl> 0011 int main(int argc, char **argv) 0012 { 0013 QApplication app(argc, argv); 0014 QCommandLineParser parser; 0015 parser.addVersionOption(); 0016 parser.addHelpOption(); 0017 parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("+[file]"), QStringLiteral("Video file"))); 0018 0019 parser.process(app); 0020 QString filename; 0021 if (!parser.positionalArguments().isEmpty()) { 0022 filename = parser.positionalArguments().at(0); 0023 } 0024 auto d = new ShowVideoDialog(nullptr); 0025 d->setVideoPath(filename); 0026 d->resize(800, 600); 0027 d->show(); 0028 0029 return app.exec(); 0030 }