docchmplugin.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "docchmplugin.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 #include "../../../../config.h"
00031
00032 static const KAboutData data("docchmplugin", I18N_NOOP("CHM documentation plugin"), "1.0");
00033 typedef KDevGenericFactory<DocCHMPlugin> DocCHMPluginFactory;
00034 K_EXPORT_COMPONENT_FACTORY( libdocchmplugin, DocCHMPluginFactory(&data) )
00035
00036 DocCHMPlugin::DocCHMPlugin(QObject* parent, const char* name, QStringList args)
00037 :DocumentationPlugin(DocCHMPluginFactory::instance()->config(), parent, name)
00038 {
00039 setCapabilities(CustomDocumentationTitles);
00040 autoSetup();
00041 }
00042
00043 DocCHMPlugin::~DocCHMPlugin()
00044 {
00045 }
00046
00047 DocumentationCatalogItem* DocCHMPlugin::createCatalog(KListView* contents, const QString& title, const QString& url)
00048 {
00049 DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title);
00050 item->setURL(KURL(url));
00051 return item;
00052 }
00053
00054 QPair<KFile::Mode, QString> DocCHMPlugin::catalogLocatorProps()
00055 {
00056 return QPair<KFile::Mode, QString>(KFile::File, "*.chm");
00057 }
00058
00059 QString DocCHMPlugin::catalogTitle(const QString& url)
00060 {
00061 return QString::null;
00062 }
00063
00064 QString DocCHMPlugin::pluginName() const
00065 {
00066 return i18n("CHM Documentation Collection");
00067 }
00068
00069 QStringList DocCHMPlugin::fullTextSearchLocations()
00070 {
00071 return QStringList();
00072 }
00073
00074 bool DocCHMPlugin::needRefreshIndex(DocumentationCatalogItem* item)
00075 {
00076 return false;
00077 }
00078
00079 void DocCHMPlugin::autoSetupPlugin()
00080 {
00081 return;
00082 }
00083
00084 void DocCHMPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* item)
00085 {
00086 return;
00087 }
00088
00089 void DocCHMPlugin::createTOC(DocumentationCatalogItem* item)
00090 {
00091 return;
00092 }
00093
00094 void DocCHMPlugin::setCatalogURL(DocumentationCatalogItem* item)
00095 {
00096 KURL chmURL = item->url();
00097 chmURL.setProtocol("ms-its");
00098 chmURL.addPath("/");
00099 item->setURL(chmURL);
00100 }
00101
00102 #include "docchmplugin.moc"
This file is part of the documentation for KDevelop Version 3.1.2.