Kross
plugin.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KROSS_PLUGIN_H
00021 #define KROSS_PLUGIN_H
00022
00023 #include <kparts/plugin.h>
00024
00025 #include <kross/core/krossconfig.h>
00026 #include <kross/core/childreninterface.h>
00027
00028 namespace Kross {
00029 class ActionCollection;
00030 }
00031
00032 class QWidget;
00033
00034 namespace Kross
00035 {
00036
00060 class KROSSUI_EXPORT ScriptingPlugin : public KParts::Plugin
00061 {
00062 Q_OBJECT
00063 public:
00064
00070 explicit ScriptingPlugin(QObject* parent = 0);
00071
00078 ScriptingPlugin(const QString& collectionName, const QString& userActionsFile, const QString& referenceActionsDir=QString(), QObject* parent=0);
00079
00083 virtual ~ScriptingPlugin();
00084
00088 virtual void setDOMDocument (const QDomDocument &document, bool merge = false);
00089
00096 void addObject(QObject* object, const QString& name, ChildrenInterface::Options options);
00097
00099 void addObject(QObject* object, const QString& name = QString());
00100
00101 protected Q_SLOTS:
00102
00107 virtual void slotEditScriptActions();
00108
00112 virtual void slotResetScriptActions();
00113
00114 private:
00115 QDomDocument buildDomDocument(const QDomDocument& document);
00116 void buildDomDocument(QDomDocument& document, Kross::ActionCollection* collection);
00117 void save();
00118
00119 private:
00120 class ScriptingPluginPrivate;
00121 ScriptingPluginPrivate* const d;
00122 };
00123
00124 }
00125
00126 #endif