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

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

#include "kopetemetalvipropswidget.h"

#include <ntqvariant.h>
#include <addressbooklinkwidget.h>
#include <kcombobox.h>
#include <kicondialog.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqgroupbox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcombobox.h>
#include <ntqlineedit.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    tabWidget = new TQTabWidget( this, "tabWidget" );

    tab = new TQWidget( tabWidget, "tab" );
    tabLayout = new TQGridLayout( tab, 1, 1, 11, 6, "tabLayout"); 

    grpAddressbook = new TQGroupBox( tab, "grpAddressbook" );
    grpAddressbook->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, grpAddressbook->sizePolicy().hasHeightForWidth() ) );
    grpAddressbook->setColumnLayout(0, TQt::Vertical );
    grpAddressbook->layout()->setSpacing( 6 );
    grpAddressbook->layout()->setMargin( 11 );
    grpAddressbookLayout = new TQVBoxLayout( grpAddressbook->layout() );
    grpAddressbookLayout->setAlignment( TQt::AlignTop );

    widAddresseeLink = new Kopete::UI::AddressBookLinkWidget( grpAddressbook, "widAddresseeLink" );
    grpAddressbookLayout->addWidget( widAddresseeLink );

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

    btnExportKABC = new TQPushButton( grpAddressbook, "btnExportKABC" );
    btnExportKABC->setEnabled( false );
    layout8->addWidget( btnExportKABC );
    spacer8_2 = new TQSpacerItem( 107, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout8->addItem( spacer8_2 );

    btnImportKABC = new TQPushButton( grpAddressbook, "btnImportKABC" );
    btnImportKABC->setEnabled( false );
    layout8->addWidget( btnImportKABC );
    grpAddressbookLayout->addLayout( layout8 );

    tabLayout->addWidget( grpAddressbook, 0, 0 );

    buttonGroup1 = new TQButtonGroup( tab, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    radioNameKABC = new TQRadioButton( buttonGroup1, "radioNameKABC" );
    buttonGroup1Layout->addWidget( radioNameKABC );

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

    radioNameContact = new TQRadioButton( buttonGroup1, "radioNameContact" );
    layout11->addWidget( radioNameContact );
    spacer8 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout11->addItem( spacer8 );

    cmbAccountName = new TQComboBox( false, buttonGroup1, "cmbAccountName" );
    cmbAccountName->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, cmbAccountName->sizePolicy().hasHeightForWidth() ) );
    layout11->addWidget( cmbAccountName );
    buttonGroup1Layout->addLayout( layout11 );

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

    radioNameCustom = new TQRadioButton( buttonGroup1, "radioNameCustom" );
    layout12->addWidget( radioNameCustom );
    spacer8_3 = new TQSpacerItem( 50, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout12->addItem( spacer8_3 );

    edtDisplayName = new TQLineEdit( buttonGroup1, "edtDisplayName" );
    layout12->addWidget( edtDisplayName );
    buttonGroup1Layout->addLayout( layout12 );

    tabLayout->addWidget( buttonGroup1, 1, 0 );

    buttonGroup2 = new TQButtonGroup( tab, "buttonGroup2" );
    buttonGroup2->setColumnLayout(0, TQt::Vertical );
    buttonGroup2->layout()->setSpacing( 6 );
    buttonGroup2->layout()->setMargin( 11 );
    buttonGroup2Layout = new TQGridLayout( buttonGroup2->layout() );
    buttonGroup2Layout->setAlignment( TQt::AlignTop );

    photoLabel = new TQLabel( buttonGroup2, "photoLabel" );
    photoLabel->setMinimumSize( TQSize( 64, 92 ) );
    photoLabel->setMaximumSize( TQSize( 64, 32767 ) );
    photoLabel->setFrameShape( TQLabel::Box );
    photoLabel->setLineWidth( 1 );
    photoLabel->setScaledContents( false );

    buttonGroup2Layout->addMultiCellWidget( photoLabel, 0, 2, 1, 1 );

    radioPhotoKABC = new TQRadioButton( buttonGroup2, "radioPhotoKABC" );

    buttonGroup2Layout->addWidget( radioPhotoKABC, 0, 0 );

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

    radioPhotoContact = new TQRadioButton( buttonGroup2, "radioPhotoContact" );
    layout13->addWidget( radioPhotoContact );
    spacer9 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout13->addItem( spacer9 );

    cmbAccountPhoto = new TQComboBox( false, buttonGroup2, "cmbAccountPhoto" );
    cmbAccountPhoto->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, cmbAccountPhoto->sizePolicy().hasHeightForWidth() ) );
    layout13->addWidget( cmbAccountPhoto );

    buttonGroup2Layout->addLayout( layout13, 1, 0 );

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

    radioPhotoCustom = new TQRadioButton( buttonGroup2, "radioPhotoCustom" );
    layout7->addWidget( radioPhotoCustom );
    spacer9_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout7->addItem( spacer9_2 );

    cmbPhotoUrl = new KURLComboRequester( buttonGroup2, "cmbPhotoUrl" );
    cmbPhotoUrl->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, cmbPhotoUrl->sizePolicy().hasHeightForWidth() ) );
    layout7->addWidget( cmbPhotoUrl );

    btnClearPhoto = new KPushButton( buttonGroup2, "btnClearPhoto" );
    btnClearPhoto->setMaximumSize( TQSize( 32, 32 ) );
    layout7->addWidget( btnClearPhoto );

    buttonGroup2Layout->addLayout( layout7, 2, 0 );

    tabLayout->addWidget( buttonGroup2, 2, 0 );

    chkSyncPhoto = new TQCheckBox( tab, "chkSyncPhoto" );

    tabLayout->addWidget( chkSyncPhoto, 3, 0 );
    tabWidget->insertTab( tab, TQString::fromLatin1("") );

    TabPage = new TQWidget( tabWidget, "TabPage" );
    TabPageLayout = new TQVBoxLayout( TabPage, 11, 6, "TabPageLayout"); 

    grpIcons = new TQGroupBox( TabPage, "grpIcons" );
    grpIcons->setColumnLayout(0, TQt::Vertical );
    grpIcons->layout()->setSpacing( 6 );
    grpIcons->layout()->setMargin( 11 );
    grpIconsLayout = new TQGridLayout( grpIcons->layout() );
    grpIconsLayout->setAlignment( TQt::AlignTop );

    lblAway = new TQLabel( grpIcons, "lblAway" );

    grpIconsLayout->addWidget( lblAway, 2, 0 );

    lblOnline = new TQLabel( grpIcons, "lblOnline" );

    grpIconsLayout->addWidget( lblOnline, 1, 0 );

    chkUseCustomIcons = new TQCheckBox( grpIcons, "chkUseCustomIcons" );

    grpIconsLayout->addMultiCellWidget( chkUseCustomIcons, 0, 0, 0, 4 );

    icnbAway = new TDEIconButton( grpIcons, "icnbAway" );

    grpIconsLayout->addWidget( icnbAway, 2, 1 );

    icnbOnline = new TDEIconButton( grpIcons, "icnbOnline" );

    grpIconsLayout->addWidget( icnbOnline, 1, 1 );

    icnbOffline = new TDEIconButton( grpIcons, "icnbOffline" );

    grpIconsLayout->addWidget( icnbOffline, 1, 3 );

    icnbUnknown = new TDEIconButton( grpIcons, "icnbUnknown" );

    grpIconsLayout->addWidget( icnbUnknown, 2, 3 );

    lblOffline = new TQLabel( grpIcons, "lblOffline" );

    grpIconsLayout->addWidget( lblOffline, 1, 2 );

    lblUnknown = new TQLabel( grpIcons, "lblUnknown" );

    grpIconsLayout->addWidget( lblUnknown, 2, 2 );
    spacerHorizontal1 = new TQSpacerItem( 16, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    grpIconsLayout->addItem( spacerHorizontal1, 1, 4 );
    TabPageLayout->addWidget( grpIcons );
    spacer12 = new TQSpacerItem( 20, 170, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout->addItem( spacer12 );
    tabWidget->insertTab( TabPage, TQString::fromLatin1("") );

    KopeteMetaLVIPropsWidgetLayout->addWidget( tabWidget, 0, 0 );
    languageChange();
    resize( TQSize(530, 457).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( tabWidget, btnExportKABC );
    setTabOrder( btnExportKABC, btnImportKABC );
    setTabOrder( btnImportKABC, edtDisplayName );
    setTabOrder( edtDisplayName, cmbAccountName );
    setTabOrder( cmbAccountName, cmbAccountPhoto );
    setTabOrder( cmbAccountPhoto, chkSyncPhoto );
    setTabOrder( chkSyncPhoto, chkUseCustomIcons );
    setTabOrder( chkUseCustomIcons, icnbOnline );
    setTabOrder( icnbOnline, icnbAway );
    setTabOrder( icnbAway, icnbOffline );
    setTabOrder( icnbOffline, icnbUnknown );

    // buddies
    lblAway->setBuddy( icnbAway );
    lblOnline->setBuddy( icnbOnline );
    lblOffline->setBuddy( icnbOffline );
    lblUnknown->setBuddy( icnbUnknown );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KopeteMetaLVIPropsWidget::languageChange()
{
    TQToolTip::add( this, TQString::null );
    grpAddressbook->setTitle( tr2i18n( "Address Book Link" ) );
    btnExportKABC->setText( tr2i18n( "E&xport Details..." ) );
    TQToolTip::add( btnExportKABC, tr2i18n( "Export contact's details to the TDE Address Book" ) );
    btnImportKABC->setText( tr2i18n( "&Import Contacts" ) );
    TQToolTip::add( btnImportKABC, tr2i18n( "Import contacts from the TDE Address Book" ) );
    buttonGroup1->setTitle( tr2i18n( "Display Name Source" ) );
    radioNameKABC->setText( tr2i18n( "Use addressbook &name (needs addressbook link)" ) );
    radioNameContact->setText( tr2i18n( "From contact:" ) );
    TQToolTip::add( cmbAccountName, tr2i18n( "Contact to synchronize the displayname with." ) );
    radioNameCustom->setText( tr2i18n( "Cus&tom:" ) );
    buttonGroup2->setTitle( tr2i18n( "Photo Source" ) );
    photoLabel->setText( tr2i18n( "Photo" ) );
    radioPhotoKABC->setText( tr2i18n( "U&se addressbook photo (needs addressbook link)" ) );
    radioPhotoContact->setText( tr2i18n( "From contact:" ) );
    TQToolTip::add( cmbAccountPhoto, tr2i18n( "Contact to synchronize the displayname with." ) );
    radioPhotoCustom->setText( tr2i18n( "Custom:" ) );
    btnClearPhoto->setText( TQString::null );
    chkSyncPhoto->setText( tr2i18n( "S&ync photo to addressbook" ) );
    tabWidget->changeTab( tab, tr2i18n( "&General" ) );
    grpIcons->setTitle( tr2i18n( "Icons" ) );
    lblAway->setText( tr2i18n( "Awa&y:" ) );
    lblOnline->setText( tr2i18n( "&Online:" ) );
    chkUseCustomIcons->setText( tr2i18n( "Use custom status &icons" ) );
    TQToolTip::add( chkUseCustomIcons, tr2i18n( "Check to set custom icons for this contact" ) );
    icnbAway->setText( TQString::null );
    icnbOnline->setText( TQString::null );
    icnbOffline->setText( TQString::null );
    icnbUnknown->setText( TQString::null );
    lblOffline->setText( tr2i18n( "O&ffline:" ) );
    lblUnknown->setText( tr2i18n( "Un&known:" ) );
    tabWidget->changeTab( TabPage, tr2i18n( "Ad&vanced" ) );
}

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

TQMetaObject *KopeteMetaLVIPropsWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KopeteMetaLVIPropsWidget( "KopeteMetaLVIPropsWidget", &KopeteMetaLVIPropsWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KopeteMetaLVIPropsWidget::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(
	"KopeteMetaLVIPropsWidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KopeteMetaLVIPropsWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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