kparts Module Reference

KParts.OpenURLEvent

KParts.OpenURLEvent is fully implemented.

KParts.BrowserExtension

KParts.BrowserExtension is fully implemented. *** EXCEPT

static ActionSlotMap* actionSlotMapPtr (int*);

NOT implemented

static ActionSlotMap* actionSlotMap ();

RETURNS a Python dictionary - see ActionSlotMap entry

KParts.BrowserHostExtension

KParts.BrowserHostExtension is fully implemented.

KParts.URLArgs

KParts.URLArgs is fully implemented.

KParts.WindowArgs

KParts.WindowArgs is fully implemented.

BrowserInterface (KDE2.2.0+)

BrowserInterface is fully implemented.

BrowserRun (KDE3.0+)

BrowserRun is fully implemented.

enum NonEmbeddableResult {Handled, NotHandled, Delayed};
NonEmbeddableResult  handleNonEmbeddable (const QString&);

NOT implemented (protected enum)

KParts.DockMainWindow

KParts.DockMainWindow is fully implemented.

KParts.Event

KParts.Event is fully implemented.

KParts.GUIActivateEvent

KParts.GUIActivateEvent is fully implemented.

KParts.PartActivateEvent

KParts.PartActivateEvent is fully implemented.

KParts.PartSelectEvent

KParts.PartSelectEvent is fully implemented.

KParts.Factory

KParts.Factory is fully implemented.

HistoryProvider

HistoryProvider is fully implemented.

MainWindow

MainWindow is fully implemented.

KParts.PartBase

KParts.PartBase is fully implemented.

KParts.Part

KParts.Part is fully implemented.

KParts.ReadOnlyPart

KParts.ReadOnlyPart is fully implemented. *** EXCEPT

This class is ABSTRACT; all pure virtual methods must be overloaded, HOWEVER, you can use createReadOnlyPart/createReadWritePart without creating an concrete instance of this class. See pyParts.py example.

virtual bool openFile () = 0;

PURE VIRTUAL method

KParts::ReadOnlyPart *createReadOnlyPart (const QString&, QObject* = 0,
                                          const QString& = QString::null,
                                          const char* = "KParts::ReadOnlyPart",
                                          const QStringList& = QStringList());

This is a PyKDE-only function that handles the machinery necessary to create a KParts::ReadOnlyPart. It executes the following C++ code:

KParts::ReadOnlyPart *createReadOnlyPart (const QString& lib, QObject *parent,
                                          const QString& name, const char *className,
                                          const QStringList &args)
{
    KLibFactory *factory = KLibLoader::self ()->factory ((const char *)lib);

    if (factory)
            return static_cast<KParts::ReadOnlyPart*> (factory->create (parent,
                                               (const char *)name, className, args));
        else
                return NULL;

Notice that it takes care of creating the KLibFactory for you, and returns the part cast to type KParts::ReadOnlyPart. The actual part has a different class (derived from KParts::ReadOnlyPart), and calls to openURL or openFile will use the part's overloaded methods. Currently it isn't possible to call KParts::ReadOnlyPart::openURL if it has been overloaded.

See pyParts.py (in the example subdirectory) for a usage example

KParts.ReadWritePart

KParts.ReadWritePart is fully implemented. *** EXCEPT

This class is ABSTRACT; all pure virtual methods must be overloaded, HOWEVER, you can use createReadOnlyPart/createReadWritePart without creating an concrete instance of this class. See pyParts.py example.

virtual bool saveFile () = 0;

PURE VIRTUAL method

KParts::ReadWritePart *createReadWritePart (const QString&, QObject* = 0,
                                            const QString& = QString::null,
                                            const char* = "KParts::ReadWritePart",
                                            const QStringList& = QStringList());

This is a PyKDE-only function that handles the machinery necessary to create a KParts::ReadWritePart. It executes the following C++ code:

KParts::ReadWritePart *createReadWritePart (const QString& lib, QObject *parent,
                                          const QString& name, const char *className,
                                          const QStringList &args)
{
    KLibFactory *factory = KLibLoader::self ()->factory ((const char *)lib);

    if (factory)
            return static_cast<KParts::ReadWritePart*> (factory->create (parent,
                                               (const char *)name, className, args));
        else
                return NULL;

Notice that it takes care of creating the KLibFactory for you, and returns the part cast to type KParts::ReadWritePart. The actual part has a different class (derived from KParts::ReadWritePart), and calls to openURL or openFile will use the part's overloaded methods. Currently it isn't possible to call KParts::ReadWritePart::openURL if it has been overloaded.

See pyParts.py (in the example subdirectory) for a usage example

KParts.PartManager

KParts.PartManager is fully implemented.

KParts.Plugin

KParts.Plugin is fully implemented. *** EXCEPT

static void loadPlugins (QObject*, const PluginInfoList&);

TAKES a QObject and a Python list of tuples

static void loadPlugins (QObject*, const PluginInfoList&, const KInstance*);

TAKES a QObject, a Python list of tuples and a KInstance

static PluginList pluginObjects (QObject* parent);

TAKES a QObject and RETURNS a Python list

static KParts::Plugin* loadPlugin (QObject* parent, const char* libname);

NOT Implemented

static QValueList<Plugin::PluginInfo> pluginInfos (const KInstance*);

NOT Implemented

ActionSlotMap - mapped type

Mapped type - cannot be instantiated. Whenever a ActionSlotMap is the return type of a function or the type of an argument, a Python dictionary with key: QCString, value: QCString is used instead.

ROPList - mapped type

Mapped type - cannot be instantiated. Whenever an ROPList is the return type of a function or the type of an argument, a Python list of KParts::ReadOnlyPart is used instead.

PartList

Mapped type - cannot be instantiated. Whenever a PartList is the return type of a function or the type of an argument, a Python list of KParts.Part is used instead.

PluginList

Mapped type - cannot be instantiated. Whenever a PluginList is the return type of a function or the type of an argument, a Python list of KParts.Plugin is used instead.

PluginInfoList

Mapped type - cannot be instantiated. Whenever a PluginInfoList is the passed as an argument, a Python list of Python tuples of (QString, QString, QDom_Document) is passed instead