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

KHTML

khtmladaptorpart.cpp

Go to the documentation of this file.
00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (C) 2007 Harri Porten (porten@kde.org)
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public
00016  *  License along with this library; if not, write to the Free
00017  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  *  Boston, MA 02110-1301 USA
00019  */
00020 
00021 #include "khtmladaptorpart.h"
00022 #include <kjs/object.h>
00023 #include <QLabel>
00024 #include <klocale.h>
00025 AdaptorView::AdaptorView(QWidget* wparent, QObject* parent,
00026                          const QStringList& /*args*/)
00027     : KParts::ReadOnlyPart(parent)
00028 {
00029     QLabel *placeHolder = new QLabel(i18n("Inactive"), wparent);
00030     placeHolder->setAlignment(Qt::AlignCenter);
00031     placeHolder->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
00032 
00033     KParts::Part::setWidget(placeHolder);
00034 }
00035 
00036 bool AdaptorView::openFile()
00037 {
00038     return true;
00039 }
00040 
00041 void AdaptorView::initScripting(KJS::ExecState * /*exec*/)
00042 {
00043 }
00044 
00045 KJS::JSObject* AdaptorView::scriptObject()
00046 {
00047     return new KJS::JSObject();
00048 }
00049 
00050 K_EXPORT_COMPONENT_FACTORY (khtmladaptorpart, KHTMLAdaptorPartFactory)
00051 
00052 KHTMLAdaptorPartFactory::KHTMLAdaptorPartFactory()
00053 {
00054 }
00055 
00056 KParts::Part* KHTMLAdaptorPartFactory::createPartObject(QWidget* wparent,
00057                                                         QObject* parent,
00058                                                         const char* /*className*/,
00059                                                         const QStringList& args)
00060 {
00061     return new AdaptorView(wparent, parent, args);
00062 }
00063 
00064 #include "moc_khtmladaptorpart.cpp"

KHTML

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal