1
/***************************************************************************
2
* Copyright (C) 2004 by Alexander Dymo *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program 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 *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
20
#include "doccustomplugin.h"
23
#include <kaboutdata.h>
26
#include <klistview.h>
28
#include <kdevgenericfactory.h>
29
#include <kdevplugininfo.h>
31
static const KDevPluginInfo data("doccustomplugin");
32
typedef KDevGenericFactory<DocCustomPlugin> DocCustomPluginFactory;
33
K_EXPORT_COMPONENT_FACTORY( libdoccustomplugin, DocCustomPluginFactory(data) )
35
DocCustomPlugin::DocCustomPlugin(QObject* parent, const char* name, const QStringList // args
37
:DocumentationPlugin(DocCustomPluginFactory::instance()->config(), parent, name)
39
setCapabilities(CustomDocumentationTitles | ProjectUserManual);
43
DocCustomPlugin::~DocCustomPlugin()
47
bool DocCustomPlugin::needRefreshIndex(DocumentationCatalogItem* // item
53
QString DocCustomPlugin::pluginName() const
55
return i18n("Custom Documentation Collection");
58
DocumentationCatalogItem* DocCustomPlugin::createCatalog(KListView* contents, const QString& title, const QString& url)
60
DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title);
61
item->setURL(KURL(url));
65
QPair<KFile::Mode, QString> DocCustomPlugin::catalogLocatorProps()
67
return QPair<KFile::Mode, QString>(KFile::File, "all/allfiles");
70
QString DocCustomPlugin::catalogTitle(const QString& /*url*/)
75
QStringList DocCustomPlugin::fullTextSearchLocations()
81
void DocCustomPlugin::autoSetupPlugin()
86
void DocCustomPlugin::createIndex(IndexBox* /*index*/, DocumentationCatalogItem* /*item*/)
91
void DocCustomPlugin::createTOC(DocumentationCatalogItem* /*item*/)
96
void DocCustomPlugin::setCatalogURL(DocumentationCatalogItem* /*item*/)
101
ProjectDocumentationPlugin *DocCustomPlugin::projectDocumentationPlugin(ProjectDocType type)
103
if (type == UserManual)
104
return new ProjectDocumentationPlugin(this, type);
105
return DocumentationPlugin::projectDocumentationPlugin(type);