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

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

#include "webpresenceprefs.h"

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

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

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

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    textLabel1->setFrameShape( TQLabel::NoFrame );
    textLabel1->setFrameShadow( TQLabel::Plain );

    groupBox1Layout->addWidget( textLabel1, 0, 0 );

    uploadURL = new KURLRequester( groupBox1, "uploadURL" );

    groupBox1Layout->addMultiCellWidget( uploadURL, 0, 0, 1, 2 );
    spacer5 = new TQSpacerItem( 449, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addItem( spacer5, 1, 2 );
    WebPresencePrefsUILayout->addWidget( groupBox1 );

    buttonGroup2_2 = new TQButtonGroup( this, "buttonGroup2_2" );
    buttonGroup2_2->setColumnLayout(0, TQt::Vertical );
    buttonGroup2_2->layout()->setSpacing( 6 );
    buttonGroup2_2->layout()->setMargin( 11 );
    buttonGroup2_2Layout = new TQVBoxLayout( buttonGroup2_2->layout() );
    buttonGroup2_2Layout->setAlignment( TQt::AlignTop );

    formatHTML = new TQRadioButton( buttonGroup2_2, "formatHTML" );
    formatHTML->setChecked( true );
    buttonGroup2_2Layout->addWidget( formatHTML );

    formatXHTML = new TQRadioButton( buttonGroup2_2, "formatXHTML" );
    buttonGroup2_2Layout->addWidget( formatXHTML );

    formatXML = new TQRadioButton( buttonGroup2_2, "formatXML" );
    buttonGroup2_2Layout->addWidget( formatXML );

    formatStylesheet = new TQRadioButton( buttonGroup2_2, "formatStylesheet" );
    buttonGroup2_2Layout->addWidget( formatStylesheet );

    layout1 = new TQHBoxLayout( 0, 0, 6, "layout1"); 
    spacer10 = new TQSpacerItem( 30, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout1->addItem( spacer10 );

    formatStylesheetURL = new KURLRequester( buttonGroup2_2, "formatStylesheetURL" );
    formatStylesheetURL->setEnabled( false );
    layout1->addWidget( formatStylesheetURL );
    buttonGroup2_2Layout->addLayout( layout1 );

    useImagesHTML = new TQCheckBox( buttonGroup2_2, "useImagesHTML" );
    buttonGroup2_2Layout->addWidget( useImagesHTML );
    WebPresencePrefsUILayout->addWidget( buttonGroup2_2 );

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

    showName = new TQRadioButton( buttonGroup2, "showName" );
    showName->setChecked( true );
    buttonGroup2Layout->addWidget( showName );

    showAnotherName = new TQRadioButton( buttonGroup2, "showAnotherName" );
    buttonGroup2Layout->addWidget( showAnotherName );

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 
    spacer4_2 = new TQSpacerItem( 30, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout2->addItem( spacer4_2 );

    showThisName = new TQLineEdit( buttonGroup2, "showThisName" );
    showThisName->setEnabled( false );
    layout2->addWidget( showThisName );
    buttonGroup2Layout->addLayout( layout2 );

    includeIMAddress = new TQCheckBox( buttonGroup2, "includeIMAddress" );
    buttonGroup2Layout->addWidget( includeIMAddress );
    WebPresencePrefsUILayout->addWidget( buttonGroup2 );
    Spacer7 = new TQSpacerItem( 16, 93, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WebPresencePrefsUILayout->addItem( Spacer7 );
    languageChange();
    resize( TQSize(426, 554).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( formatStylesheet, TQ_SIGNAL( toggled(bool) ), formatStylesheetURL, TQ_SLOT( setEnabled(bool) ) );
    connect( showAnotherName, TQ_SIGNAL( toggled(bool) ), showThisName, TQ_SLOT( setEnabled(bool) ) );
    connect( formatXML, TQ_SIGNAL( toggled(bool) ), useImagesHTML, TQ_SLOT( setDisabled(bool) ) );
    connect( formatStylesheet, TQ_SIGNAL( toggled(bool) ), useImagesHTML, TQ_SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( uploadURL, formatHTML );
    setTabOrder( formatHTML, formatStylesheetURL );
    setTabOrder( formatStylesheetURL, useImagesHTML );
    setTabOrder( useImagesHTML, showName );
    setTabOrder( showName, showThisName );
    setTabOrder( showThisName, includeIMAddress );

    // buddies
    textLabel1->setBuddy( uploadURL );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void WebPresencePrefsUI::languageChange()
{
    groupBox1->setTitle( tr2i18n( "Uploading" ) );
    textLabel1->setText( tr2i18n( "Uplo&ad to:" ) );
    buttonGroup2_2->setTitle( tr2i18n( "Formatting" ) );
    formatHTML->setText( tr2i18n( "HTML (simple loo&k)" ) );
    TQToolTip::add( formatHTML, tr2i18n( "HTML 4.01 Transitional using the ISO-8859-1 (aka. Latin 1) character set encoding." ) );
    TQWhatsThis::add( formatHTML, tr2i18n( "HTML 4.01 Transitional formatting using ISO-8859-1 (aka. Latin 1) character set encoding.\n"
"\n"
"This version should be easily opened by most web browsers." ) );
    formatXHTML->setText( tr2i18n( "XHTML (simple look)" ) );
    TQToolTip::add( formatXHTML, tr2i18n( "XHTML 1.0 Strict" ) );
    TQWhatsThis::add( formatXHTML, tr2i18n( "The resulting page will be formatted using the XHTML 1.0 Strict W3C Recommendation. The character set encoding is UTF-8.\n"
"\n"
"Note that some web browsers do not support XHTML. You should also make sure your web server serves it out with the correct mime type, such as application/xhtml+xml." ) );
    formatXML->setText( tr2i18n( "&XML" ) );
    TQToolTip::add( formatXML, tr2i18n( "Save the output in XML format using UTF-8 character set." ) );
    TQWhatsThis::add( formatXML, tr2i18n( "Save the output in XML format using the UTF-8 encoding." ) );
    formatStylesheet->setText( tr2i18n( "XML transformation &using this XSLT sheet:" ) );
    useImagesHTML->setText( tr2i18n( "Repla&ce protocol text with images in (X)HTML" ) );
    TQToolTip::add( useImagesHTML, tr2i18n( "Replaces the protocol names, such as MSN and IRC with images." ) );
    TQWhatsThis::add( useImagesHTML, tr2i18n( "Replaces the protocol names, such as MSN and IRC with images.\n"
"\n"
"Note that you have to manually copy the PNG files into place.\n"
"\n"
"The following files are used by default:\n"
"\n"
"images/msn_protocol.png\n"
"images/icq_protocol.png\n"
"images/jabber_protocol.png\n"
"images/yahoo_protocol.png\n"
"images/aim_protocol.png\n"
"images/irc_protocol.png\n"
"images/sms_protocol.png\n"
"images/gadu_protocol.png\n"
"images/winpopup_protocol.png" ) );
    buttonGroup2->setTitle( tr2i18n( "Display Name" ) );
    showName->setText( tr2i18n( "Use one of &your IM names" ) );
    showAnotherName->setText( tr2i18n( "Use another &name:" ) );
    includeIMAddress->setText( tr2i18n( "Include &IM addresses" ) );
}

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

TQMetaObject *WebPresencePrefsUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_WebPresencePrefsUI( "WebPresencePrefsUI", &WebPresencePrefsUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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