• 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.cpp
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
17  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301 USA
19  */
20 
21 #include "khtmladaptorpart.h"
22 #include <kjs/object.h>
23 #include <QLabel>
24 #include <klocale.h>
25 AdaptorView::AdaptorView(QWidget* wparent, QObject* parent,
26  const QStringList& /*args*/)
27  : KParts::ReadOnlyPart(parent)
28 {
29  QLabel *placeHolder = new QLabel(i18n("Inactive"), wparent);
30  placeHolder->setAlignment(Qt::AlignCenter);
31  placeHolder->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
32 
33  KParts::Part::setWidget(placeHolder);
34 }
35 
36 bool AdaptorView::openFile()
37 {
38  return true;
39 }
40 
41 void AdaptorView::initScripting(KJS::ExecState * /*exec*/)
42 {
43 }
44 
45 KJS::JSObject* AdaptorView::scriptObject()
46 {
47  return new KJS::JSObject();
48 }
49 
50 K_EXPORT_PLUGIN(KHTMLAdaptorPartFactory)
51 
52 KHTMLAdaptorPartFactory::KHTMLAdaptorPartFactory()
53 {
54 }
55 
56 
57 QString variant2StringHelper(const QVariant &variant)
58 {
59  return variant.toString();
60 }
61 
62 QObject* KHTMLAdaptorPartFactory::create(const char* /*iface*/,
63  QWidget* wparent,
64  QObject *parent,
65  const QVariantList &/*args*/,
66  const QString& /*keyword*/)
67 {
68  return new AdaptorView(wparent, parent, QStringList());
69 }
70 
71 #include "moc_khtmladaptorpart.cpp"
QVariant
i18n
QString i18n(const char *text)
QWidget
AdaptorView::scriptObject
KJS::JSObject * scriptObject()
Definition: khtmladaptorpart.cpp:45
QString
K_EXPORT_PLUGIN
K_EXPORT_PLUGIN(KMultiPartFactory(kmultipartAboutData())) class KLineParser
Definition: kmultipart.cpp:50
QObject
klocale.h
AdaptorView::openFile
bool openFile()
Definition: khtmladaptorpart.cpp:36
KHTMLAdaptorPartFactory::create
virtual QObject * create(const char *iface, QWidget *wparent, QObject *parent, const QVariantList &args, const QString &keyword)
Definition: khtmladaptorpart.cpp:62
variant2StringHelper
QString variant2StringHelper(const QVariant &variant)
Definition: khtmladaptorpart.cpp:57
QStringList
khtmladaptorpart.h
KHTMLAdaptorPartFactory
Definition: khtmladaptorpart.h:47
KParts::Part::setWidget
virtual void setWidget(QWidget *widget)
AdaptorView
Definition: khtmladaptorpart.h:58
QLabel
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
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