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

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

#include "fourbuttonmessagebox.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "fourbuttonmessagebox.ui.h"

/*
 *  Constructs a FourButtonMessageBox 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.
 */
FourButtonMessageBox::FourButtonMessageBox( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "FourButtonMessageBox" );
    setMinimumSize( TQSize( 0, 150 ) );
    FourButtonMessageBoxLayout = new TQGridLayout( this, 1, 1, 11, 6, "FourButtonMessageBoxLayout"); 

    pixmapLabel = new TQLabel( this, "pixmapLabel" );
    pixmapLabel->setMaximumSize( TQSize( 32, 32 ) );

    FourButtonMessageBoxLayout->addWidget( pixmapLabel, 0, 0 );

    textLabel = new TQLabel( this, "textLabel" );

    FourButtonMessageBoxLayout->addWidget( textLabel, 0, 1 );

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

    user1Button = new KPushButton( this, "user1Button" );
    layout2->addWidget( user1Button );

    user2Button = new KPushButton( this, "user2Button" );
    layout2->addWidget( user2Button );

    user3Button = new KPushButton( this, "user3Button" );
    user3Button->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, user3Button->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( user3Button );

    cancelButton = new KPushButton( this, "cancelButton" );
    layout2->addWidget( cancelButton );

    FourButtonMessageBoxLayout->addMultiCellLayout( layout2, 2, 2, 0, 1 );
    spacer1 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    FourButtonMessageBoxLayout->addItem( spacer1, 1, 1 );
    languageChange();
    resize( TQSize(425, 150).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( cancelButton_clicked() ) );
    connect( user1Button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( user1Button_clicked() ) );
    connect( user2Button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( user2Button_clicked() ) );
    connect( user3Button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( user3Button_clicked() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FourButtonMessageBox::languageChange()
{
    textLabel->setText( TQString::null );
    user1Button->setText( tr2i18n( "&Save" ) );
    user2Button->setText( tr2i18n( "Save &As..." ) );
    user3Button->setText( tr2i18n( "&Do Not Save" ) );
    cancelButton->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *FourButtonMessageBox::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FourButtonMessageBox( "FourButtonMessageBox", &FourButtonMessageBox::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* FourButtonMessageBox::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 TQUMethod slot_0 = {"cancelButton_clicked", 0, 0 };
    static const TQUMethod slot_1 = {"user1Button_clicked", 0, 0 };
    static const TQUMethod slot_2 = {"user2Button_clicked", 0, 0 };
    static const TQUMethod slot_3 = {"user3Button_clicked", 0, 0 };
    static const TQUMethod slot_4 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "cancelButton_clicked()", &slot_0, TQMetaData::Public },
	{ "user1Button_clicked()", &slot_1, TQMetaData::Public },
	{ "user2Button_clicked()", &slot_2, TQMetaData::Public },
	{ "user3Button_clicked()", &slot_3, TQMetaData::Public },
	{ "languageChange()", &slot_4, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"FourButtonMessageBox", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_FourButtonMessageBox.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool FourButtonMessageBox::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: cancelButton_clicked(); break;
    case 1: user1Button_clicked(); break;
    case 2: user2Button_clicked(); break;
    case 3: user3Button_clicked(); break;
    case 4: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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