summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kfileplugin
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/app_templates/kfileplugin')
-rw-r--r--languages/cpp/app_templates/kfileplugin/.kdev_ignore0
-rw-r--r--languages/cpp/app_templates/kfileplugin/Makefile.am18
-rw-r--r--languages/cpp/app_templates/kfileplugin/README.devel9
-rw-r--r--languages/cpp/app_templates/kfileplugin/kfile_plugin.cpp55
-rw-r--r--languages/cpp/app_templates/kfileplugin/kfile_plugin.desktop39
-rw-r--r--languages/cpp/app_templates/kfileplugin/kfile_plugin.h24
-rw-r--r--languages/cpp/app_templates/kfileplugin/kfileplugin8
-rw-r--r--languages/cpp/app_templates/kfileplugin/kfileplugin.kdevtemplate166
-rw-r--r--languages/cpp/app_templates/kfileplugin/kfileplugin.pngbin0 -> 11953 bytes
-rw-r--r--languages/cpp/app_templates/kfileplugin/plugin.kdevelop114
-rw-r--r--languages/cpp/app_templates/kfileplugin/src-Makefile.am22
-rw-r--r--languages/cpp/app_templates/kfileplugin/subdirs3
12 files changed, 458 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/kfileplugin/.kdev_ignore b/languages/cpp/app_templates/kfileplugin/.kdev_ignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/.kdev_ignore
diff --git a/languages/cpp/app_templates/kfileplugin/Makefile.am b/languages/cpp/app_templates/kfileplugin/Makefile.am
new file mode 100644
index 00000000..9ac8003d
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/Makefile.am
@@ -0,0 +1,18 @@
+dataFiles = README.devel kfile_plugin.cpp kfile_plugin.desktop \
+ kfile_plugin.h plugin.kdevelop kfileplugin kfileplugin.png \
+ src-Makefile.am subdirs
+templateName = kfileplugin
+
+### no need to change below:
+template_DATA = $(templateName).kdevtemplate
+templatedir = ${appwizarddatadir}/templates
+
+appwizarddatadir = ${kde_datadir}/kdevappwizard
+$(templateName).tar.gz: ${dataFiles}
+ $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles}
+ $(GZIP_COMMAND) -f9 $(templateName).tar
+
+archivedir = ${appwizarddatadir}
+archive_DATA = $(templateName).tar.gz ${templateName}.png
+
+CLEANFILES = *.tar.gz \ No newline at end of file
diff --git a/languages/cpp/app_templates/kfileplugin/README.devel b/languages/cpp/app_templates/kfileplugin/README.devel
new file mode 100644
index 00000000..21ee67c7
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/README.devel
@@ -0,0 +1,9 @@
+@todo:
+
+1. add information to src/kfile_%{APPNAMELC}.desktop
+MimeType=
+PreferredGroups=
+PreferredItems=
+
+2. plugin
+Note: Please change to "Optimized" compilation if you want to make a release.
diff --git a/languages/cpp/app_templates/kfileplugin/kfile_plugin.cpp b/languages/cpp/app_templates/kfileplugin/kfile_plugin.cpp
new file mode 100644
index 00000000..3e6b849a
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/kfile_plugin.cpp
@@ -0,0 +1,55 @@
+%{CPP_TEMPLATE}
+
+#include <config.h>
+#include "kfile_%{APPNAMELC}.h"
+
+#include <kgenericfactory.h>
+//#include <kio/global.h>
+
+//#include <qfileinfo.h>
+//#include <qdir.h>
+
+typedef KGenericFactory<%{APPNAME}Plugin> %{APPNAME}Factory;
+
+K_EXPORT_COMPONENT_FACTORY(kfile_%{APPNAME}, %{APPNAME}Factory( "kfile_%{APPNAMELC}" ))
+
+%{APPNAME}Plugin::%{APPNAME}Plugin(QObject *parent, const char *name,
+ const QStringList &args)
+ : KFilePlugin(parent, name, args)
+{
+ //add the mimetype here - example:
+ //KFileMimeTypeInfo* info = addMimeTypeInfo( "text/html" );
+ KFileMimeTypeInfo* info = addMimeTypeInfo( "text/html" );
+
+ // our new group
+ KFileMimeTypeInfo::GroupInfo* group = 0L;
+ group = addGroupInfo(info, "%{APPNAME}Info", i18n("%{APPNAME} Information"));
+
+ KFileMimeTypeInfo::ItemInfo* item;
+
+ // our new items in the group
+ item = addItemInfo(group, "Items", i18n("Items"), QVariant::Int);
+ item = addItemInfo(group, "Size", i18n("Size"), QVariant::Int);
+ setUnit(item, KFileMimeTypeInfo::KiloBytes);
+
+ // strings are possible, too:
+ //addItemInfo(group, "Text", i18n("Document Type"), QVariant::String);
+}
+
+bool %{APPNAME}Plugin::readInfo( KFileMetaInfo& info, uint /*what*/)
+{
+ KFileMetaInfoGroup group = appendGroup(info, "%{APPNAME}Info");
+
+ // add your "calculations" here
+ // if something goes wrong, "return false;"
+
+
+ // and finally display it!
+ appendItem(group, "Items", 100);
+ appendItem(group, "Size", int(5000/1024));
+
+ return true;
+}
+
+#include "kfile_%{APPNAMELC}.moc"
+
diff --git a/languages/cpp/app_templates/kfileplugin/kfile_plugin.desktop b/languages/cpp/app_templates/kfileplugin/kfile_plugin.desktop
new file mode 100644
index 00000000..9af8b5e9
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/kfile_plugin.desktop
@@ -0,0 +1,39 @@
+[Desktop Entry]
+Type=Service
+Name=%{APPNAME} Info
+Name[br]=Titouriñ diwar-benn %{APPNAME}
+Name[ca]=Informació per a %{APPNAME}
+Name[da]=%{APPNAME} info
+Name[el]=Πληροφορίες %{APPNAME}
+Name[es]=Información de %{APPNAME}
+Name[et]=%{APPNAME} info
+Name[eu]=%{APPNAME} informazioa
+Name[fa]=اطلاعات %{APPNAME}
+Name[fr]=Informations sur %{APPNAME}
+Name[ga]=Eolas faoi %{APPNAME}
+Name[gl]=Información de %{APPNAME}
+Name[hu]=%{APPNAME} jellemzői
+Name[it]=Informazioni su %{APPNAME}
+Name[nds]=%{APPNAME}-Info
+Name[ne]=%{APPNAME} सूचना
+Name[pl]=Informacje dla %{APPNAME}
+Name[pt]=Informação do %{APPNAME}
+Name[pt_BR]=Informações de %{APPNAME}
+Name[ru]=Информация о %{APPNAME}
+Name[sk]=%{APPNAME} info
+Name[sl]=Informacije o %{APPNAME}
+Name[sr]=Информације за %{APPNAME}
+Name[sr@Latn]=Informacije za %{APPNAME}
+Name[sv]=%{APPNAME} information
+Name[ta]=%{APPNAME} தகவல்
+Name[tg]=Маълумот дар бораи %{APPNAME}
+Name[zh_CN]=%{APPNAME}的信息
+Name[zh_TW]=%{APPNAME} 資訊
+ServiceTypes=KFilePlugin
+X-KDE-Library=kfile_%{APPNAMELC}
+# change MimeType here! (example: inode/directory)
+MimeType=
+# change PreferredGroups here! (example: FolderInfo)
+PreferredGroups=
+# change PreferredItems here! (example: Items;Size)
+PreferredItems=
diff --git a/languages/cpp/app_templates/kfileplugin/kfile_plugin.h b/languages/cpp/app_templates/kfileplugin/kfile_plugin.h
new file mode 100644
index 00000000..358b4dcb
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/kfile_plugin.h
@@ -0,0 +1,24 @@
+%{H_TEMPLATE}
+
+#ifndef __KFILE_%{APPNAMEUC}_H__
+#define __KFILE_%{APPNAMEUC}_H__
+
+/**
+ * Note: For further information look into <$KDEDIR/include/kfilemetainfo.h>
+ */
+#include <kfilemetainfo.h>
+
+class QStringList;
+
+class %{APPNAME}Plugin: public KFilePlugin
+{
+ Q_OBJECT
+
+public:
+ %{APPNAME}Plugin( QObject *parent, const char *name, const QStringList& args );
+
+ virtual bool readInfo( KFileMetaInfo& info, uint what);
+};
+
+#endif // __KFILE_%{APPNAMEUC}_H__
+
diff --git a/languages/cpp/app_templates/kfileplugin/kfileplugin b/languages/cpp/app_templates/kfileplugin/kfileplugin
new file mode 100644
index 00000000..6717cdc2
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/kfileplugin
@@ -0,0 +1,8 @@
+# KDE Config File
+[General]
+Name=KFile plugin
+Icon=kfileplugin.png
+Category=C++/KDE
+Comment=Generates a KFile plugin for konqueror to display meta information.
+FileTemplates=h,CStyle,cpp,CStyle
+ShowFilesAfterGeneration=README.devel,src/kfile_APPNAMELC.cpp
diff --git a/languages/cpp/app_templates/kfileplugin/kfileplugin.kdevtemplate b/languages/cpp/app_templates/kfileplugin/kfileplugin.kdevtemplate
new file mode 100644
index 00000000..edff2fd4
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/kfileplugin.kdevtemplate
@@ -0,0 +1,166 @@
+# KDE Config File
+[General]
+Name=KFile plugin
+Name[br]=Lugent KFile
+Name[ca]=Connector KFile
+Name[de]=KFile-Modul
+Name[el]=Πρόσθετο KFile
+Name[es]=Complemento para KFile
+Name[et]=KFile'i plugin
+Name[eu]=KFile plugin-a
+Name[fa]=وصلۀ KFile
+Name[fr]=Module externe KFile
+Name[ga]=Breiseán KFile
+Name[gl]=Extensión para KFile
+Name[hu]=KFile-bővítőmodul
+Name[it]=Plugin KFile
+Name[ja]=KFile プラグイン
+Name[nds]=KFile-Moduul
+Name[ne]=केडीई फाइल प्लगइन
+Name[nl]=KFile-plugin
+Name[pl]=Wtyczka do KFile
+Name[pt]='Plugin' do KFile
+Name[pt_BR]='Plugin' do KFile
+Name[ru]=Модуль KFile
+Name[sk]=KFile modul
+Name[sl]=Vstavek za KFile
+Name[sr]=Прикључак за KFile
+Name[sr@Latn]=Priključak za KFile
+Name[sv]=KFile-insticksprogram
+Name[tr]=KFile Eklentisi
+Name[zh_CN]=KFile 插件
+Name[zh_TW]=KFile 外掛程式
+Icon=kfileplugin.png
+Category=C++/KDE
+Comment=Generates a KFile plugin for konqueror to display meta information.
+Comment[ca]=Genera un connector KFile per al konqueror per a mostrar meta informació.
+Comment[da]=Genererer et KFile-plugin for konqueror til at vise meta-information.
+Comment[de]=Erstellt ein KFile-Modul für Konqueror zur Anzeige von Meta-Daten.
+Comment[el]=Δημιουργεί ένα πρόσθετο KFile για την εμφάνιση μεταπληροφοριών στον konqueror.
+Comment[es]=Genera un complemento de KFile para Konqueror que muestra metainformación.
+Comment[et]=Konquerori KFile'i plugina loomine, mis näitab metainfot.
+Comment[eu]=Meta-informazioa bistaratzeko Konqueror-en KFile plugin bat sortzen du.
+Comment[fa]=یک وصلۀ KFile برای konqueror جهت نمایش فرااطلاعات تولید می‌کند.
+Comment[fr]=Génère un module externe KFile pour que Konqueror affiche des méta-informations.
+Comment[gl]=Xera unha extensión para KFile para permitir a konqueror mostrar metainformación.
+Comment[hu]=Létrehoz egy KFile-bővítőmodult, mellyel a Konquerorban dokumentumjellemzőket lehet megjeleníteni.
+Comment[it]=Genera un plugin KFile per Konqueror per mostrare meta informazioni.
+Comment[nds]=Stellt en KFile-Moduul för Konqueror op, dat Metadaten wiest.
+Comment[ne]=मेटा सूचना देखाउन कन्क्वेररका लागि केडीई फाइल प्लगइन उत्पन्न गर्दछ ।
+Comment[nl]=Genereert een KFile-plugin voor konqueror voor het weergeven van meta-informatie.
+Comment[pl]=Generuje wtyczkę KFile dla Konquerora do wyświetlania informacji meta.
+Comment[pt]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações.
+Comment[pt_BR]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações.
+Comment[ru]=Создание модуля KFile для показа метаданных в Konqueror.
+Comment[sk]=Vygeneruje KFile modul pre konqueror na zobrazenie meta informácií.
+Comment[sr]=Прави прикључак за KFile за приказ метаинформација у Konqueror-у.
+Comment[sr@Latn]=Pravi priključak za KFile za prikaz metainformacija u Konqueror-u.
+Comment[sv]=Skapar ett KFile-insticksprogram till Konqueror för att visa metainformation.
+Comment[tr]=Meta bilgisini göstermesi için Konqueror'a bir KFile eklentisi yaratır.
+Comment[zh_CN]=生成一个可显示元信息的 Konqueror KFile 插件。
+Comment[zh_TW]=產生一個 Konqueror 的 KFile 外掛程式,顯示中繼資訊
+FileTemplates=h,CStyle,cpp,CStyle
+ShowFilesAfterGeneration=${dest}/README.devel,%{dest}/src/kfile_%{APPNAMELC}.cpp
+Archive=kfileplugin.tar.gz
+
+[ADMIN]
+Type=include
+File=%{kdevelop}/template-common/admin.kdevtemplate
+
+[GNU]
+Type=include
+File=%{kdevelop}/template-common/gnu.kdevtemplate
+
+[MKDIR_DOCBOOK1]
+Type=mkdir
+Dir=%{dest}/doc
+
+[MKDIR_DOCBOOK2]
+Type=mkdir
+Dir=%{dest}/doc/en
+
+[FILE1]
+Type=install
+Source=%{kdevelop}/template-common/kde-doc-Makefile.am
+Dest=%{dest}/doc/Makefile.am
+
+[FILE2]
+Type=install
+Source=%{kdevelop}/template-common/kde-doc-en-Makefile.am
+Dest=%{dest}/doc/en/Makefile.am
+
+[FILE3]
+Type=install
+EscapeXML=true
+Source=%{kdevelop}/template-common/kde-index.docbook
+Dest=%{dest}/doc/en/index.docbook
+
+[FILE4]
+Type=install
+EscapeXML=true
+Source=%{src}/plugin.kdevelop
+Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+[FILE5]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.cvs
+Dest=%{dest}/Makefile.cvs
+
+[FILE6]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.am
+Dest=%{dest}/Makefile.am
+
+[FILE7]
+Type=install
+Source=%{kdevelop}/template-common/kde-configure.in.in
+Dest=%{dest}/configure.in.in
+
+[MkDir3]
+Type=mkdir
+Dir=%{dest}/src
+
+[FILE8]
+Type=install
+Source=%{kdevelop}/template-common/kde-app.lsm
+Dest=%{dest}/src/%{APPNAMELC}.lsm
+
+[MkDir4]
+Type=mkdir
+Dir=%{dest}/po
+
+[FILE9]
+Type=install
+Source=%{kdevelop}/template-common/kde-po-Makefile.am
+Dest=%{dest}/po/Makefile.am
+
+[FILE10]
+Type=install
+Source=%{src}/subdirs
+Dest=%{dest}/subdirs
+
+[FILE11]
+Type=install
+Source=%{src}/src-Makefile.am
+Dest=%{dest}/src/Makefile.am
+
+[FILE12]
+Type=install
+Source=%{src}/kfile_plugin.desktop
+Dest=%{dest}/src/kfile_%{APPNAMELC}.desktop
+
+[FILE13]
+Type=install
+Source=%{src}/kfile_plugin.cpp
+Dest=%{dest}/src/kfile_%{APPNAMELC}.cpp
+
+[FILE14]
+Type=install
+Source=%{src}/kfile_plugin.h
+Dest=%{dest}/src/kfile_%{APPNAMELC}.h
+
+[FILE15]
+Type=install
+Source=%{src}/README.devel
+Dest=%{dest}/README.devel
+
diff --git a/languages/cpp/app_templates/kfileplugin/kfileplugin.png b/languages/cpp/app_templates/kfileplugin/kfileplugin.png
new file mode 100644
index 00000000..d2a56245
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/kfileplugin.png
Binary files differ
diff --git a/languages/cpp/app_templates/kfileplugin/plugin.kdevelop b/languages/cpp/app_templates/kfileplugin/plugin.kdevelop
new file mode 100644
index 00000000..a95b52f9
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/plugin.kdevelop
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+<kdevelop>
+ <general>
+ <author>%{AUTHOR}</author>
+ <email>%{EMAIL}</email>
+ <version>%{VERSION}</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ </keywords>
+ </general>
+ <kdevcppsupport>
+ <qt>
+ <version>3</version>
+ <used>true</used>
+ <includestyle>3</includestyle>
+ <designerintegration>EmbeddedKDevDesigner</designerintegration>
+ </qt>
+ </kdevcppsupport>
+
+<kdevautoproject>
+ <general>
+ <activetarget>src/kfile_%{APPNAMELC}.la</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <configurations>
+ <optimized>
+ <builddir>optimized</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full</configargs>
+ <builddir>debug</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O0 -g3</cxxflags>
+ </debug>
+ </configurations>
+ </kdevautoproject>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ </groups>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>stl</toc>
+ <toc>sw</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>w3c-svg</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell>libtool</dbgshell>
+ </general>
+ </kdevdebugger>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem>Doxygen Documentation Collection</docsystem>
+ <docurl>%{APPNAMELC}.tag</docurl>
+ </projectdoc>
+ </kdevdocumentation>
+</kdevelop>
diff --git a/languages/cpp/app_templates/kfileplugin/src-Makefile.am b/languages/cpp/app_templates/kfileplugin/src-Makefile.am
new file mode 100644
index 00000000..48ac1c66
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/src-Makefile.am
@@ -0,0 +1,22 @@
+## Makefile.am for folder file meta info plugin
+
+INCLUDES = $(all_includes)
+
+# these are the headers for your project
+noinst_HEADERS = kfile_%{APPNAMELC}.h
+
+kde_module_LTLIBRARIES = kfile_%{APPNAMELC}.la
+
+kfile_%{APPNAMELC}_la_SOURCES = kfile_%{APPNAMELC}.cpp
+kfile_%{APPNAMELC}_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+kfile_%{APPNAMELC}_la_LIBADD = $(LIB_KIO)
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+
+services_DATA = kfile_%{APPNAMELC}.desktop
+servicesdir = $(kde_servicesdir)
+
+messages: rc.cpp
+ $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kfile_%{APPNAMELC}.pot
diff --git a/languages/cpp/app_templates/kfileplugin/subdirs b/languages/cpp/app_templates/kfileplugin/subdirs
new file mode 100644
index 00000000..0e678106
--- /dev/null
+++ b/languages/cpp/app_templates/kfileplugin/subdirs
@@ -0,0 +1,3 @@
+doc
+po
+src