KHTML
Go to the documentation of this file.
29 #include <QtCore/QMap>
30 #include <QtCore/QPointer>
31 #include <QtCore/QStringList>
32 #include <QtCore/QRegExp>
35 #define DEBUGAREA 6100
40 class KJavaAppletContextPrivate
54 d(new KJavaAppletContextPrivate)
84 static int appletId = 0;
87 d->applets.insert( appletId, applet );
110 const int appletId = applet->
appletId();
111 d->applets.remove( appletId );
138 kDebug(6100) <<
"KJavaAppletContext::received, cmd = >>" << cmd <<
"<<";
139 kDebug(6100) <<
"arg count = " << arg.count();
141 if ( cmd == QLatin1String(
"showstatus")
145 tmp.remove(QRegExp(
"[\n\r]"));
146 kDebug(6100) <<
"status message = " << tmp;
149 else if ( cmd == QLatin1String(
"showurlinframe" )
152 kDebug(6100) <<
"url = " << arg[0] <<
", frame = " << arg[1];
155 else if ( cmd == QLatin1String(
"showdocument" )
158 kDebug(6100) <<
"url = " << arg.first();
161 else if ( cmd == QLatin1String(
"resizeapplet" )
168 const int appletID = arg[0].toInt( &ok );
169 const int width = arg[1].toInt( &ok );
170 const int height = arg[2].toInt( &ok );
174 kError(
DEBUGAREA) <<
"could not parse out parameters for resize" << endl;
183 else if (cmd.startsWith(QLatin1String(
"audioclip_"))) {
184 kDebug(
DEBUGAREA) <<
"process Audio command (not yet implemented): " << cmd <<
" " << arg[0];
186 else if ( cmd == QLatin1String(
"JS_Event" )
190 const int appletID = arg.first().toInt(&ok);
192 if (ok && (applet = d->applets[appletID]))
199 kError(
DEBUGAREA) <<
"parse JS event " << arg[0] <<
" " << arg[1] << endl;
201 else if ( cmd == QLatin1String(
"AppletStateNotification" ) )
204 const int appletID = arg.first().toInt(&ok);
210 const int newState = arg[1].toInt(&ok);
219 kError(
DEBUGAREA) <<
"AppletStateNotification: status is not numerical" << endl;
221 kWarning(
DEBUGAREA) <<
"AppletStateNotification: No such Applet with ID=" << arg[0];
223 kError(
DEBUGAREA) <<
"AppletStateNotification: Applet ID is not numerical" << endl;
225 else if ( cmd == QLatin1String(
"AppletFailed" ) ) {
227 const int appletID = arg.first().toInt(&ok);
244 AppletMap::iterator it = d->applets.begin();
245 const AppletMap::iterator itEnd = d->applets.end();
246 for (; it != itEnd; ++it)
247 if (!(*it).isNull() && (*it)->isCreated() && !(*it)->failed()) {
255 args.push_front( QString::number(
id) );
260 args.push_front( QString::number(
id) );
265 args.push_front( QString::number(
id) );
270 args.push_front( QString::number(
id) );
274 #include <kjavaappletcontext.moc>
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Thu Sep 25 2014 04:21:34 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.