• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • java
kjavaapplet.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /* This file is part of the KDE project
3  *
4  * Copyright (C) 2000 Richard Moore <rich@kde.org>
5  * 2000 Wynn Wilkes <wynnw@caldera.com>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 
24 #ifndef KJAVAAPPLET_H
25 #define KJAVAAPPLET_H
26 
27 #include <kurl.h>
28 
29 #include <QtCore/QObject>
30 #include <QtCore/QStringList>
31 #include <QtCore/QMap>
32 
44 class KJavaApplet;
45 class KJavaAppletWidget;
46 class KJavaAppletContext;
47 class KJavaAppletPrivate;
48 
49 
50 class KJavaApplet : public QObject
51 {
52 Q_OBJECT
53 
54 public:
55  // states describing the life cycle of an applet.
56  // keep in sync with applet state in KJASAppletStub.java !
57  typedef enum {
58  UNKNOWN = 0,
59  CLASS_LOADED = 1,
60  INSTANCIATED = 2,
61  INITIALIZED = 3,
62  STARTED = 4,
63  STOPPED = 5,
64  DESTROYED = 6
65  } AppletState;
66  KJavaApplet( KJavaAppletWidget* _parent, KJavaAppletContext* _context = 0 );
67  ~KJavaApplet();
68 
72  void setAppletContext( KJavaAppletContext* _context );
73 
77  void setAppletClass( const QString& clazzName );
78 
82  QString& appletClass();
83 
87  void setBaseURL( const QString& base );
88 
92  QString& baseURL();
93 
97  void setCodeBase( const QString& codeBase );
98 
102  QString& codeBase();
103 
108  void setArchives( const QString& _archives );
109 
114  QString& archives();
115 
119  void setAppletName( const QString& name );
120 
124  QString& appletName();
125 
129  void setSize( QSize size );
130 
134  QSize size();
135 
139  void setParameter( const QString& name, const QString& value );
140 
145  QString& parameter( const QString& name );
146 
150  QMap<QString,QString>& getParams();
151 
155  void setWindowName( const QString& title );
156 
160  QString& getWindowName();
161 
165  void resizeAppletWidget( int width, int height );
166 
171  void create();
172 
177  void init();
178 
182  bool isCreated();
183 
187  void start();
188 
192  void stop();
193 
197  int appletId();
198 
202  void setAppletId( int id );
203 
204  KJavaAppletContext* getContext() const { return context; }
205 
209  void setUser(const QString & _user) { username = _user; }
210  const QString & user () const { return username; }
211 
215  void setPassword(const QString & _password) { userpassword = _password; }
216  const QString & password () const { return userpassword; }
217 
221  void setAuthName(const QString & _auth) { authname = _auth; }
222  const QString & authName () const { return authname; }
223 
229  void stateChange ( const int newState );
230  void setFailed ();
231  AppletState state() const;
232  bool failed() const;
233  bool isAlive() const;
237  void jsData (const QStringList & args) { emit jsEvent (args); }
238 Q_SIGNALS:
239  void jsEvent (const QStringList & args);
240 private:
241  void showStatus( const QString &msg);
242  KJavaAppletPrivate* const d;
243  QMap<QString, QString> params;
244  KJavaAppletContext* context;
245  int id;
246  QString username;
247  QString userpassword;
248  QString authname;
249 };
250 
251 #endif // KJAVAAPPLET_H
KJavaApplet::setWindowName
void setWindowName(const QString &title)
Set the window title for swallowing.
Definition: kjavaapplet.cpp:165
KJavaApplet::UNKNOWN
Definition: kjavaapplet.h:58
KJavaApplet::resizeAppletWidget
void resizeAppletWidget(int width, int height)
Interface for applets to resize themselves.
Definition: kjavaapplet.cpp:148
kurl.h
KJavaApplet::appletName
QString & appletName()
Get the name the applet should be called in its context.
Definition: kjavaapplet.cpp:175
KJavaApplet::parameter
QString & parameter(const QString &name)
Look up the parameter value for the given Parameter.
Definition: kjavaapplet.cpp:93
KJavaApplet::appletClass
QString & appletClass()
Get the name of the Class file the applet should run.
Definition: kjavaapplet.cpp:88
KJavaApplet::appletId
int appletId()
Returns the unique ID this applet is given.
Definition: kjavaapplet.cpp:202
KJavaApplet::setAppletId
void setAppletId(int id)
Set the applet ID.
Definition: kjavaapplet.cpp:207
KJavaApplet::isCreated
bool isCreated()
Returns status of applet- whether it's been created or not.
Definition: kjavaapplet.cpp:72
KJavaApplet::setAppletContext
void setAppletContext(KJavaAppletContext *_context)
Set the applet context'.
Definition: kjavaapplet.cpp:77
QString
KJavaApplet::getWindowName
QString & getWindowName()
Get the window title this applet should use.
Definition: kjavaapplet.cpp:170
KJavaApplet::jsEvent
void jsEvent(const QStringList &args)
KJavaAppletWidget
Definition: kjavaappletwidget.h:82
QObject
KJavaApplet::state
AppletState state() const
Definition: kjavaapplet.cpp:279
KJavaApplet::setFailed
void setFailed()
Definition: kjavaapplet.cpp:267
KJavaApplet::jsData
void jsData(const QStringList &args)
JavaScript coming from Java.
Definition: kjavaapplet.h:237
KJavaApplet::setAppletName
void setAppletName(const QString &name)
Set the name the applet should be called in its context.
Definition: kjavaapplet.cpp:160
KJavaApplet::failed
bool failed() const
Definition: kjavaapplet.cpp:283
KJavaApplet
Definition: kjavaapplet.h:50
KJavaApplet::KJavaApplet
KJavaApplet(KJavaAppletWidget *_parent, KJavaAppletContext *_context=0)
Definition: kjavaapplet.cpp:49
KJavaApplet::authName
const QString & authName() const
Definition: kjavaapplet.h:222
KJavaApplet::STOPPED
Definition: kjavaapplet.h:63
KJavaApplet::setUser
void setUser(const QString &_user)
Get/Set the user name.
Definition: kjavaapplet.h:209
QStringList
KJavaApplet::archives
QString & archives()
Get the list of Archives that should be searched for class files and other resources.
Definition: kjavaapplet.cpp:143
KJavaApplet::~KJavaApplet
~KJavaApplet()
Definition: kjavaapplet.cpp:64
KJavaApplet::AppletState
AppletState
Definition: kjavaapplet.h:57
KJavaApplet::isAlive
bool isAlive() const
Definition: kjavaapplet.cpp:271
KJavaApplet::create
void create()
Send message to AppletServer to create this applet's frame to be swallowed and download the applet cl...
Definition: kjavaapplet.cpp:180
KJavaApplet::start
void start()
Run the applet.
Definition: kjavaapplet.cpp:192
KJavaApplet::getContext
KJavaAppletContext * getContext() const
Definition: kjavaapplet.h:204
KJavaApplet::setSize
void setSize(QSize size)
Set the size of the applet.
Definition: kjavaapplet.cpp:128
KJavaApplet::STARTED
Definition: kjavaapplet.h:62
KJavaApplet::baseURL
QString & baseURL()
get the Base URL of the document embedding the applet
Definition: kjavaapplet.cpp:113
KJavaApplet::size
QSize size()
Get the size of the applet.
Definition: kjavaapplet.cpp:133
KJavaApplet::user
const QString & user() const
Definition: kjavaapplet.h:210
KJavaApplet::codeBase
QString & codeBase()
Get the codebase of the applet classes.
Definition: kjavaapplet.cpp:123
KJavaApplet::setBaseURL
void setBaseURL(const QString &base)
Set the URL of the document embedding the applet.
Definition: kjavaapplet.cpp:108
KJavaApplet::DESTROYED
Definition: kjavaapplet.h:64
KJavaApplet::init
void init()
Send message to AppletServer to Initialize and show this applet.
Definition: kjavaapplet.cpp:187
KJavaApplet::stateChange
void stateChange(const int newState)
called from the protocol engine changes the status according to the one on the java side...
Definition: kjavaapplet.cpp:212
QSize
KJavaApplet::setAppletClass
void setAppletClass(const QString &clazzName)
Specify the name of the class file to run.
Definition: kjavaapplet.cpp:83
KJavaApplet::setPassword
void setPassword(const QString &_password)
Get/Set the user password.
Definition: kjavaapplet.h:215
KJavaAppletContext
Definition: kjavaappletcontext.h:45
KJavaApplet::INSTANCIATED
Definition: kjavaapplet.h:60
KJavaApplet::setArchives
void setArchives(const QString &_archives)
Set the list of archives at the Applet's codebase to search in for class files and other resources...
Definition: kjavaapplet.cpp:138
KJavaApplet::stop
void stop()
Pause the applet.
Definition: kjavaapplet.cpp:197
KJavaApplet::setCodeBase
void setCodeBase(const QString &codeBase)
Set the codebase of the applet classes.
Definition: kjavaapplet.cpp:118
KJavaApplet::setParameter
void setParameter(const QString &name, const QString &value)
Specify a parameter to be passed to the applet.
Definition: kjavaapplet.cpp:98
KJavaApplet::setAuthName
void setAuthName(const QString &_auth)
Get/Set the auth name.
Definition: kjavaapplet.h:221
KJavaApplet::getParams
QMap< QString, QString > & getParams()
Get a reference to the Parameters and their values.
Definition: kjavaapplet.cpp:103
KJavaApplet::CLASS_LOADED
Definition: kjavaapplet.h:59
KJavaApplet::password
const QString & password() const
Definition: kjavaapplet.h:216
KJavaApplet::INITIALIZED
Definition: kjavaapplet.h:61
QMap< QString, QString >
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal