#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'kbetterthankdialogbase.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "kbetterthankdialogbase.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "kbetterthankdialogbase.ui.h"

/*
 *  Constructs a KBetterThanKDialogBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
KBetterThanKDialogBase::KBetterThanKDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KBetterThanKDialogBase" );
    KBetterThanKDialogBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "KBetterThanKDialogBaseLayout"); 
    KBetterThanKDialogBaseLayout->setResizeMode( TQLayout::Fixed );

    _label = new KActiveLabel( this, "_label" );

    KBetterThanKDialogBaseLayout->addMultiCellWidget( _label, 0, 0, 0, 2 );
    spacer1 = new TQSpacerItem( 41, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    KBetterThanKDialogBaseLayout->addItem( spacer1, 1, 2 );

    layout1 = new TQHBoxLayout( 0, 0, 6, "layout1"); 

    _allowOnce = new TQPushButton( this, "_allowOnce" );
    _allowOnce->setDefault( true );
    layout1->addWidget( _allowOnce );

    _allowAlways = new TQPushButton( this, "_allowAlways" );
    layout1->addWidget( _allowAlways );

    _deny = new TQPushButton( this, "_deny" );
    layout1->addWidget( _deny );

    _denyForever = new TQPushButton( this, "_denyForever" );
    layout1->addWidget( _denyForever );

    KBetterThanKDialogBaseLayout->addLayout( layout1, 1, 1 );
    spacer2 = new TQSpacerItem( 61, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    KBetterThanKDialogBaseLayout->addItem( spacer2, 1, 0 );
    languageChange();
    resize( TQSize(479, 109).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( _allowOnce, TQ_SIGNAL( clicked() ), this, TQ_SLOT( clicked() ) );
    connect( _allowAlways, TQ_SIGNAL( clicked() ), this, TQ_SLOT( clicked() ) );
    connect( _deny, TQ_SIGNAL( clicked() ), this, TQ_SLOT( clicked() ) );
    connect( _denyForever, TQ_SIGNAL( clicked() ), this, TQ_SLOT( clicked() ) );
    init();
}

/*
 *  Destroys the object and frees any allocated resources
 */
KBetterThanKDialogBase::~KBetterThanKDialogBase()
{
    // no need to delete child widgets, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KBetterThanKDialogBase::languageChange()
{
    setCaption( TQString::null );
    _allowOnce->setText( tr2i18n( "Allow &Once" ) );
    _allowAlways->setText( tr2i18n( "Allow &Always" ) );
    _deny->setText( tr2i18n( "&Deny" ) );
    _denyForever->setText( tr2i18n( "Deny &Forever" ) );
}

/****************************************************************************
** KBetterThanKDialogBase meta object code from reading C++ file 'kbetterthankdialogbase.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 "kbetterthankdialogbase.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 *KBetterThanKDialogBase::className() const
{
    return "KBetterThanKDialogBase";
}

TQMetaObject *KBetterThanKDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KBetterThanKDialogBase( "KBetterThanKDialogBase", &KBetterThanKDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KBetterThanKDialogBase::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 = TQDialog::staticMetaObject();
    static const TQUParameter param_slot_0[] = {
	{ "label", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"setLabel", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQUMethod slot_2 = {"accept", 0, 0 };
    static const TQUMethod slot_3 = {"reject", 0, 0 };
    static const TQUMethod slot_4 = {"clicked", 0, 0 };
    static const TQUMethod slot_5 = {"init", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "setLabel(const TQString&)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected },
	{ "accept()", &slot_2, TQMetaData::Protected },
	{ "reject()", &slot_3, TQMetaData::Protected },
	{ "clicked()", &slot_4, TQMetaData::Private },
	{ "init()", &slot_5, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KBetterThanKDialogBase", parentObject,
	slot_tbl, 6,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KBetterThanKDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KBetterThanKDialogBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: setLabel((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 1: languageChange(); break;
    case 2: accept(); break;
    case 3: reject(); break;
    case 4: clicked(); break;
    case 5: init(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

bool KBetterThanKDialogBase::tqt_emit( int _id, TQUObject* _o )
{
    return TQDialog::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

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

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