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

KHTML

  • 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jun 1 2013 20:22:27 by doxygen 1.8.3.1 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-4.10.4 API Reference

Skip menu "kdelibs-4.10.4 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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