• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
khtmladaptorpart.h
Go to the documentation of this file.
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (C) 2007 Harri Porten (porten@kde.org)
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef KHTMLADAPTORPART_H
21 #define KHTMLADAPTORPART_H
22 
23 #include <khtml_export.h>
24 #include <kparts/part.h>
25 #include <kparts/browserextension.h>
26 #include <kpluginfactory.h>
27 
28 namespace KJS
29 {
30  class ExecState;
31  class JSObject;
32 }
33 
34 class ScriptingInterface
35 {
36 public:
37  virtual ~ScriptingInterface() { }
38 
39  virtual void initScripting(KJS::ExecState *exec) = 0;
40  virtual void stopScripting() = 0;
41 
42  virtual KJS::JSObject* scriptObject() = 0;
43 };
44 
45 Q_DECLARE_INTERFACE(ScriptingInterface, "org.kde.khtml.ScriptingInterface")
46 
47 class KHTMLAdaptorPartFactory : public KPluginFactory {
48  Q_OBJECT
49 public:
50  KHTMLAdaptorPartFactory ();
51  virtual QObject *create(const char *iface,
52  QWidget *wparent,
53  QObject *parent,
54  const QVariantList &args,
55  const QString &keyword);
56 };
57 
58 class AdaptorView : public KParts::ReadOnlyPart,
59  public ScriptingInterface {
60  Q_OBJECT
61  Q_INTERFACES(ScriptingInterface)
62 public:
63  AdaptorView(QWidget* wparent, QObject* parent, const QStringList& args);
64 
65  void initScripting(KJS::ExecState *exec);
66  void stopScripting() { }
67  KJS::JSObject* scriptObject();
68 
69 protected:
70  bool openFile();
71 };
72 
73 #endif
ScriptingInterface::~ScriptingInterface
virtual ~ScriptingInterface()
Definition: khtmladaptorpart.h:37
QWidget
AdaptorView::scriptObject
KJS::JSObject * scriptObject()
Definition: khtmladaptorpart.cpp:45
QString
QObject
AdaptorView::openFile
bool openFile()
Definition: khtmladaptorpart.cpp:36
AdaptorView::stopScripting
void stopScripting()
Definition: khtmladaptorpart.h:66
ScriptingInterface::initScripting
virtual void initScripting(KJS::ExecState *exec)=0
QStringList
KHTMLAdaptorPartFactory
Definition: khtmladaptorpart.h:47
ScriptingInterface::stopScripting
virtual void stopScripting()=0
AdaptorView
Definition: khtmladaptorpart.h:58
ScriptingInterface
Definition: khtmladaptorpart.h:34
ScriptingInterface::scriptObject
virtual KJS::JSObject * scriptObject()=0
khtml_export.h
kpluginfactory.h
create
KAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
browserextension.h
AdaptorView::AdaptorView
AdaptorView(QWidget *wparent, QObject *parent, const QStringList &args)
Definition: khtmladaptorpart.cpp:25
AdaptorView::initScripting
void initScripting(KJS::ExecState *exec)
Definition: khtmladaptorpart.cpp:41
KPluginFactory
part.h
KParts::ReadOnlyPart
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal