~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to parts/documentation/plugins/custom/doccustomplugin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2004 by Alexander Dymo                                  *
3
 
 *   adymo@mksat.net                                                       *
4
 
 *                                                                         *
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.                                   *
9
 
 *                                                                         *
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.                          *
14
 
 *                                                                         *
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"
21
 
 
22
 
#include <kurl.h>
23
 
#include <kaboutdata.h>
24
 
#include <kconfig.h>
25
 
#include <klocale.h>
26
 
#include <klistview.h>
27
 
 
28
 
#include <kdevgenericfactory.h>
29
 
#include <kdevplugininfo.h>
30
 
 
31
 
static const KDevPluginInfo data("doccustomplugin");
32
 
typedef KDevGenericFactory<DocCustomPlugin> DocCustomPluginFactory;
33
 
K_EXPORT_COMPONENT_FACTORY( libdoccustomplugin, DocCustomPluginFactory(data) )
34
 
 
35
 
DocCustomPlugin::DocCustomPlugin(QObject* parent, const char* name, const QStringList // args
36
 
                                 )
37
 
    :DocumentationPlugin(DocCustomPluginFactory::instance()->config(), parent, name)
38
 
{
39
 
    setCapabilities(CustomDocumentationTitles | ProjectUserManual);
40
 
    autoSetup();
41
 
}
42
 
 
43
 
DocCustomPlugin::~DocCustomPlugin()
44
 
{
45
 
}
46
 
 
47
 
bool DocCustomPlugin::needRefreshIndex(DocumentationCatalogItem* // item
48
 
                                       )
49
 
{
50
 
    return false;
51
 
}
52
 
 
53
 
QString DocCustomPlugin::pluginName() const
54
 
{
55
 
    return i18n("Custom Documentation Collection");
56
 
}
57
 
 
58
 
DocumentationCatalogItem* DocCustomPlugin::createCatalog(KListView* contents, const QString& title, const QString& url)
59
 
{
60
 
    DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title);
61
 
    item->setURL(KURL(url));
62
 
    return item;
63
 
}
64
 
 
65
 
QPair<KFile::Mode, QString> DocCustomPlugin::catalogLocatorProps()
66
 
{
67
 
    return QPair<KFile::Mode, QString>(KFile::File, "all/allfiles");
68
 
}
69
 
 
70
 
QString DocCustomPlugin::catalogTitle(const QString& /*url*/)
71
 
{
72
 
    return QString::null;
73
 
}
74
 
 
75
 
QStringList DocCustomPlugin::fullTextSearchLocations()
76
 
{
77
 
    return QStringList();
78
 
}
79
 
 
80
 
 
81
 
void DocCustomPlugin::autoSetupPlugin()
82
 
{
83
 
    return;
84
 
}
85
 
 
86
 
void DocCustomPlugin::createIndex(IndexBox* /*index*/, DocumentationCatalogItem* /*item*/)
87
 
{
88
 
    return;
89
 
}
90
 
 
91
 
void DocCustomPlugin::createTOC(DocumentationCatalogItem* /*item*/)
92
 
{
93
 
    return;
94
 
}
95
 
 
96
 
void DocCustomPlugin::setCatalogURL(DocumentationCatalogItem* /*item*/)
97
 
{
98
 
    return;
99
 
}
100
 
 
101
 
ProjectDocumentationPlugin *DocCustomPlugin::projectDocumentationPlugin(ProjectDocType type)
102
 
{
103
 
    if (type == UserManual)
104
 
        return new ProjectDocumentationPlugin(this, type);
105
 
    return DocumentationPlugin::projectDocumentationPlugin(type);
106
 
}