/****************************************************************************
** TQProcess meta object code from reading C++ file 'ntqprocess.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "../../kernel/ntqprocess.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *TQProcess::className() const
{
    return "TQProcess";
}

TQMetaObject *TQProcess::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TQProcess( "TQProcess", &TQProcess::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString TQProcess::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "TQProcess", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString TQProcess::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "TQProcess", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* TQProcess::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQObject::staticMetaObject();
    static const TQUMethod slot_0 = {"tryTerminate", 0, 0 };
    static const TQUMethod slot_1 = {"kill", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ "buf", &static_QUType_varptr, "\x1d", TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"writeToStdin", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ "buf", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"writeToStdin", 1, param_slot_3 };
    static const TQUMethod slot_4 = {"closeStdin", 0, 0 };
    static const TQUParameter param_slot_5[] = {
	{ "fd", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_5 = {"socketRead", 1, param_slot_5 };
    static const TQUParameter param_slot_6[] = {
	{ "fd", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_6 = {"socketWrite", 1, param_slot_6 };
    static const TQUMethod slot_7 = {"timeout", 0, 0 };
    static const TQUMethod slot_8 = {"closeStdinLaunch", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "tryTerminate()", &slot_0, TQMetaData::Public },
	{ "kill()", &slot_1, TQMetaData::Public },
	{ "writeToStdin(const TQByteArray&)", &slot_2, TQMetaData::Public },
	{ "writeToStdin(const TQString&)", &slot_3, TQMetaData::Public },
	{ "closeStdin()", &slot_4, TQMetaData::Public },
	{ "socketRead(int)", &slot_5, TQMetaData::Private },
	{ "socketWrite(int)", &slot_6, TQMetaData::Private },
	{ "timeout()", &slot_7, TQMetaData::Private },
	{ "closeStdinLaunch()", &slot_8, TQMetaData::Private }
    };
    static const TQUMethod signal_0 = {"readyReadStdout", 0, 0 };
    static const TQUMethod signal_1 = {"readyReadStderr", 0, 0 };
    static const TQUMethod signal_2 = {"processExited", 0, 0 };
    static const TQUMethod signal_3 = {"wroteToStdin", 0, 0 };
    static const TQUMethod signal_4 = {"launchFinished", 0, 0 };
    static const TQMetaData signal_tbl[] = {
	{ "readyReadStdout()", &signal_0, TQMetaData::Public },
	{ "readyReadStderr()", &signal_1, TQMetaData::Public },
	{ "processExited()", &signal_2, TQMetaData::Public },
	{ "wroteToStdin()", &signal_3, TQMetaData::Public },
	{ "launchFinished()", &signal_4, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"TQProcess", parentObject,
	slot_tbl, 9,
	signal_tbl, 5,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_TQProcess.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* TQProcess::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "TQProcess" ) )
	return this;
    return TQObject::tqt_cast( clname );
}

// TQ_SIGNAL readyReadStdout
void TQProcess::readyReadStdout()
{
    activate_signal( staticMetaObject()->signalOffset() + 0 );
}

// TQ_SIGNAL readyReadStderr
void TQProcess::readyReadStderr()
{
    activate_signal( staticMetaObject()->signalOffset() + 1 );
}

// TQ_SIGNAL processExited
void TQProcess::processExited()
{
    activate_signal( staticMetaObject()->signalOffset() + 2 );
}

// TQ_SIGNAL wroteToStdin
void TQProcess::wroteToStdin()
{
    activate_signal( staticMetaObject()->signalOffset() + 3 );
}

// TQ_SIGNAL launchFinished
void TQProcess::launchFinished()
{
    activate_signal( staticMetaObject()->signalOffset() + 4 );
}

bool TQProcess::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: tryTerminate(); break;
    case 1: kill(); break;
    case 2: writeToStdin((const TQByteArray&)*((const TQByteArray*)static_QUType_ptr.get(_o+1))); break;
    case 3: writeToStdin((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 4: closeStdin(); break;
    case 5: socketRead((int)static_QUType_int.get(_o+1)); break;
    case 6: socketWrite((int)static_QUType_int.get(_o+1)); break;
    case 7: timeout(); break;
    case 8: closeStdinLaunch(); break;
    default:
	return TQObject::tqt_invoke( _id, _o );
    }
    return true;
}

bool TQProcess::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: readyReadStdout(); break;
    case 1: readyReadStderr(); break;
    case 2: processExited(); break;
    case 3: wroteToStdin(); break;
    case 4: launchFinished(); break;
    default:
	return TQObject::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

bool TQProcess::tqt_property( int id, int f, TQVariant* v)
{
    return TQObject::tqt_property( id, f, v);
}

bool TQProcess::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
