1 #include <QtCore/QDebug>
2 #include <kapplication.h>
3 #include <kcmdlineargs.h>
5 #include <QtCore/QString>
9 #include "java/kjavaappletserver.h"
10 #include "java/kjavaapplet.h"
11 #include "java/kjavaappletcontext.h"
12 #include "java/kjavaappletwidget.h"
14 int main(int argc
, char **argv
)
16 KCmdLineArgs::init( argc
, argv
, "testKJASSever", 0, ki18n("testKJASServer"), "0.0", ki18n("test program"));
18 KCmdLineOptions options
;
19 options
.add("+kdelibspath", ki18n("path to kdelibs directory"));
21 KCmdLineArgs::addCmdLineOptions( options
);
22 //KCmdLineArgs::addStdCmdLineOptions();
26 KCmdLineArgs
*args
= KCmdLineArgs::parsedArgs();
29 path
= args
->getOption("kdelibspath");
32 kWarning() << "you need to specify a path to your kdelibs source dir, see \"--help\"";
37 #warning better adjust this :)
39 path
= "/home/danimo/src/kde/trunk/KDE/kdelibs/";
41 QString testpath
= "file://" + path
+ "/kdelibs/khtml/test/";
43 KJavaAppletContext
*context
= new KJavaAppletContext
;
44 KJavaAppletWidget
*a
= new KJavaAppletWidget
;
45 a
->applet()->setAppletContext(context
);
49 // c->registerApplet(a->applet());
51 a
->applet()->setBaseURL( testpath
);
52 a
->applet()->setAppletName( "Lake" );
53 a
->applet()->setAppletClass( "lake.class" );
54 a
->applet()->setParameter( "image", "konqi.gif" );