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

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

#include "gaduawayui.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a GaduAwayUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
GaduAwayUI::GaduAwayUI( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "GaduAwayUI" );
    setBackgroundOrigin( TQWidget::WidgetOrigin );
    setFocusPolicy( TQWidget::TabFocus );
    GaduAwayUILayout = new TQGridLayout( this, 1, 1, 0, 6, "GaduAwayUILayout"); 

    layout3 = new TQVBoxLayout( 0, 0, 6, "layout3"); 

    statusGroup_ = new TQButtonGroup( this, "statusGroup_" );
    statusGroup_->setColumnLayout(0, TQt::Vertical );
    statusGroup_->layout()->setSpacing( 6 );
    statusGroup_->layout()->setMargin( 11 );
    statusGroup_Layout = new TQGridLayout( statusGroup_->layout() );
    statusGroup_Layout->setAlignment( TQt::AlignTop );

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

    onlineButton_ = new TQRadioButton( statusGroup_, "onlineButton_" );
    statusGroup_->insert( onlineButton_, 4 );
    layout2->addWidget( onlineButton_ );

    awayButton_ = new TQRadioButton( statusGroup_, "awayButton_" );
    statusGroup_->insert( awayButton_, 5 );
    layout2->addWidget( awayButton_ );

    invisibleButton_ = new TQRadioButton( statusGroup_, "invisibleButton_" );
    statusGroup_->insert( invisibleButton_, 22 );
    layout2->addWidget( invisibleButton_ );

    offlineButton_ = new TQRadioButton( statusGroup_, "offlineButton_" );
    statusGroup_->insert( offlineButton_, 21 );
    layout2->addWidget( offlineButton_ );

    statusGroup_Layout->addLayout( layout2, 0, 0 );
    layout3->addWidget( statusGroup_ );

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

    textLabel3 = new TQLabel( this, "textLabel3" );
    layout278->addWidget( textLabel3 );

    textEdit_ = new TQLineEdit( this, "textEdit_" );
    textEdit_->setAcceptDrops( false );
    textEdit_->setMaxLength( 70 );
    layout278->addWidget( textEdit_ );
    layout3->addLayout( layout278 );

    GaduAwayUILayout->addLayout( layout3, 0, 0 );
    languageChange();
    resize( TQSize(332, 188).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( textEdit_, onlineButton_ );
    setTabOrder( onlineButton_, awayButton_ );
    setTabOrder( awayButton_, invisibleButton_ );
    setTabOrder( invisibleButton_, offlineButton_ );

    // buddies
    textLabel3->setBuddy( textEdit_ );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GaduAwayUI::languageChange()
{
    setCaption( tr2i18n( "Away Dialog" ) );
    statusGroup_->setTitle( tr2i18n( "Status" ) );
    TQWhatsThis::add( statusGroup_, tr2i18n( "Choose status, by default present status is selected. \n"
"So all you need to do is just to type in your description. \n"
"Choosing Offline status will disconnect you, with given description." ) );
    onlineButton_->setText( tr2i18n( "O&nline" ) );
    TQToolTip::add( onlineButton_, tr2i18n( "Set your status to Online." ) );
    TQWhatsThis::add( onlineButton_, tr2i18n( "Set your status to Online, indicating that you are available to chat with anyone who wishes." ) );
    awayButton_->setText( tr2i18n( "&Busy" ) );
    TQToolTip::add( awayButton_, tr2i18n( "Set your status to busy." ) );
    TQWhatsThis::add( awayButton_, tr2i18n( "Set your status to busy, indicating that you may should not be bothered with trivial chat, and may not be able to reply immediately." ) );
    invisibleButton_->setText( tr2i18n( "&Invisible" ) );
    TQToolTip::add( invisibleButton_, tr2i18n( "Set status to invisible, which will hide your presence from other users." ) );
    TQWhatsThis::add( invisibleButton_, tr2i18n( "Set status to invisible, which will hide your presence from other users (who will see you as offline).  However you may still chat, and see the online presence of others." ) );
    offlineButton_->setText( tr2i18n( "O&ffline" ) );
    TQToolTip::add( offlineButton_, tr2i18n( "Choose this status to disconnect with description entered below." ) );
    TQWhatsThis::add( offlineButton_, tr2i18n( "Choose this status to disconnect with description entered below." ) );
    textLabel3->setText( tr2i18n( "&Message:" ) );
    TQToolTip::add( textLabel3, tr2i18n( "Description of your status." ) );
    TQWhatsThis::add( textLabel3, tr2i18n( "Description of your status (up to 70 characters)." ) );
    TQToolTip::add( textEdit_, tr2i18n( "Description of your status." ) );
    TQWhatsThis::add( textEdit_, tr2i18n( "Description of your status (up to 70 characters)." ) );
}

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

TQMetaObject *GaduAwayUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_GaduAwayUI( "GaduAwayUI", &GaduAwayUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* GaduAwayUI::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();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"GaduAwayUI", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_GaduAwayUI.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool GaduAwayUI::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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