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

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

#include "configdialog.h"

#include <ntqvariant.h>
#include <keditlistbox.h>
#include <klineedit.h>
#include <kpassdlg.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ConfigDialog which is a child of 'parent', with the
 *  name 'name'.' 
 */
ConfigDialog::ConfigDialog( TQWidget* parent,  const char* name )
    : TDECModule( parent, name )
{
    if ( !name )
	setName( "ConfigDialog" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 0, 0 ) );
    ConfigDialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "ConfigDialogLayout"); 

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

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

    kcfg_PublishType = new TQButtonGroup( tab, "kcfg_PublishType" );
    kcfg_PublishType->setEnabled( true );
    kcfg_PublishType->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, kcfg_PublishType->sizePolicy().hasHeightForWidth() ) );

    WANButton = new TQRadioButton( kcfg_PublishType, "WANButton" );
    WANButton->setEnabled( true );
    WANButton->setGeometry( TQRect( 11, 51, 618, 22 ) );

    LANButtor = new TQRadioButton( kcfg_PublishType, "LANButtor" );
    LANButtor->setGeometry( TQRect( 11, 23, 618, 22 ) );
    LANButtor->setChecked( false );

    tabLayout->addWidget( kcfg_PublishType, 3, 0 );

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

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

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

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

    kcfg_DomainList = new KEditListBox( tab, "kcfg_DomainList" );
    kcfg_DomainList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, kcfg_DomainList->sizePolicy().hasHeightForWidth() ) );

    tabLayout->addWidget( kcfg_DomainList, 2, 0 );
    tabs->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabs, "tab_2" );
    tabLayout_2 = new TQVBoxLayout( tab_2, 11, 6, "tabLayout_2"); 

    layout7 = new TQGridLayout( 0, 1, 1, 0, 6, "layout7"); 

    textLabel2 = new TQLabel( tab_2, "textLabel2" );

    layout7->addMultiCellWidget( textLabel2, 2, 2, 0, 1 );
    spacer4 = new TQSpacerItem( 130, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addMultiCell( spacer4, 1, 1, 1, 2 );

    hostedit = new KLineEdit( tab_2, "hostedit" );

    layout7->addWidget( hostedit, 1, 3 );

    secretedit = new KPasswordEdit( tab_2, "secretedit" );

    layout7->addWidget( secretedit, 2, 3 );

    domainLabel = new TQLabel( tab_2, "domainLabel" );
    domainLabel->setEnabled( true );

    layout7->addMultiCellWidget( domainLabel, 0, 0, 0, 1 );

    textLabel1 = new TQLabel( tab_2, "textLabel1" );

    layout7->addWidget( textLabel1, 1, 0 );

    domainedit = new KLineEdit( tab_2, "domainedit" );
    domainedit->setEnabled( true );

    layout7->addWidget( domainedit, 0, 3 );
    spacer1 = new TQSpacerItem( 90, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer1, 0, 2 );
    spacer5 = new TQSpacerItem( 90, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer5, 2, 2 );
    tabLayout_2->addLayout( layout7 );
    spacer7 = new TQSpacerItem( 50, 110, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer7 );
    tabs->insertTab( tab_2, TQString::fromLatin1("") );

    ConfigDialogLayout->addWidget( tabs, 0, 0 );
    languageChange();
    resize( TQSize(571, 486).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigDialog::languageChange()
{
    setCaption( tr2i18n( "MyDialog1" ) );
    kcfg_PublishType->setTitle( tr2i18n( "Publishing Mode" ) );
    WANButton->setText( tr2i18n( "&Wide area network" ) );
    TQWhatsThis::add( WANButton, tr2i18n( "Advertise services on Internet domain using public IP. To have this option working you need to configure wide area operation in using administrator mode" ) );
    LANButtor->setText( tr2i18n( "Loc&al network" ) );
    TQWhatsThis::add( LANButtor, tr2i18n( "Advertise services on local network (in domain .local) using multicast DNS." ) );
    kcfg_BrowseLocal->setText( tr2i18n( "Browse local networ&k" ) );
    TQWhatsThis::add( kcfg_BrowseLocal, tr2i18n( "Browse local network (domain .local) using multicast DNS." ) );
    enableZeroconf->setText( tr2i18n( "Enable &Zeroconf network browsing" ) );
    TQWhatsThis::add( enableZeroconf, tr2i18n( "Browse local network (domain .local) using multicast DNS." ) );
    kcfg_DomainList->setTitle( tr2i18n( "Additional Domains" ) );
    TQWhatsThis::add( kcfg_DomainList, tr2i18n( "List of Internet domains  that will be browsed for services. Do not put .local here - it\n"
"is configured with 'Browse local network' option above." ) );
    tabs->changeTab( tab, tr2i18n( "&General" ) );
    textLabel2->setText( tr2i18n( "Shared secret:" ) );
    TQWhatsThis::add( hostedit, tr2i18n( "Name of this machine. Must be in fully qualified form (host.domain)" ) );
    TQWhatsThis::add( secretedit, tr2i18n( "Optional shared secret used for authorization of DNS dynamic updates." ) );
    domainLabel->setText( tr2i18n( "Domain:" ) );
    textLabel1->setText( tr2i18n( "Hostname:" ) );
    tabs->changeTab( tab_2, tr2i18n( "W&ide area" ) );
}

void ConfigDialog::radioButton2_2_toggled(bool)
{
    tqWarning( "ConfigDialog::radioButton2_2_toggled(bool): Not implemented yet" );
}

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

TQMetaObject *ConfigDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConfigDialog( "ConfigDialog", &ConfigDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ConfigDialog::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 = TDECModule::staticMetaObject();
    static const TQUParameter param_slot_0[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"radioButton2_2_toggled", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "radioButton2_2_toggled(bool)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ConfigDialog", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ConfigDialog.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool ConfigDialog::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: radioButton2_2_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 1: languageChange(); break;
    default:
	return TDECModule::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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