23 lines
791 B
C++
23 lines
791 B
C++
#include "pylonrecorder.h"
|
|
#include <QApplication>
|
|
#include <QCommandLineParser>
|
|
#include <pylon/PylonIncludes.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication app(argc, argv);
|
|
QGuiApplication::setApplicationDisplayName(PylonRecorder::tr("Pylon Recorder"));
|
|
QCommandLineParser commandLineParser;
|
|
commandLineParser.addHelpOption();
|
|
commandLineParser.addPositionalArgument(PylonRecorder::tr("[file]"), PylonRecorder::tr("Image file to open."));
|
|
commandLineParser.process(QCoreApplication::arguments());
|
|
PylonRecorder recorder;
|
|
if (!commandLineParser.positionalArguments().isEmpty()
|
|
&& !recorder.loadFile(commandLineParser.positionalArguments().front())) {
|
|
return -1;
|
|
}
|
|
recorder.show();
|
|
int ret = app.exec();
|
|
return ret;
|
|
}
|