Action requires login

General information about Plugin development:

Any kind of plugins have to derived from Choqok::Plugin class.

To create a plugin, you need to create a .desktop file which looks like that:

[Desktop Entry]
Encoding=UTF-8
Type=Service
X-Choqok-Version=1
Icon=icon
ServiceTypes=Choqok/Plugin
X-KDE-Library=choqok_myplugin
X-KDE-PluginInfo-Author=Your Name
X-KDE-PluginInfo-Email=your@mail.com
X-KDE-PluginInfo-Name=choqok_myplugin
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=http://yoursite.com
X-KDE-PluginInfo-Category=Plugins
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
Name=MyPlugin
Comment=Plugin that do some nice stuff

The constructor of your plugin should looks like this:

K_PLUGIN_FACTORY( MyPluginFactory, registerPlugin < MyPlugin > (); )
K_EXPORT_PLUGIN( MyPluginFactory( "choqok_myplugin" ) )

MyPlugin::MyPlugin( QObject *parent, const char *name, const QList<QVariant> & args )
: Choqok::Plugin( MyPluginFactory::componentData(), parent, name )
{
//...
}

Choqok::Plugin inherits from KXMLGUIClient. That client is added to the Choqok’s mainwindow KXMLGUIFactory. So you may add actions on the main window.
Please note that the client is added right after the plugin is created, so you have to create every actions in the constructor.