You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
602 lines
15 KiB
602 lines
15 KiB
14 years ago
|
//
|
||
|
// Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
|
||
|
// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
|
||
|
// may also apply
|
||
|
|
||
|
|
||
|
// Generated by preSip
|
||
12 years ago
|
// module tdeparts version KDE 3.5.3
|
||
14 years ago
|
|
||
|
|
||
|
// This software is free software; you can redistribute it and/or
|
||
|
// modify it under the terms of the GNU General Public License as
|
||
|
// published by the Free Software Foundation; either version 2 of
|
||
|
// the License, or (at your option) any later version.
|
||
|
//
|
||
|
// This software is distributed in the hope that it will be useful,
|
||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
// GNU General Public License for more details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public
|
||
|
// License along with this library; see the file COPYING.
|
||
|
// If not, write to the Free Software Foundation, Inc.,
|
||
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
|
||
|
namespace KParts
|
||
|
{
|
||
|
|
||
|
class URLArgs
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <browserextension.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
URLArgs ();
|
||
|
URLArgs (const KParts::URLArgs&);
|
||
13 years ago
|
URLArgs (bool, int, int, const TQString& = TQString ::null );
|
||
|
TQStringList docState;
|
||
14 years ago
|
bool reload;
|
||
|
int xOffset;
|
||
|
int yOffset;
|
||
13 years ago
|
TQString serviceType;
|
||
|
TQByteArray postData;
|
||
|
void setContentType (const TQString&);
|
||
|
TQString contentType () const;
|
||
14 years ago
|
void setDoPost (bool);
|
||
|
bool doPost () const;
|
||
|
void setLockHistory (bool);
|
||
|
bool lockHistory () const;
|
||
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
|
void setNewTab (bool);
|
||
|
bool newTab () const;
|
||
|
%End
|
||
|
|
||
13 years ago
|
TQMap<TQString,TQString>& metaData ();
|
||
|
TQString frameName;
|
||
14 years ago
|
bool trustedSource;
|
||
|
|
||
|
%If ( KDE_3_1_3 - )
|
||
|
bool redirectedRequest () const;
|
||
|
void setRedirectedRequest (bool);
|
||
|
|
||
|
%If ( KDE_3_4_0 - )
|
||
|
void setForcesNewWindow (bool);
|
||
|
bool forcesNewWindow () const;
|
||
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
|
//ig URLArgsPrivate* d;
|
||
|
|
||
|
}; // class URLArgs
|
||
|
|
||
|
|
||
|
class WindowArgs
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <browserextension.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
WindowArgs ();
|
||
|
WindowArgs (const KParts::WindowArgs&);
|
||
13 years ago
|
WindowArgs (const TQRect&, bool, bool, bool, bool, bool);
|
||
14 years ago
|
WindowArgs (int, int, int, int, bool, bool, bool, bool, bool);
|
||
|
int x;
|
||
|
int y;
|
||
|
int width;
|
||
|
int height;
|
||
|
bool fullscreen;
|
||
|
bool menuBarVisible;
|
||
|
bool toolBarsVisible;
|
||
|
bool statusBarVisible;
|
||
|
bool resizable;
|
||
|
bool lowerWindow;
|
||
|
|
||
|
%If ( KDE_3_5_0 - )
|
||
|
bool scrollBarsVisible;
|
||
|
%End
|
||
|
|
||
|
//ig WindowArgsPrivate* d;
|
||
|
|
||
|
}; // class WindowArgs
|
||
|
|
||
|
|
||
|
class OpenURLEvent : KParts::Event
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <browserextension.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
OpenURLEvent (KParts::ReadOnlyPart*, const KURL&, const KParts::URLArgs& = KParts ::URLArgs ());
|
||
|
KParts::ReadOnlyPart* part () const;
|
||
|
KURL url () const;
|
||
|
KParts::URLArgs args () const;
|
||
13 years ago
|
static bool test (const TQEvent*);
|
||
14 years ago
|
|
||
|
}; // class OpenURLEvent
|
||
|
|
||
|
|
||
13 years ago
|
class BrowserExtension : TQObject
|
||
14 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <browserextension.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
BrowserExtension (KParts::ReadOnlyPart* /TransferThis/, const char* = 0);
|
||
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
|
typedef uint PopupFlags;
|
||
|
|
||
|
%If ( KDE_3_4_0 - )
|
||
|
|
||
|
enum
|
||
|
{
|
||
|
DefaultPopupItems,
|
||
|
ShowNavigationItems,
|
||
|
ShowUp,
|
||
|
ShowReload,
|
||
|
ShowBookmark,
|
||
|
ShowCreateDirectory,
|
||
|
ShowTextSelectionItems,
|
||
|
NoDeletion
|
||
|
};
|
||
|
|
||
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
|
virtual void setURLArgs (const KParts::URLArgs&);
|
||
|
KParts::URLArgs urlArgs () const;
|
||
|
virtual int xOffset ();
|
||
|
virtual int yOffset ();
|
||
13 years ago
|
virtual void saveState (TQDataStream&);
|
||
|
virtual void restoreState (TQDataStream&);
|
||
14 years ago
|
bool isURLDropHandlingEnabled () const;
|
||
|
void setURLDropHandlingEnabled (bool);
|
||
|
void setBrowserInterface (KParts::BrowserInterface*);
|
||
|
KParts::BrowserInterface* browserInterface () const;
|
||
|
bool isActionEnabled (const char*) const;
|
||
|
|
||
|
%If ( KDE_3_5_0 - )
|
||
13 years ago
|
TQString actionText (const char*) const;
|
||
14 years ago
|
%End
|
||
|
|
||
13 years ago
|
typedef TQMap<TQCString,TQCString> ActionSlotMap;
|
||
14 years ago
|
static KParts::BrowserExtension::ActionSlotMap actionSlotMap ();
|
||
|
static KParts::BrowserExtension::ActionSlotMap* actionSlotMapPtr ();
|
||
13 years ago
|
static KParts::BrowserExtension* childObject (TQObject*);
|
||
14 years ago
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
|
void pasteRequest ();
|
||
|
%End
|
||
|
|
||
|
|
||
|
signals:
|
||
|
void enableAction (const char*, bool);
|
||
|
|
||
|
%If ( KDE_3_5_0 - )
|
||
13 years ago
|
void setActionText (const char*, const TQString&);
|
||
14 years ago
|
%End
|
||
|
|
||
|
void openURLRequest (const KURL&, const KParts::URLArgs& = KParts ::URLArgs ());
|
||
|
void openURLRequestDelayed (const KURL&, const KParts::URLArgs& = KParts ::URLArgs ());
|
||
|
void openURLNotify ();
|
||
13 years ago
|
void setLocationBarURL (const TQString&);
|
||
14 years ago
|
void setIconURL (const KURL&);
|
||
|
void createNewWindow (const KURL&, const KParts::URLArgs& = KParts ::URLArgs ());
|
||
|
//ig void createNewWindow (const KURL&, const KParts::URLArgs&, const KParts::WindowArgs&, KParts::ReadOnlyPart*&);
|
||
|
void loadingProgress (int);
|
||
|
void speedProgress (int);
|
||
13 years ago
|
void infoMessage (const TQString&);
|
||
|
void popupMenu (const TQPoint&, const KFileItemList&);
|
||
|
void popupMenu (KXMLGUIClient*, const TQPoint&, const KFileItemList&);
|
||
14 years ago
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
13 years ago
|
void popupMenu (KXMLGUIClient*, const TQPoint&, const KFileItemList&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags);
|
||
14 years ago
|
%End
|
||
|
|
||
13 years ago
|
void popupMenu (const TQPoint&, const KURL&, const TQString&, mode_t = -1);
|
||
|
void popupMenu (KXMLGUIClient*, const TQPoint&, const KURL&, const TQString&, mode_t = -1);
|
||
14 years ago
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
13 years ago
|
void popupMenu (KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t = -1);
|
||
14 years ago
|
%End
|
||
|
|
||
|
void selectionInfo (const KFileItemList&);
|
||
13 years ago
|
void selectionInfo (const TQString&);
|
||
14 years ago
|
void selectionInfo (const KURL::List&);
|
||
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
|
void mouseOverInfo (const KFileItem*);
|
||
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
13 years ago
|
void addWebSideBar (const KURL&, const TQString&);
|
||
14 years ago
|
void moveTopLevelWidget (int, int);
|
||
|
void resizeTopLevelWidget (int, int);
|
||
|
|
||
|
%If ( KDE_3_3_1 - )
|
||
|
void requestFocus (KParts::ReadOnlyPart*);
|
||
|
|
||
|
%If ( KDE_3_4_0 - )
|
||
|
void setPageSecurity (int);
|
||
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
13 years ago
|
typedef TQMap<TQCString,int> ActionNumberMap;
|
||
14 years ago
|
|
||
|
protected:
|
||
|
//igx virtual void virtual_hook (int, void*);
|
||
|
|
||
|
public:
|
||
|
|
||
|
%If ( KDE_3_3_0 - KDE_3_4_0 )
|
||
|
|
||
|
enum
|
||
|
{
|
||
|
DefaultPopupItems,
|
||
|
ShowNavigationItems,
|
||
|
ShowUp,
|
||
|
ShowReload,
|
||
|
ShowBookmark,
|
||
|
ShowCreateDirectory,
|
||
|
ShowTextSelectionItems
|
||
|
};
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
|
||
|
%If ( KDE_3_2_0 - KDE_3_3_0 )
|
||
|
|
||
|
enum
|
||
|
{
|
||
|
DefaultPopupItems,
|
||
|
ShowNavigationItems,
|
||
|
ShowUp,
|
||
|
ShowReload,
|
||
|
ShowBookmark,
|
||
|
ShowCreateDirectory
|
||
|
};
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
|
}; // class BrowserExtension
|
||
|
|
||
|
|
||
13 years ago
|
class BrowserHostExtension : TQObject
|
||
14 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <browserextension.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
BrowserHostExtension (KParts::ReadOnlyPart* /TransferThis/, const char* = 0);
|
||
13 years ago
|
virtual TQStringList frameNames () const;
|
||
|
virtual const TQPtrList<KParts::ReadOnlyPart> frames () const;
|
||
14 years ago
|
|
||
|
%If ( KDE_3_3_0 - )
|
||
13 years ago
|
KParts::BrowserHostExtension* findFrameParent (KParts::ReadOnlyPart*, const TQString&);
|
||
14 years ago
|
%End
|
||
|
|
||
|
virtual bool openURLInFrame (const KURL&, const KParts::URLArgs&);
|
||
13 years ago
|
static KParts::BrowserHostExtension* childObject (TQObject*);
|
||
14 years ago
|
|
||
|
protected:
|
||
|
//igx virtual void virtual_hook (int, void*);
|
||
|
|
||
|
}; // class BrowserHostExtension
|
||
|
|
||
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
|
|
||
13 years ago
|
class LiveConnectExtension : TQObject
|
||
14 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <browserextension.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
|
||
|
enum Type
|
||
|
{
|
||
|
TypeVoid,
|
||
|
TypeBool,
|
||
|
TypeFunction,
|
||
|
TypeNumber,
|
||
|
TypeObject,
|
||
|
TypeString
|
||
|
};
|
||
|
|
||
13 years ago
|
//ig typedef TQValueList<TQPair<Type,TQString>> ArgList;
|
||
14 years ago
|
LiveConnectExtension (KParts::ReadOnlyPart* /TransferThis/, const char* = 0);
|
||
13 years ago
|
virtual bool get (const ulong, const TQString&, KParts::LiveConnectExtension::Type&, ulong&, TQString&);
|
||
|
virtual bool put (const ulong, const TQString&, const TQString&);
|
||
|
virtual bool call (const ulong, const TQString&, const TQStringList&, KParts::LiveConnectExtension::Type&, ulong&, TQString&);
|
||
14 years ago
|
virtual void unregister (const ulong);
|
||
13 years ago
|
static KParts::LiveConnectExtension* childObject (TQObject*);
|
||
14 years ago
|
|
||
|
signals:
|
||
13 years ago
|
//ig virtual void partEvent (const ulong, const TQString&, const KParts::LiveConnectExtension::ArgList&);
|
||
14 years ago
|
|
||
|
}; // class LiveConnectExtension
|
||
|
|
||
|
%End
|
||
|
|
||
|
}; // namespace KParts
|
||
|
|
||
|
|
||
|
%If ( - KDE_3_5_3 )
|
||
13 years ago
|
//ig typedef TQPtrList<KFileItem> KFileItemList;
|
||
14 years ago
|
%End
|
||
|
|
||
|
//force
|
||
13 years ago
|
TQMap<TQCString,int> testTQMapTQCStringInt (TQMap<TQCString,int>);
|
||
14 years ago
|
%MethodCode
|
||
13 years ago
|
//takes dict | (TQMap<TQCString,int>)
|
||
|
//returns (TQMap<TQCString,int>)
|
||
14 years ago
|
|
||
|
sipRes = a0;
|
||
|
%End
|
||
|
|
||
|
//end
|
||
|
|
||
|
|
||
13 years ago
|
%MappedType TQMap<TQCString,TQCString>
|
||
|
//converts a Python dict of TQCString:TQCString
|
||
14 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqmap.h>
|
||
14 years ago
|
%End
|
||
|
|
||
|
%ConvertFromTypeCode
|
||
|
// Convert to a Python dict
|
||
|
|
||
|
if (!sipCpp)
|
||
|
return PyDict_New();
|
||
|
|
||
|
PyObject *dict;
|
||
|
|
||
|
// Create the dictionary.
|
||
|
|
||
|
if ((dict = PyDict_New()) == NULL)
|
||
|
return NULL;
|
||
|
|
||
|
// Get it.
|
||
|
|
||
13 years ago
|
const TQMap<TQCString,TQCString> cppmap = *sipCpp;
|
||
|
TQMap<TQCString,TQCString>::ConstIterator it;
|
||
14 years ago
|
|
||
|
for (it = cppmap.begin (); it != cppmap.end (); ++it)
|
||
|
{
|
||
13 years ago
|
TQCString acpp = it.key ();
|
||
|
TQCString bcpp = it.data ();
|
||
14 years ago
|
PyObject *ainst;
|
||
|
PyObject *binst = NULL;
|
||
13 years ago
|
if (((ainst = sipConvertFromNewType(new TQCString (acpp), sipType_TQCString, NULL)) == NULL)
|
||
|
|| ((binst = sipConvertFromNewType(new TQCString (bcpp), sipType_TQCString, NULL)) == NULL)
|
||
14 years ago
|
|| (PyDict_SetItem (dict, ainst, binst) < 0))
|
||
|
{
|
||
|
Py_XDECREF (ainst);
|
||
|
Py_XDECREF (binst);
|
||
|
Py_DECREF (dict);
|
||
|
return NULL;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return dict;
|
||
|
%End
|
||
|
|
||
|
|
||
|
%ConvertToTypeCode
|
||
13 years ago
|
// Convert a Python dictionary to a TQMap on the heap.
|
||
14 years ago
|
|
||
|
if (sipIsErr == NULL)
|
||
|
return PyDict_Check(sipPy);
|
||
|
|
||
13 years ago
|
TQMap<TQCString,TQCString> *cppmap = new TQMap<TQCString,TQCString>;
|
||
14 years ago
|
|
||
|
PyObject *aelem, *belem;
|
||
|
SIP_SSIZE_T pos = 0;
|
||
13 years ago
|
TQCString *acpp;
|
||
|
TQCString *bcpp;
|
||
14 years ago
|
|
||
|
while (PyDict_Next(sipPy, &pos, &aelem, &belem))
|
||
|
{
|
||
|
int iserr = 0;
|
||
|
|
||
13 years ago
|
acpp = (TQCString *)sipForceConvertToType(aelem, sipType_TQCString, sipTransferObj, SIP_NOT_NONE|SIP_NO_CONVERTORS, NULL, &iserr);
|
||
|
bcpp = (TQCString *)sipForceConvertToType(belem, sipType_TQCString, sipTransferObj, SIP_NOT_NONE|SIP_NO_CONVERTORS, NULL, &iserr);
|
||
14 years ago
|
|
||
|
if (iserr)
|
||
|
{
|
||
|
*sipIsErr = 1;
|
||
|
delete cppmap;
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
cppmap->insert (*acpp, *bcpp);
|
||
|
}
|
||
|
|
||
|
*sipCppPtr = cppmap;
|
||
|
|
||
|
return 1;
|
||
|
%End
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
%MappedType TQMap<TQCString,int>
|
||
|
//converts a Python dict of TQCString:int
|
||
14 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqmap.h>
|
||
14 years ago
|
%End
|
||
|
|
||
|
%ConvertFromTypeCode
|
||
|
// Convert to a Python dict
|
||
|
|
||
|
if (!sipCpp)
|
||
|
return PyDict_New();
|
||
|
|
||
|
PyObject *dict;
|
||
|
|
||
|
// Create the dictionary.
|
||
|
|
||
|
if ((dict = PyDict_New()) == NULL)
|
||
|
return NULL;
|
||
|
|
||
|
// Get it.
|
||
|
|
||
13 years ago
|
const TQMap<TQCString,int> cppmap = *sipCpp;
|
||
|
TQMap<TQCString,int>::ConstIterator it;
|
||
14 years ago
|
|
||
|
for (it = cppmap.begin (); it != cppmap.end (); ++it)
|
||
|
{
|
||
13 years ago
|
TQCString acpp = it.key ();
|
||
14 years ago
|
int bcpp = it.data ();
|
||
|
PyObject *ainst;
|
||
|
PyObject *binst = NULL;
|
||
13 years ago
|
if (((ainst = sipConvertFromNewType(new TQCString (acpp), sipType_TQCString, NULL)) == NULL)
|
||
14 years ago
|
|| ((binst = PyInt_FromLong (bcpp)) < 0)
|
||
|
|| (PyDict_SetItem (dict, ainst, binst) < 0))
|
||
|
{
|
||
|
Py_XDECREF (ainst);
|
||
|
Py_XDECREF (binst);
|
||
|
Py_DECREF (dict);
|
||
|
return NULL;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return dict;
|
||
|
%End
|
||
|
|
||
|
|
||
|
%ConvertToTypeCode
|
||
13 years ago
|
// Convert a Python dictionary to a TQMap on the heap.
|
||
14 years ago
|
|
||
|
if (sipIsErr == NULL)
|
||
|
return PyDict_Check(sipPy);
|
||
|
|
||
13 years ago
|
TQMap<TQCString,int> *cppmap = new TQMap<TQCString,int>;
|
||
14 years ago
|
|
||
|
PyObject *aelem, *belem;
|
||
|
SIP_SSIZE_T pos = 0;
|
||
13 years ago
|
TQCString *acpp;
|
||
14 years ago
|
int bcpp;
|
||
|
|
||
|
while (PyDict_Next(sipPy, &pos, &aelem, &belem))
|
||
|
{
|
||
|
int iserr = 0;
|
||
|
|
||
13 years ago
|
acpp = (TQCString *)sipForceConvertToType(aelem, sipType_TQCString, sipTransferObj, SIP_NOT_NONE|SIP_NO_CONVERTORS, NULL, &iserr);
|
||
14 years ago
|
|
||
|
if (iserr || !PyInt_Check (belem))
|
||
|
{
|
||
|
*sipIsErr = 1;
|
||
|
delete cppmap;
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
bcpp = PyInt_AS_LONG (belem);
|
||
|
|
||
|
cppmap->insert (*acpp, bcpp);
|
||
|
}
|
||
|
|
||
|
*sipCppPtr = cppmap;
|
||
|
|
||
|
return 1;
|
||
|
%End
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
%MappedType TQPtrList<KParts::ReadOnlyPart>
|
||
14 years ago
|
//converts a Python list of KParts.ReadOnlyPart
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqptrlist.h>
|
||
14 years ago
|
%End
|
||
|
|
||
|
%ConvertFromTypeCode
|
||
|
if (!sipCpp)
|
||
|
return PyList_New (0);
|
||
|
|
||
|
PyObject *pylist;
|
||
|
|
||
|
// Create the list
|
||
|
|
||
|
if ((pylist = PyList_New(0)) == NULL)
|
||
|
return NULL;
|
||
|
|
||
|
// Get it.
|
||
|
|
||
13 years ago
|
TQPtrList<KParts::ReadOnlyPart> *cpplist = (TQPtrList<KParts::ReadOnlyPart> *)sipCpp;
|
||
14 years ago
|
KParts::ReadOnlyPart *cpp;
|
||
|
PyObject *inst;
|
||
|
|
||
|
// the loop depends on the type of iterator the tmeplate makes available
|
||
|
for(cpp = cpplist->first (); cpp != 0; cpp = cpplist->next () )
|
||
|
{
|
||
|
if (((inst = sipConvertFromInstance (cpp, sipClass_KParts_ReadOnlyPart, sipTransferObj)) == NULL)
|
||
|
|| PyList_Append (pylist, inst) < 0)
|
||
|
{
|
||
|
Py_DECREF (pylist);
|
||
|
return NULL;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return pylist;
|
||
|
%End
|
||
|
|
||
|
%ConvertToTypeCode
|
||
|
if (sipIsErr == NULL)
|
||
|
return PyList_Check(sipPy);
|
||
|
|
||
13 years ago
|
TQPtrList<KParts::ReadOnlyPart> *cpplist = new TQPtrList<KParts::ReadOnlyPart>;
|
||
14 years ago
|
|
||
|
PyObject *elem;
|
||
|
KParts::ReadOnlyPart *cpp;
|
||
|
int iserr = 0;
|
||
|
|
||
|
for (int i = 0; i < PyList_Size (sipPy); i++)
|
||
|
{
|
||
|
elem = PyList_GET_ITEM (sipPy, i);
|
||
|
cpp = (KParts::ReadOnlyPart *)sipForceConvertToType(elem, sipType_KParts_ReadOnlyPart, sipTransferObj, SIP_NO_CONVERTORS, NULL, &iserr);
|
||
|
|
||
|
if (iserr)
|
||
|
{
|
||
|
*sipIsErr = 1;
|
||
|
delete cpplist;
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
cpplist->append (cpp);
|
||
|
}
|
||
|
|
||
|
*sipCppPtr = cpplist;
|
||
|
|
||
|
return 1;
|
||
|
%End
|
||
|
};
|
||
|
|
||
|
|