Kross
plugin.h
Go to the documentation of this file.
00001 /* This file is part of the KDE project 00002 Copyright (C) 2008 Paulo Moura Guedes <moura@kdewebdev.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 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/* = QString()*/, ChildrenInterface::Options options/* = ChildrenInterface::NoOption*/); 00097 00099 void addObject(QObject* object, const QString& name = QString()); //BIC 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
KDE 4.6 API Reference