1 // SPDX-License-Identifier: LGPL-2.1-or-later 2 // 3 // SPDX-FileCopyrightText: 2006-2007 Torsten Rahn <tackat@kde.org> 4 // SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org> 5 // 6 7 8 #include <QCoreApplication> 9 #include <QDebug> 10 11 #include "svgxmlhandler.h" 12 13 main(int argc,char * argv[])14int main(int argc, char *argv[]) 15 { 16 QString sourcefile; 17 QString targetfile; 18 19 QCoreApplication app(argc, argv); 20 21 for ( int i = 1; i < argc; ++i ) { 22 if ( strcmp( argv[ i ], "-o" ) == 0 ) { 23 targetfile = QString( argv[i+1] ); 24 sourcefile = QString( argv[i+2] ); 25 26 SVGXmlHandler handler( targetfile ); 27 QFile xmlFile( sourcefile ); 28 QXmlInputSource inputSource(&xmlFile); 29 QXmlSimpleReader reader; 30 31 reader.setContentHandler(&handler); 32 reader.parse( inputSource ); 33 34 return 0; 35 } 36 } 37 38 qDebug( " svg2pnt -o targetfile sourcefile" ); 39 app.exit(); 40 } 41