summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/karm
diff options
context:
space:
mode:
Diffstat (limited to 'kontact/plugins/karm')
-rw-r--r--kontact/plugins/karm/Makefile.am16
-rw-r--r--kontact/plugins/karm/karm_plugin.cpp71
-rw-r--r--kontact/plugins/karm/karm_plugin.h57
-rw-r--r--kontact/plugins/karm/karmplugin.desktop59
4 files changed, 203 insertions, 0 deletions
diff --git a/kontact/plugins/karm/Makefile.am b/kontact/plugins/karm/Makefile.am
new file mode 100644
index 000000000..e3fb02276
--- /dev/null
+++ b/kontact/plugins/karm/Makefile.am
@@ -0,0 +1,16 @@
+INCLUDES = -I$(top_srcdir)/kontact/interfaces -I$(top_srcdir)/karm -I$(top_srcdir) $(all_includes)
+
+kde_module_LTLIBRARIES = libkontact_karm.la
+libkontact_karm_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
+libkontact_karm_la_LIBADD = $(top_builddir)/kontact/interfaces/libkpinterfaces.la
+
+libkontact_karm_la_SOURCES = karm_plugin.cpp karmdcopiface.stub
+
+METASOURCES = AUTO
+
+karmdcopiface_DIR = $(top_srcdir)/karm
+
+servicedir = $(kde_servicesdir)/kontact
+service_DATA = karmplugin.desktop
+
+DISTCLEANFILES = karmdcopiface.h karmdcopiface.stub
diff --git a/kontact/plugins/karm/karm_plugin.cpp b/kontact/plugins/karm/karm_plugin.cpp
new file mode 100644
index 000000000..a3a9d277d
--- /dev/null
+++ b/kontact/plugins/karm/karm_plugin.cpp
@@ -0,0 +1,71 @@
+/*
+ This file is part of Kontact.
+
+ Copyright (c) 2004 Tobias Koenig <tokoe@kde.org>
+ adapted for karm 2005 by Thorsten Staerk <kde@staerk.de>
+
+ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+
+#include <kgenericfactory.h>
+#include <kparts/componentfactory.h>
+
+#include "core.h"
+#include "plugin.h"
+
+#include "karm_plugin.h"
+#include "karmdcopiface_stub.h"
+
+typedef KGenericFactory<KarmPlugin, Kontact::Core> KarmPluginFactory;
+K_EXPORT_COMPONENT_FACTORY( libkontact_karm,
+ KarmPluginFactory( "kontact_karm" ) )
+
+KarmPlugin::KarmPlugin( Kontact::Core *core, const char *, const QStringList& )
+ : Kontact::Plugin( core, core, "KArm" )
+{
+ setInstance( KarmPluginFactory::instance() );
+ (void)dcopClient();
+ insertNewAction( new KAction( i18n( "New Task" ), "karm",
+ CTRL+SHIFT+Key_W, this, SLOT( newTask() ), actionCollection(),
+ "new_task" ) );
+}
+
+KarmPlugin::~KarmPlugin()
+{
+}
+
+KParts::ReadOnlyPart* KarmPlugin::createPart()
+{
+ KParts::ReadOnlyPart * part = loadPart();
+ if ( !part ) return 0;
+
+ // this calls a DCOP interface from karm via the lib KarmDCOPIface_stub that is generated automatically
+ mStub = new KarmDCOPIface_stub( dcopClient(), "KArm",
+ "KarmDCOPIface" );
+
+ return part;
+}
+
+void KarmPlugin::newTask()
+{
+ kdDebug() << "Entering newTask" << endl;
+ mStub->addTask("New Task");
+}
+
+#include "karm_plugin.moc"
diff --git a/kontact/plugins/karm/karm_plugin.h b/kontact/plugins/karm/karm_plugin.h
new file mode 100644
index 000000000..c5ef3e289
--- /dev/null
+++ b/kontact/plugins/karm/karm_plugin.h
@@ -0,0 +1,57 @@
+/*
+ This file is part of Kontact.
+
+ Copyright (c) 2004 Tobias Koenig <tokoe@kde.org>
+ adapted for karm 2005 by Thorsten Staerk <kde@staerk.de>
+
+ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ As a special exception, permission is given to link this program
+ with any edition of Qt, and distribute the resulting executable,
+ without including the source code for Qt in the source distribution.
+*/
+
+#ifndef KARM_PLUGIN_H
+#define KARM_PLUGIN_H
+
+#include <klocale.h>
+#include <kparts/part.h>
+#include "karmdcopiface_stub.h"
+
+#include "plugin.h"
+
+class KAboutData;
+
+class KarmPlugin : public Kontact::Plugin
+{
+ Q_OBJECT
+
+ public:
+ KarmPlugin( Kontact::Core *core, const char *name,
+ const QStringList & );
+ ~KarmPlugin();
+
+ int weight() const { return 700; }
+
+ protected:
+ KParts::ReadOnlyPart *createPart();
+ KarmDCOPIface_stub *mStub;
+
+ public slots:
+ void newTask();
+
+};
+
+#endif
diff --git a/kontact/plugins/karm/karmplugin.desktop b/kontact/plugins/karm/karmplugin.desktop
new file mode 100644
index 000000000..469989fe6
--- /dev/null
+++ b/kontact/plugins/karm/karmplugin.desktop
@@ -0,0 +1,59 @@
+[Desktop Entry]
+Type=Service
+Icon=karm
+ServiceTypes=Kontact/Plugin,KPluginInfo
+
+X-KDE-Library=libkontact_karm
+X-KDE-KontactPluginVersion=6
+X-KDE-KontactPartLibraryName=libkarmpart
+
+X-KDE-PluginInfo-Name=kontact_karm
+X-KDE-PluginInfo-Version=0.1
+X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-EnabledByDefault=false
+
+Comment=Time Tracker Component (KArm Plugin)
+Comment[bg]=Приставка за KArm
+Comment[ca]=Component de seguiment dels temps (endollable del KArm)
+Comment[da]=Time Tracker-komponent (KArm-plugin)
+Comment[de]=Zeitplaner-Komponente (KArm-Modul)
+Comment[el]=Συστατικό γραμμής χρόνου (Πρόσθετο του KArm)
+Comment[es]=Componente de seguimiento de tiempos (complemento de KArm)
+Comment[et]=Ajaarvestaja plugin (KArm)
+Comment[fr]=Composant de suivi temporel (Module pour KArm)
+Comment[is]=Tímastjórnunareining (KArm íforrit)
+Comment[it]=Componente segna-tempo (plugin Karm)
+Comment[ja]=タイムトラッカーコンポーネント (KArm プラグイン)
+Comment[km]=សមាសភាគ​កម្មវិធី​តាមដាន​ពេលវេលា (កម្មវិធី​ជំនួយ KArm​)
+Comment[nds]=Tietlogbook-Komponent (KArm-Moduul)
+Comment[nl]=Tijdsregistratiecomponent (KArm-plugin)
+Comment[pl]=Składnik śledzenia czasu (wtyczka KArm)
+Comment[ru]=Отслеживание времени (модуль KArm)
+Comment[sr]=Компонента праћења времена (прикључак KArm-а)
+Comment[sr@Latn]=Komponenta praćenja vremena (priključak KArm-a)
+Comment[sv]=Komponent för tidmätning (Karm-insticksprogram)
+Comment[tr]=Zaman İzleyici Bileşeni (KArm Eklentisi)
+Comment[zh_CN]=时间追踪组件(KArm 插件)
+Comment[zh_TW]=時間追蹤器組件(KArm 外掛程式)
+
+Name=Timer
+Name[bg]=Таймер
+Name[ca]=Cronòmetre
+Name[de]=Stoppuhr
+Name[el]=Χρονόμετρο
+Name[es]=Temporizador
+Name[et]=Ajaarvestaja
+Name[fr]=Minuteur
+Name[is]=Tímamælir
+Name[ja]=タイマー
+Name[km]=កម្មវិធី​កំណត់​ពេលវេលា
+Name[nds]=Tietgever
+Name[nl]=Tijdklok
+Name[pl]=Stoper
+Name[ru]=Таймер
+Name[sk]=Časovač
+Name[sr]=Тајмер
+Name[sr@Latn]=Tajmer
+Name[sv]=Tidmätning
+Name[zh_CN]=计时器
+Name[zh_TW]=計時器