File indexing completed on 2024-04-14 03:48:53

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2006-2007 Torsten Rahn <tackat@kde.org>
0004 // SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org>
0005 //
0006 
0007 
0008 #include <QCoreApplication>
0009 #include <QDebug>
0010 
0011 #include "svgxmlhandler.h"
0012 
0013 
0014 int main(int argc, char *argv[])
0015 {
0016     QString  sourcefile;
0017     QString  targetfile;
0018 
0019     QCoreApplication  app(argc, argv);
0020 
0021     for ( int i = 1; i < argc; ++i ) {
0022         if ( strcmp( argv[ i ], "-o" ) == 0 ) {
0023             targetfile = QString( argv[i+1] );
0024             sourcefile = QString( argv[i+2] );
0025 
0026             SVGXmlHandler     handler( targetfile );
0027             QFile             xmlFile( sourcefile );
0028             QXmlInputSource   inputSource(&xmlFile);
0029             QXmlSimpleReader  reader;
0030 
0031             reader.setContentHandler(&handler);
0032             reader.parse( inputSource );
0033 
0034             return 0;
0035         }
0036     }
0037 
0038     qDebug( " svg2pnt -o targetfile sourcefile" );
0039     app.exit();
0040 }