summaryrefslogtreecommitdiffstats
path: root/ksvg/test/external/svgdisplay.cc
blob: de1172dcd570932ee0637b2018e9ede4e8fe287c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <tdeapplication.h>
#include <tdecmdlineargs.h>
#include <tdelocale.h>
#include <tdeaboutdata.h>
#include "SVGTestWidget.h"

static TDECmdLineOptions options[] =
{
	{ "+URL",   I18N_NOOP("SVG file to open"), 0 },
	TDECmdLineLastOption
};

int main(int argc, char **argv)
{

	TDEAboutData *about = new TDEAboutData( "KSVG test app", I18N_NOOP("KSVG test"), "0.1", I18N_NOOP("KSVG standalone test app") );
	TDECmdLineArgs::init(argc, argv, about);
	TDECmdLineArgs::addCmdLineOptions( options );
	TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
	if(args->count() == 0)
	{
		args->usage();
		return 0;
	}
	KURL url = args->url(0);
	TDEApplication a( argc, argv );
	SVGTestWidget *w = new SVGTestWidget(url);
	a.setMainWidget(w);
	w->show();

	return a.exec();
}