diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 47d455dd55be855e4cc691c32f687f723d9247ee (patch) | |
tree | 52e236aaa2576bdb3840ebede26619692fed6d7d /ksvg/test/external/svgdisplay.cc | |
download | tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksvg/test/external/svgdisplay.cc')
-rw-r--r-- | ksvg/test/external/svgdisplay.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ksvg/test/external/svgdisplay.cc b/ksvg/test/external/svgdisplay.cc new file mode 100644 index 00000000..662fb542 --- /dev/null +++ b/ksvg/test/external/svgdisplay.cc @@ -0,0 +1,32 @@ +#include <kapplication.h> +#include <kcmdlineargs.h> +#include <klocale.h> +#include <kaboutdata.h> +#include "SVGTestWidget.h" + +static KCmdLineOptions options[] = +{ + { "+URL", I18N_NOOP("SVG file to open"), 0 }, + KCmdLineLastOption +}; + +int main(int argc, char **argv) +{ + + KAboutData *about = new KAboutData( "KSVG test app", I18N_NOOP("KSVG test"), "0.1", I18N_NOOP("KSVG standalone test app") ); + KCmdLineArgs::init(argc, argv, about); + KCmdLineArgs::addCmdLineOptions( options ); + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + if(args->count() == 0) + { + args->usage(); + return 0; + } + KURL url = args->url(0); + KApplication a( argc, argv ); + SVGTestWidget *w = new SVGTestWidget(url); + a.setMainWidget(w); + w->show(); + + return a.exec(); +} |