kjavaappletviewer.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
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.4.