# khtml Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# khtmlimage.h

    00001 /* This file is part of the KDE project
    00002    Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License as published by the Free Software Foundation; either
    00007    version 2 of the License, or (at your option) any later version.
    00008
    00009    This library is distributed in the hope that it will be useful,
    00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012    Library General Public License for more details.
    00013
    00014    You should have received a copy of the GNU Library General Public License
    00015    along with this library; see the file COPYING.LIB.  If not, write to
    00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017    Boston, MA 02111-1307, USA.
    00018 */
    00019
    00020 #ifndef __khtmlimage_h__
    00021 #define __khtmlimage_h__
    00022
    00023 #include "khtml_part.h"
    00024 #include <kparts/factory.h>
    00025 #include <kparts/browserextension.h>
    00026
    00027 #include "misc/loader_client.h"
    00028
    00029 class KHTMLPart;
    00030 class KInstance;
    00031
    00032 namespace khtml
    00033 {
    00034     class CachedImage;
    00035 }
    00036
    00040 class KHTMLImageFactory : public KParts::Factory
    00041 {
    00042     Q_OBJECT
    00043 public:
    00044     KHTMLImageFactory();
    00045     virtual ~KHTMLImageFactory();
    00046
    00047     virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
    00048                                             QObject *parent, const char *name,
    00049                                             const char *className, const QStringList &args );
    00050
    00051     static KInstance *instance() { return s_instance; }
    00052
    00053 private:
    00054     static KInstance *s_instance;
    00055 };
    00056
    00060 class KHTMLImage : public KParts::ReadOnlyPart, public khtml::CachedObjectClient
    00061 {
    00062     Q_OBJECT
    00063 public:
    00064     KHTMLImage( QWidget *parentWidget, const char *widgetName,
    00065                 QObject *parent, const char *name, KHTMLPart::GUIProfile prof );
    00066     virtual ~KHTMLImage();
    00067
    00068     virtual bool openFile() { return true; } // grmbl, should be non-pure in part.h, IMHO
    00069
    00070     virtual bool openURL( const KURL &url );
    00071
    00072     virtual bool closeURL();
    00073
    00074     KHTMLPart *doc() const { return m_khtml; }
    00075
    00076     virtual void notifyFinished( khtml::CachedObject *o );
    00077
    00078 protected:
    00079     virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
    00080     virtual bool eventFilter( QObject *filterTarget, QEvent *e );
    00081
    00082 private slots:
    00083 //    void slotImageJobFinished( KIO::Job *job );
    00084
    00085 //    void updateWindowCaption();
    00086
    00087 private:
    00088     void disposeImage();
    00089
    00090     QGuardedPtr<KHTMLPart> m_khtml;
    00091     KParts::BrowserExtension *m_ext;
    00092     QString m_mimeType;
    00093     khtml::CachedImage *m_image;
    00094 };
    00095
    00099 class KHTMLImageBrowserExtension : public KParts::BrowserExtension
    00100 {
    00101     Q_OBJECT
    00102 public:
    00103     KHTMLImageBrowserExtension( KHTMLImage *parent, const char *name = 0 );
    00104
    00105     virtual int xOffset();
    00106     virtual int yOffset();
    00107
    00108 protected slots:
    00109     void print();
    00110     void reparseConfiguration();
    00111
    00112 private:
    00113     KHTMLImage *m_imgPart;
    00114 };
    00115
    00116 #endif

This file is part of the documentation for khtml Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:33:15 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003