/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from pmpartiface.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "/tmp/buildd/tde-packaging/arch/tde-base/tde-tdegraphics/src/tdegraphics-trinity-14.1.6/kpovmodeler/pmpartiface.h"

#include <kdatastream.h>
#include <tqasciidict.h>


static const int PMPartIface_fhash = 23;
static const char* const PMPartIface_ftable[20][3] = {
    { "void", "deleteContents()", "deleteContents()" },
    { "bool", "newDocument()", "newDocument()" },
    { "void", "closeDocument()", "closeDocument()" },
    { "void", "slotNewObject(TQString,TQString)", "slotNewObject(TQString type,TQString pos)" },
    { "void", "initDocument()", "initDocument()" },
    { "void", "clearSelection()", "clearSelection()" },
    { "void", "slotEditCut()", "slotEditCut()" },
    { "void", "slotEditDelete()", "slotEditDelete()" },
    { "void", "slotEditCopy()", "slotEditCopy()" },
    { "void", "slotEditPaste()", "slotEditPaste()" },
    { "void", "slotRender()", "slotRender()" },
    { "TQString", "activeObjectName()", "activeObjectName()" },
    { "bool", "setActiveObject(TQString)", "setActiveObject(TQString name)" },
    { "TQStringList", "getProperties()", "getProperties()" },
    { "bool", "setProperty(TQString,PMVariant)", "setProperty(TQString property,PMVariant value)" },
    { "bool", "setProperty(TQString,TQString)", "setProperty(TQString property,TQString value)" },
    { "PMVariant", "getProperty(TQString)", "getProperty(TQString property)" },
    { "TQString", "getPropertyStr(TQString)", "getPropertyStr(TQString property)" },
    { "TQStringList", "getObjectTypes()", "getObjectTypes()" },
    { 0, 0, 0 }
};
static const int PMPartIface_ftable_hiddens[19] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool PMPartIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( PMPartIface_fhash, true, false );
	for ( int i = 0; PMPartIface_ftable[i][1]; i++ )
	    fdict->insert( PMPartIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void deleteContents()
	replyType = PMPartIface_ftable[0][0]; 
	deleteContents( );
    } break;
    case 1: { // bool newDocument()
	replyType = PMPartIface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << newDocument( );
    } break;
    case 2: { // void closeDocument()
	replyType = PMPartIface_ftable[2][0]; 
	closeDocument( );
    } break;
    case 3: { // void slotNewObject(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = PMPartIface_ftable[3][0]; 
	slotNewObject(arg0, arg1 );
    } break;
    case 4: { // void initDocument()
	replyType = PMPartIface_ftable[4][0]; 
	initDocument( );
    } break;
    case 5: { // void clearSelection()
	replyType = PMPartIface_ftable[5][0]; 
	clearSelection( );
    } break;
    case 6: { // void slotEditCut()
	replyType = PMPartIface_ftable[6][0]; 
	slotEditCut( );
    } break;
    case 7: { // void slotEditDelete()
	replyType = PMPartIface_ftable[7][0]; 
	slotEditDelete( );
    } break;
    case 8: { // void slotEditCopy()
	replyType = PMPartIface_ftable[8][0]; 
	slotEditCopy( );
    } break;
    case 9: { // void slotEditPaste()
	replyType = PMPartIface_ftable[9][0]; 
	slotEditPaste( );
    } break;
    case 10: { // void slotRender()
	replyType = PMPartIface_ftable[10][0]; 
	slotRender( );
    } break;
    case 11: { // TQString activeObjectName()
	replyType = PMPartIface_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << activeObjectName( );
    } break;
    case 12: { // bool setActiveObject(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = PMPartIface_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setActiveObject(arg0 );
    } break;
    case 13: { // TQStringList getProperties()
	replyType = PMPartIface_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getProperties( );
    } break;
    case 14: { // bool setProperty(TQString,PMVariant)
	TQString arg0;
	PMVariant arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = PMPartIface_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setProperty(arg0, arg1 );
    } break;
    case 15: { // bool setProperty(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = PMPartIface_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setProperty(arg0, arg1 );
    } break;
    case 16: { // PMVariant getProperty(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = PMPartIface_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getProperty(arg0 );
    } break;
    case 17: { // TQString getPropertyStr(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = PMPartIface_ftable[17][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getPropertyStr(arg0 );
    } break;
    case 18: { // TQStringList getObjectTypes()
	replyType = PMPartIface_ftable[18][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getObjectTypes( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList PMPartIface::interfaces()
{
    QCStringList ifaces = DCOPObject::interfaces();
    ifaces += "PMPartIface";
    return ifaces;
}

QCStringList PMPartIface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; PMPartIface_ftable[i][2]; i++ ) {
	if (PMPartIface_ftable_hiddens[i])
	    continue;
	TQCString func = PMPartIface_ftable[i][0];
	func += ' ';
	func += PMPartIface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


