00001 #ifndef WEBPAGE_H
00002 #define WEBPAGE_H
00003
00004 #include <kapplication.h>
00005 #include <kmainwindow.h>
00006 #include <kurl.h>
00007 #include <kparts/browserextension.h>
00008
00009
00010 class KHTMLPart;
00011
00012 class WebPage : public QWidget
00013 {
00014 Q_OBJECT
00015
00016 protected:
00017 virtual bool eventFilter(QObject* object, QEvent* event);
00018
00019 public:
00020 WebPage (const char *location, int zoom, WFlags flags);
00021 WebPage (const char *location, const KParts::URLArgs &args, int zoom, WFlags flags);
00022 ~WebPage();
00023 int zoomFactor;
00024 KHTMLPart *browser;
00025
00026 public slots:
00027 void openURLRequest(const KURL &url, const KParts::URLArgs &args);
00028 void createNewWindow(const KURL &, const KParts::URLArgs &,
00029 const KParts::WindowArgs &, KParts::ReadOnlyPart *&);
00030 void openURL(const QString &url);
00031 void zoomIn();
00032 void zoomOut();
00033 void started(KIO::Job *);
00034 void completed();
00035 void timerTimeout();
00036
00037 signals:
00038 void newUrlRequested(const KURL &url, const KParts::URLArgs &args);
00039 void newWindowRequested(const KURL &, const KParts::URLArgs &,
00040 const KParts::WindowArgs &, KParts::ReadOnlyPart *&);
00041 void pageCompleted(WebPage *page);
00042
00043 private:
00044 QString sUrl;
00045 };
00046
00047 #endif // WEBPAGE_H