| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kjavaappletviewer.h

    00001 // -*- c++ -*-
    00002
    00003 /* This file is part of the KDE project
    00004  *
    00005  * Copyright (C) 2003 Koos Vriezen <koos.vriezen@xs4all.nl>
    00006  *
    00007  * This library is free software; you can redistribute it and/or
    00008  * modify it under the terms of the GNU Library General Public
    00009  * License as published by the Free Software Foundation; either
    00010  * version 2 of the License, or (at your option) any later version.
    00011  *
    00012  * This library is distributed in the hope that it will be useful,
    00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00015  * Library General Public License for more details.
    00016  *
    00017  * You should have received a copy of the GNU Library General Public License
    00018  * along with this library; see the file COPYING.LIB.  If not, write to
    00019  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00020  * Boston, MA 02111-1307, USA.
    00021  */
    00022
    00023 #ifndef KJAVAAPPLETVIEWER_H
    00024 #define KJAVAAPPLETVIEWER_H
    00025
    00026 #include <kparts/part.h>
    00027 #include <kparts/browserextension.h>
    00028 #include <kparts/factory.h>
    00029 #include <kdialogbase.h>
    00030 #include <kurl.h>
    00031 #include <qobject.h>
    00032 #include <qstringlist.h>
    00033 #include <qguardedptr.h>
    00034
    00035 #include "kjavaappletwidget.h"
    00036
    00037 class QTable;
    00038 class KJavaProcess;
    00039 class KJavaAppletViewer;
    00040 class KAboutData;
    00041 class KInstance;
    00042 class KConfig;
    00043
    00044 /* FIXME: merge with KJavaAppletWidget */
    00045 class KJavaAppletViewerWidget : public KJavaAppletWidget {
    00046 public:
    00047     KJavaAppletViewerWidget (QWidget* parent=0, const char* name=0);
    00048 protected:
    00049     void showEvent (QShowEvent *);
    00050 };
    00051
    00052 class KJavaAppletViewerBrowserExtension : public KParts::BrowserExtension {
    00053     Q_OBJECT
    00054 public:
    00055     KJavaAppletViewerBrowserExtension (KJavaAppletViewer *parent);
    00056     void urlChanged (const QString & url);
    00057     void setLoadingProgress (int percentage);
    00058
    00059     void setURLArgs (const KParts::URLArgs & args);
    00060     void saveState (QDataStream & stream);
    00061     void restoreState (QDataStream & stream);
    00062 public slots:
    00063     void showDocument (const QString & doc, const QString & frame);
    00064 };
    00065
    00066 class KJavaAppletViewer : public KParts::ReadOnlyPart {
    00067     Q_OBJECT
    00068 public:
    00069     KJavaAppletViewer (QWidget * wparent, const char * wname,
    00070               QObject * parent, const char * name, const QStringList &args);
    00071     ~KJavaAppletViewer ();
    00072     KJavaAppletWidget * view () const { return m_view; }
    00073     static KAboutData* createAboutData ();
    00074
    00075     KJavaAppletViewerBrowserExtension * browserextension() const
    00076         { return m_browserextension; }
    00077 public slots:
    00078     virtual bool openURL (const KURL & url);
    00079     void appletLoaded ();
    00080     void infoMessage (const QString &);
    00081 protected:
    00082     bool openFile();
    00083 private:
    00084     QGuardedPtr <KJavaAppletWidget> m_view;
    00085     KConfig * m_config;
    00086     KJavaProcess * process;
    00087     KJavaAppletViewerBrowserExtension * m_browserextension;
    00088     QString baseurl;
    00089 };
    00090
    00091 class KJavaAppletViewerFactory : public KParts::Factory {
    00092     Q_OBJECT
    00093 public:
    00094     KJavaAppletViewerFactory ();
    00095     virtual ~KJavaAppletViewerFactory ();
    00096     virtual KParts::Part *createPartObject
    00097         (QWidget *wparent, const char *wname,
    00098          QObject *parent, const char *name,
    00099          const char *className, const QStringList &args);
    00100     static KInstance * instance () { return s_instance; }
    00101 private:
    00102     static KInstance * s_instance;
    00103 };
    00104
    00105 class AppletParameterDialog : public KDialogBase {
    00106     Q_OBJECT
    00107 public:
    00108     AppletParameterDialog (KJavaAppletWidget * parent);
    00109 protected slots:
    00110     void slotClose ();
    00111 private:
    00112     KJavaAppletWidget * m_appletWidget;
    00113     QTable * table;
    00114 };
    00115
    00116 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:34:11 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001