Commit ee5ead41 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Port sheets plugins to general KXMLGUIClient plugins

parent 3619f993
......@@ -72,8 +72,7 @@ public:
};
KoScriptingPart::KoScriptingPart(KoScriptingModule *const module, const QStringList&)
: KParts::Plugin(module)
, d(new Private())
: d(new Private())
{
d->module = module;
Q_ASSERT(d->module);
......
......@@ -25,7 +25,7 @@
#include <QObject>
#include <QStringList>
#include <kparts/plugin.h>
#include <kxmlguiclient.h>
class KDialog;
class KoScriptingModule;
......@@ -40,7 +40,7 @@ namespace Kross {
* functionality to integrate scripting using Kross into a Calligra
* application.
*/
class KOKROSS_EXPORT KoScriptingPart : public KParts::Plugin
class KOKROSS_EXPORT KoScriptingPart : public QObject, public KXMLGUIClient
{
Q_OBJECT
public:
......
......@@ -17,5 +17,7 @@ kde4_add_plugin(sheetspivottables ${pivottables_SRCS})
target_link_libraries(sheetspivottables calligrasheetscommon)
install(TARGETS sheetspivottables DESTINATION ${PLUGIN_INSTALL_DIR})
install( FILES pivottables.rc DESTINATION ${DATA_INSTALL_DIR}/sheets/kpartplugins)
install( FILES pivottables.rc DESTINATION ${DATA_INSTALL_DIR}/sheets/viewplugins)
install( FILES sheetspivottables.desktop DESTINATION ${SERVICES_INSTALL_DIR})
......@@ -26,6 +26,8 @@
#include <kurl.h>
#include <kpluginfactory.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kaction.h>
#include <sheets/part/Canvas.h>
#include <sheets/part/View.h>
......@@ -39,10 +41,9 @@ K_PLUGIN_FACTORY(PivotPluginFactory, registerPlugin<PivotPlugin>();)
K_EXPORT_PLUGIN(PivotPluginFactory("sheetspivottables_plugin"))
PivotPlugin::PivotPlugin(QObject *parent, const QVariantList &)
: KParts::Plugin(parent)
{
setComponentData(PivotPluginFactory::componentData());
setXMLFile(KStandardDirs::locate("data", "sheets/viewplugins/pivottables.rc"), true);
KAction *action = new KAction(i18n("&Pivot..."), this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_P));
actionCollection()->addAction("pivot", action );
......
......@@ -19,9 +19,11 @@
#ifndef PIVOTPLUGIN_H
#define PIVOTPLUGIN_H
#include <kparts/plugin.h>
#include <kxmlguiclient.h>
#include <QObject>
#include <QVariantList>
class PivotPlugin : public KParts::Plugin
class PivotPlugin : public QObject, public KXMLGUIClient
{
Q_OBJECT
public:
......
[Desktop Entry]
Name=Sheets Pivot Plugin
X-KDE-ServiceTypes=Sheets/ViewPlugin
Type=Service
X-KDE-Library=sheetssolver
X-Sheets-Version=28
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment