summaryrefslogtreecommitdiffstats
path: root/parts/documentation/plugins/pdb
diff options
context:
space:
mode:
Diffstat (limited to 'parts/documentation/plugins/pdb')
-rw-r--r--parts/documentation/plugins/pdb/Makefile.am8
-rw-r--r--parts/documentation/plugins/pdb/docpdbplugin.cpp103
-rw-r--r--parts/documentation/plugins/pdb/docpdbplugin.desktop43
-rw-r--r--parts/documentation/plugins/pdb/docpdbplugin.h50
4 files changed, 204 insertions, 0 deletions
diff --git a/parts/documentation/plugins/pdb/Makefile.am b/parts/documentation/plugins/pdb/Makefile.am
new file mode 100644
index 00000000..4d015e3c
--- /dev/null
+++ b/parts/documentation/plugins/pdb/Makefile.am
@@ -0,0 +1,8 @@
+INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes)
+METASOURCES = AUTO
+kde_module_LTLIBRARIES = libdocpdbplugin.la
+libdocpdbplugin_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries)
+libdocpdbplugin_la_LIBADD = $(top_builddir)/lib/libkdevelop.la
+noinst_HEADERS = docpdbplugin.h
+libdocpdbplugin_la_SOURCES = docpdbplugin.cpp
+kde_services_DATA = docpdbplugin.desktop
diff --git a/parts/documentation/plugins/pdb/docpdbplugin.cpp b/parts/documentation/plugins/pdb/docpdbplugin.cpp
new file mode 100644
index 00000000..5c2f68c7
--- /dev/null
+++ b/parts/documentation/plugins/pdb/docpdbplugin.cpp
@@ -0,0 +1,103 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Mathieu Chouinard *
+ * mathieu.chouinard@kdemail.net *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include "docpdbplugin.h"
+
+#include <kurl.h>
+#include <kaboutdata.h>
+#include <kconfig.h>
+#include <klocale.h>
+#include <klistview.h>
+
+#include <kdevgenericfactory.h>
+
+static const KAboutData data("docpdbplugin", I18N_NOOP("PalmDoc documentation plugin"), "1.0");
+typedef KDevGenericFactory<DocPDBPlugin> DocPDBPluginFactory;
+K_EXPORT_COMPONENT_FACTORY( libdocpdbplugin, DocPDBPluginFactory(&data) )
+
+DocPDBPlugin::DocPDBPlugin(QObject* parent, const char* name, const QStringList args)
+ :DocumentationPlugin(DocPDBPluginFactory::instance()->config(), parent, name)
+{
+ setCapabilities(CustomDocumentationTitles | ProjectUserManual);
+ autoSetup();
+}
+
+DocPDBPlugin::~DocPDBPlugin()
+{
+}
+
+bool DocPDBPlugin::needRefreshIndex(DocumentationCatalogItem* item)
+{
+ return false;
+}
+
+QString DocPDBPlugin::pluginName() const
+{
+ return i18n("PalmDoc Documentation Collection");
+}
+
+DocumentationCatalogItem* DocPDBPlugin::createCatalog(KListView* contents, const QString& title, const QString& url)
+{
+ DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title);
+ item->setURL(KURL(url));
+ return item;
+}
+
+QPair<KFile::Mode, QString> DocPDBPlugin::catalogLocatorProps()
+{
+ return QPair<KFile::Mode, QString>(KFile::File, "all/allfiles");
+}
+
+QString DocPDBPlugin::catalogTitle(const QString& /*url*/)
+{
+ return QString::null;
+}
+
+QStringList DocPDBPlugin::fullTextSearchLocations()
+{
+ return QStringList();
+}
+
+
+void DocPDBPlugin::autoSetupPlugin()
+{
+ return;
+}
+
+void DocPDBPlugin::createIndex(IndexBox* /*index*/, DocumentationCatalogItem* /*item*/)
+{
+ return;
+}
+
+void DocPDBPlugin::createTOC(DocumentationCatalogItem* /*item*/)
+{
+ return;
+}
+
+void DocPDBPlugin::setCatalogURL(DocumentationCatalogItem* /*item*/)
+{
+ return;
+}
+
+ProjectDocumentationPlugin *DocPDBPlugin::projectDocumentationPlugin(ProjectDocType type)
+{
+ if (type == UserManual)
+ return new ProjectDocumentationPlugin(this, type);
+ return DocumentationPlugin::projectDocumentationPlugin(type);
+}
diff --git a/parts/documentation/plugins/pdb/docpdbplugin.desktop b/parts/documentation/plugins/pdb/docpdbplugin.desktop
new file mode 100644
index 00000000..76630793
--- /dev/null
+++ b/parts/documentation/plugins/pdb/docpdbplugin.desktop
@@ -0,0 +1,43 @@
+[Desktop Entry]
+Type=Service
+Name=DocPDBPlugin
+Name[da]=DocPDB-plugin
+Name[sk]=Doc PDB modul
+Name[sv]=DocPDB-insticksmodul
+Name[ta]=DocQt சொருகு
+Name[zh_TW]=PDB 文件外掛程式
+Exec=blubb
+Comment=Documentation plugin for Palmdoc format
+Comment[ca]=Connector de documentació per al format Palmdoc
+Comment[da]=Dokumentations-plugin for Palmdoc-format
+Comment[de]=Komponente für das Palmdoc-Dokumentationsformat
+Comment[el]=Πρόσθετο τεκμηρίωσης για τη μορφή Palmdoc
+Comment[es]=Complemento de documentación para el formato Palmdoc
+Comment[et]=PalmDOC-vormingus dokumentatsiooni plugin
+Comment[eu]=Palmdoc formaturako dokumentazio plugin-a
+Comment[fa]=وصلۀ مستندسازی برای قالب Palmdoc
+Comment[fr]=Module externe de documentation pour le format Palmdoc
+Comment[gl]=Extensión de documentación para o formato Palmdoc
+Comment[hu]=Dokumentációmodul Palmdoc formátumú dokumentációhoz
+Comment[it]=Plugin di documentazione per il formato Palmdoc
+Comment[ja]=Palmdoc フォーマットのためのドキュメンテーションプラグイン
+Comment[ms]=Plugin dokumentasi untuk format Palmdoc
+Comment[nds]=Komponente för dat Palmdoc-Dokmentatschoonformaat
+Comment[ne]=Palmdoc ढाँचाका लागि मिसिलीकरण प्लगइन
+Comment[nl]=Documentatie plugin voor Palmdoc documentatie
+Comment[pl]=Wtyczka dokumentacji dla dokumentacji w formacie Palmdoc
+Comment[pt]='Plugin' para documentação no formato Palmdoc
+Comment[pt_BR]=Plug-in de documentação para o formato Palmdoc
+Comment[ru]=Модуль для просмотра документации в формате Palmdoc
+Comment[sk]=Dokumentačný modul pre Palmdoc formát
+Comment[sr]=Документациони прикључак за Palmdoc формат
+Comment[sr@Latn]=Dokumentacioni priključak za Palmdoc format
+Comment[sv]=Dokumentationsinsticksmodul för Palmdoc-format
+Comment[ta]= CHM ஆவணத்திற்கான ஆவணச் சொருகு
+Comment[tg]=Модул барои наоиш намудани ҳуҷҷатҳо дар формати Palmdoc
+Comment[tr]=Palmdoc biçimi için belgelendirme eklentisi
+Comment[zh_CN]=Palmdoc 格式的文档插件
+Comment[zh_TW]=Palmdoc 格式文件外掛程式
+ServiceTypes=KDevelop/DocumentationPlugins
+X-KDevelop-Version=1
+X-KDE-Library=libdocpdbplugin
diff --git a/parts/documentation/plugins/pdb/docpdbplugin.h b/parts/documentation/plugins/pdb/docpdbplugin.h
new file mode 100644
index 00000000..cdb9e90f
--- /dev/null
+++ b/parts/documentation/plugins/pdb/docpdbplugin.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Mathieu Chouinard *
+ * mathieu.chouinard@kdemail.net *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef DOCPDBPLUGIN_H
+#define DOCPDBPLUGIN_H
+
+#include <kdevdocumentationplugin.h>
+
+class DocPDBPlugin : public DocumentationPlugin {
+public:
+ DocPDBPlugin(QObject* parent, const char* name, const QStringList args = QStringList());
+ ~DocPDBPlugin();
+
+ virtual QString pluginName() const;
+
+ virtual DocumentationCatalogItem* createCatalog(KListView* contents, const QString& title, const QString& url);
+
+ virtual void createTOC(DocumentationCatalogItem* item);
+ virtual void setCatalogURL(DocumentationCatalogItem* item);
+
+ virtual bool needRefreshIndex(DocumentationCatalogItem* item);
+ virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item);
+
+ virtual QStringList fullTextSearchLocations();
+
+ virtual QPair<KFile::Mode, QString> catalogLocatorProps();
+ virtual QString catalogTitle(const QString& url);
+
+ virtual void autoSetupPlugin();
+
+ virtual ProjectDocumentationPlugin *projectDocumentationPlugin(ProjectDocType type);
+};
+
+#endif