KHTML
khtml_iface.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 * Copyright (C) 2002 Stephan Kulow <coolo@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., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef __khtml_Iface_h__ 00021 #define __khtml_Iface_h__ 00022 00023 #include <kurl.h> 00024 #include <khtml_part.h> 00025 #include <QtDBus/QtDBus> 00026 00027 class KHTMLPart; 00028 00032 class KHTMLPartIface : public QObject 00033 { 00034 Q_OBJECT 00035 00036 public: 00037 00038 KHTMLPartIface( KHTMLPart * ); 00039 virtual ~KHTMLPartIface(); 00040 00041 public Q_SLOTS: 00045 KUrl url() const; 00046 00047 bool closeUrl(); 00048 00055 void setJScriptEnabled( bool enable ); 00056 00061 bool jScriptEnabled() const; 00062 00066 void setMetaRefreshEnabled( bool enable ); 00067 00071 bool metaRefreshEnabled() const; 00072 00077 void setDNDEnabled( bool b ); 00078 00082 bool dndEnabled() const; 00083 00090 void setJavaEnabled( bool enable ); 00091 00095 bool javaEnabled() const; 00096 00097 00101 void setPluginsEnabled( bool enable ); 00102 00106 bool pluginsEnabled() const; 00107 00114 void setAutoloadImages( bool enable ); 00115 00122 bool autoloadImages() const; 00123 00131 void setOnlyLocalReferences(bool enable); 00132 00136 bool onlyLocalReferences() const; 00137 00144 bool setEncoding( const QString &name ); 00145 00151 QString encoding() const; 00152 00160 void setUserStyleSheet(const QString &styleSheet); 00161 00168 void setFixedFont( const QString &name ); 00169 00177 bool gotoAnchor( const QString &name ); 00178 00184 bool nextAnchor(); 00185 00189 bool prevAnchor(); 00190 00195 void activateNode(); 00196 00200 QString selectedText() const; 00201 00205 void selectAll(); 00206 00210 QString lastModified() const; 00211 00216 Q_NOREPLY void print( bool quick ); 00217 00218 void debugRenderTree(); 00219 void debugDOMTree(); 00220 void viewDocumentSource(); 00221 void viewFrameSource(); 00222 void saveBackground(const QString &url); 00223 void saveDocument(const QString &url); 00224 00228 QString evalJS(const QString &script); 00229 00233 void stopAnimations(); 00234 00235 private: 00236 KHTMLPart *part; 00237 }; 00238 00239 #endif 00240