/****************************************************************************
** TQButton meta object code from reading C++ file 'ntqbutton.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 "../../widgets/ntqbutton.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

#include <ntqvariant.h>
const char *TQButton::className() const
{
    return "TQButton";
}

TQMetaObject *TQButton::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TQButton( "TQButton", &TQButton::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* TQButton::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 = TQWidget::staticMetaObject();
#ifndef TQT_NO_PROPERTIES
    static const TQMetaEnum::Item enum_0[] = {
	{ "SingleShot",  (int) TQButton::SingleShot },
	{ "Toggle",  (int) TQButton::Toggle },
	{ "Tristate",  (int) TQButton::Tristate }
    };
    static const TQMetaEnum::Item enum_1[] = {
	{ "Off",  (int) TQButton::Off },
	{ "NoChange",  (int) TQButton::NoChange },
	{ "On",  (int) TQButton::On }
    };
    static const TQMetaEnum enum_tbl[] = {
	{ "ToggleType", 3, enum_0, false },
	{ "ToggleState", 3, enum_1, false }
    };
#endif // TQT_NO_PROPERTIES
    static const TQUMethod slot_0 = {"animateClick", 0, 0 };
    static const TQUMethod slot_1 = {"toggle", 0, 0 };
    static const TQUMethod slot_2 = {"animateTimeout", 0, 0 };
    static const TQUMethod slot_3 = {"autoRepeatTimeout", 0, 0 };
    static const TQUMethod slot_4 = {"emulateClick", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "animateClick()", &slot_0, TQMetaData::Public },
	{ "toggle()", &slot_1, TQMetaData::Public },
	{ "animateTimeout()", &slot_2, TQMetaData::Private },
	{ "autoRepeatTimeout()", &slot_3, TQMetaData::Private },
	{ "emulateClick()", &slot_4, TQMetaData::Private }
    };
    static const TQUMethod signal_0 = {"pressed", 0, 0 };
    static const TQUMethod signal_1 = {"released", 0, 0 };
    static const TQUMethod signal_2 = {"clicked", 0, 0 };
    static const TQUParameter param_signal_3[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod signal_3 = {"toggled", 1, param_signal_3 };
    static const TQUParameter param_signal_4[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod signal_4 = {"stateChanged", 1, param_signal_4 };
    static const TQMetaData signal_tbl[] = {
	{ "pressed()", &signal_0, TQMetaData::Public },
	{ "released()", &signal_1, TQMetaData::Public },
	{ "clicked()", &signal_2, TQMetaData::Public },
	{ "toggled(bool)", &signal_3, TQMetaData::Public },
	{ "stateChanged(int)", &signal_4, TQMetaData::Public }
    };
#ifndef TQT_NO_PROPERTIES
    static const TQMetaProperty props_tbl[11] = {
 	{ "TQString","text", 0x3000103, &TQButton::metaObj, 0, -1 },
	{ "TQPixmap","pixmap", 0x6000103, &TQButton::metaObj, 0, -1 },
	{ "TQKeySequence","accel", 0x1f000103, &TQButton::metaObj, 0, -1 },
	{ "bool","toggleButton", 0x12000001, &TQButton::metaObj, 0, -1 },
	{ "ToggleType","toggleType", 0x0005, &TQButton::metaObj, &enum_tbl[0], -1 },
	{ "bool","down", 0x12001103, &TQButton::metaObj, 0, -1 },
	{ "bool","on", 0x12000001, &TQButton::metaObj, 0, -1 },
	{ "ToggleState","toggleState", 0x0005, &TQButton::metaObj, &enum_tbl[1], -1 },
	{ "bool","autoResize", 0x12001103, &TQButton::metaObj, 0, -1 },
	{ "bool","autoRepeat", 0x12000103, &TQButton::metaObj, 0, -1 },
	{ "bool","exclusiveToggle", 0x12000001, &TQButton::metaObj, 0, -1 }
    };
#endif // TQT_NO_PROPERTIES
    metaObj = TQMetaObject::new_metaobject(
	"TQButton", parentObject,
	slot_tbl, 5,
	signal_tbl, 5,
#ifndef TQT_NO_PROPERTIES
	props_tbl, 11,
	enum_tbl, 2,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_TQButton.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

// TQ_SIGNAL toggled
void TQButton::toggled( bool t0 )
{
    activate_signal_bool( staticMetaObject()->signalOffset() + 3, t0 );
}

// TQ_SIGNAL stateChanged
void TQButton::stateChanged( int t0 )
{
    activate_signal( staticMetaObject()->signalOffset() + 4, t0 );
}

bool TQButton::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: animateClick(); break;
    case 1: toggle(); break;
    case 2: animateTimeout(); break;
    case 3: autoRepeatTimeout(); break;
    case 4: emulateClick(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool TQButton::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: pressed(); break;
    case 1: released(); break;
    case 2: clicked(); break;
    case 3: toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 4: stateChanged((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQWidget::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

bool TQButton::tqt_property( int id, int f, TQVariant* v)
{
    switch ( id - staticMetaObject()->propertyOffset() ) {
    case 0: switch( f ) {
	case 0: setText(v->asString()); break;
	case 1: *v = TQVariant( this->text() ); break;
	case 3: case 4: case 5: break;
	default: return false;
    } break;
    case 1: switch( f ) {
	case 0: setPixmap(v->asPixmap()); break;
	case 1: if ( this->pixmap() ) *v = TQVariant( *pixmap() ); break;
	case 3: case 4: case 5: break;
	default: return false;
    } break;
    case 2: switch( f ) {
	case 0: setAccel(v->asKeySequence()); break;
	case 1: *v = TQVariant( this->accel() ); break;
	case 3: case 4: case 5: break;
	default: return false;
    } break;
    case 3: switch( f ) {
	case 1: *v = TQVariant( this->isToggleButton() ); break;
	case 3: case 4: case 5: break;
	default: return false;
    } break;
    case 4: switch( f ) {
	case 1: *v = TQVariant( (int)this->toggleType() ); break;
	case 3: case 4: case 5: break;
	default: return false;
    } break;
    case 5: switch( f ) {
	case 0: setDown(v->asBool()); break;
	case 1: *v = TQVariant( this->isDown() ); break;
	case 4: case 5: break;
	default: return false;
    } break;
    case 6: switch( f ) {
	case 1: *v = TQVariant( this->isOn() ); break;
	case 3: case 4: case 5: break;
	default: return false;
    } break;
    case 7: switch( f ) {
	case 1: *v = TQVariant( (int)this->state() ); break;
	case 3: case 4: case 5: break;
	default: return false;
    } break;
    case 8: switch( f ) {
	case 0: setAutoResize(v->asBool()); break;
	case 1: *v = TQVariant( this->autoResize() ); break;
	case 4: case 5: break;
	default: return false;
    } break;
    case 9: switch( f ) {
	case 0: setAutoRepeat(v->asBool()); break;
	case 1: *v = TQVariant( this->autoRepeat() ); break;
	case 3: case 4: case 5: break;
	default: return false;
    } break;
    case 10: switch( f ) {
	case 1: *v = TQVariant( this->isExclusiveToggle() ); break;
	case 3: case 4: case 5: break;
	default: return false;
    } break;
    default:
	return TQWidget::tqt_property( id, f, v );
    }
    return true;
}

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