KDevelop API Documentation

docdjvuplugin.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Mathieu Chouinard                               *
00003  *   mathieu.chouinard@kdemail.net                                         *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program 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         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #include "docdjvuplugin.h"
00021 
00022 #include <kurl.h>
00023 #include <kaboutdata.h>
00024 #include <kconfig.h>
00025 #include <klocale.h>
00026 #include <klistview.h>
00027 
00028 #include <kdevgenericfactory.h>
00029 
00030 static const KAboutData data("docdjvuplugin", I18N_NOOP("Djvu documentation plugin"), "1.0");
00031 typedef KDevGenericFactory<DocDjvuPlugin> DocDjvuPluginFactory;
00032 K_EXPORT_COMPONENT_FACTORY( libdocdjvuplugin, DocDjvuPluginFactory(&data) )
00033 
00034 DocDjvuPlugin::DocDjvuPlugin(QObject* parent, const char* name, const QStringList args)
00035     :DocumentationPlugin(DocDjvuPluginFactory::instance()->config(), parent, name)
00036 {
00037     setCapabilities(CustomDocumentationTitles | ProjectUserManual);
00038     autoSetup();
00039 }
00040 
00041 DocDjvuPlugin::~DocDjvuPlugin()
00042 {
00043 }
00044 
00045 bool DocDjvuPlugin::needRefreshIndex(DocumentationCatalogItem* item)
00046 {
00047     return false;
00048 }
00049 
00050 QString DocDjvuPlugin::pluginName() const
00051 {
00052     return i18n("Djvu Documentation Collection");
00053 }
00054 
00055 DocumentationCatalogItem* DocDjvuPlugin::createCatalog(KListView* contents, const QString& title, const QString& url)
00056 {
00057     DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title);
00058     item->setURL(KURL(url));
00059     return item;
00060 }
00061 
00062 QPair<KFile::Mode, QString> DocDjvuPlugin::catalogLocatorProps()
00063 {
00064     return QPair<KFile::Mode, QString>(KFile::File, "all/allfiles");
00065 }
00066 
00067 QString DocDjvuPlugin::catalogTitle(const QString& /*url*/)
00068 {
00069     return QString::null;
00070 }
00071 
00072 QStringList DocDjvuPlugin::fullTextSearchLocations()
00073 {
00074     return QStringList();
00075 }
00076 
00077 
00078 void DocDjvuPlugin::autoSetupPlugin()
00079 {
00080     return;
00081 }
00082 
00083 void DocDjvuPlugin::createIndex(IndexBox* /*index*/, DocumentationCatalogItem* /*item*/)
00084 {
00085     return;
00086 }
00087 
00088 void DocDjvuPlugin::createTOC(DocumentationCatalogItem* /*item*/)
00089 {
00090     return;
00091 }
00092 
00093 void DocDjvuPlugin::setCatalogURL(DocumentationCatalogItem* /*item*/)
00094 {
00095     return;
00096 }
00097 
00098 ProjectDocumentationPlugin *DocDjvuPlugin::projectDocumentationPlugin(ProjectDocType type)
00099 {
00100     if (type == UserManual)
00101         return new ProjectDocumentationPlugin(this, type);
00102     return DocumentationPlugin::projectDocumentationPlugin(type);
00103 }
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:56 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003