make webinterface translatable. there are around 20 short strings, all with context...
[kdenetwork.git] / kopete / libkopete / kopeteplugin.cpp
blob10aa83abc98d0738810896a2768399ba733ddbd7
1 /*
2 kopeteplugin.cpp - Kopete Plugin API
4 Copyright (c) 2001-2002 by Duncan Mac-Vicar P. <duncan@kde.org>
5 Copyright (c) 2002-2004 by Olivier Goffart <ogoffart @tiscalinet.be>
7 Copyright (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
9 *************************************************************************
10 * *
11 * This library is free software; you can redistribute it and/or *
12 * modify it under the terms of the GNU Lesser General Public *
13 * License as published by the Free Software Foundation; either *
14 * version 2 of the License, or (at your option) any later version. *
15 * *
16 *************************************************************************
19 #include "kopeteplugin.h"
20 #include "kopetepluginmanager.h"
22 #include <kplugininfo.h>
23 #include <ksettings/dispatcher.h>
25 namespace Kopete {
27 class Plugin::Private
29 public:
30 QStringList addressBookFields;
31 QString indexField;
34 Plugin::Plugin( const KComponentData &instance, QObject *parent )
35 : QObject( parent ), KXMLGUIClient(), d(new Private)
37 setComponentData( instance );
38 KSettings::Dispatcher::registerComponent( instance, this, SIGNAL( settingsChanged() ) );
41 Plugin::~Plugin()
43 delete d;
46 QString Plugin::pluginId() const
48 return QString::fromLatin1( metaObject()->className() );
52 QString Plugin::displayName() const
54 return pluginInfo().isValid() ? pluginInfo().name() : QString();
57 QString Plugin::pluginIcon() const
59 return pluginInfo().isValid() ? pluginInfo().icon() : QString();
63 KPluginInfo Plugin::pluginInfo() const
65 return PluginManager::self()->pluginInfo( this );
68 void Plugin::aboutToUnload()
70 // Just make the unload synchronous by default
71 emit readyForUnload();
75 void Plugin::deserialize( MetaContact * /* metaContact */,
76 const QMap<QString, QString> & /* stream */ )
78 // Do nothing in default implementation
83 void Kopete::Plugin::addAddressBookField( const QString &field, AddressBookFieldAddMode mode )
85 d->addressBookFields.append( field );
86 if( mode == MakeIndexField )
87 d->indexField = field;
90 QStringList Kopete::Plugin::addressBookFields() const
92 return d->addressBookFields;
95 QString Kopete::Plugin::addressBookIndexField() const
97 return d->indexField;
100 } //END namespace Kopete
102 #include "kopeteplugin.moc"