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

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

#include "webinterfacepref.h"

#include <ntqvariant.h>
#include <kled.h>
#include <klineedit.h>
#include <knuminput.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a WebInterfacePreference as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
WebInterfacePreference::WebInterfacePreference( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "WebInterfacePreference" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 500, 350 ) );
    WebInterfacePreferenceLayout = new TQGridLayout( this, 1, 1, 11, 6, "WebInterfacePreferenceLayout"); 

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

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

    textLabel1 = new TQLabel( buttonGroup1, "textLabel1" );
    layout5->addWidget( textLabel1 );

    port = new KIntSpinBox( buttonGroup1, "port" );
    port->setMaxValue( 65535 );
    port->setMinValue( 1 );
    port->setValue( 8080 );
    layout5->addWidget( port );

    forward = new TQCheckBox( buttonGroup1, "forward" );
    layout5->addWidget( forward );
    spacer4 = new TQSpacerItem( 54, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer4 );

    textLabel4 = new TQLabel( buttonGroup1, "textLabel4" );
    layout5->addWidget( textLabel4 );

    sessionTTL = new KIntSpinBox( buttonGroup1, "sessionTTL" );
    sessionTTL->setMaxValue( 100000 );
    sessionTTL->setMinValue( 1 );
    sessionTTL->setLineStep( 100 );
    sessionTTL->setValue( 3600 );
    layout5->addWidget( sessionTTL );

    buttonGroup1Layout->addLayout( layout5, 0, 0 );

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

    textLabel1_2 = new TQLabel( buttonGroup1, "textLabel1_2" );
    layout4->addWidget( textLabel1_2 );

    interfaceSkinBox = new TQComboBox( false, buttonGroup1, "interfaceSkinBox" );
    layout4->addWidget( interfaceSkinBox );

    buttonGroup1Layout->addLayout( layout4, 1, 0 );

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

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

    textLabel5 = new TQLabel( buttonGroup1, "textLabel5" );
    layout5_2->addWidget( textLabel5 );

    username = new KLineEdit( buttonGroup1, "username" );
    layout5_2->addWidget( username );

    layout6->addLayout( layout5_2, 0, 0 );

    btnPassword = new TQPushButton( buttonGroup1, "btnPassword" );

    layout6->addWidget( btnPassword, 0, 1 );

    buttonGroup1Layout->addLayout( layout6, 3, 0 );

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

    textLabel2 = new TQLabel( buttonGroup1, "textLabel2" );
    layout7->addWidget( textLabel2 );

    phpExecutablePath = new KURLRequester( buttonGroup1, "phpExecutablePath" );
    layout7->addWidget( phpExecutablePath );

    kled = new KLed( buttonGroup1, "kled" );
    layout7->addWidget( kled );

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

    WebInterfacePreferenceLayout->addWidget( buttonGroup1, 0, 0 );
    languageChange();
    resize( TQSize(666, 883).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( btnPassword, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnUpdate_clicked() ) );
    connect( phpExecutablePath, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( changeLedState() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void WebInterfacePreference::languageChange()
{
    setCaption( tr2i18n( "Search Preferences" ) );
    buttonGroup1->setTitle( tr2i18n( "Web Server" ) );
    textLabel1->setText( tr2i18n( "Port:" ) );
    forward->setText( tr2i18n( "Forward port" ) );
    textLabel4->setText( tr2i18n( "Session TTL (in sec):" ) );
    textLabel1_2->setText( tr2i18n( "Select interface:" ) );
    textLabel5->setText( tr2i18n( "Username:" ) );
    btnPassword->setText( tr2i18n( "Change password ..." ) );
    textLabel2->setText( tr2i18n( "Php executable path:" ) );
    TQToolTip::add( kled, TQString::null );
}

void WebInterfacePreference::btnUpdate_clicked()
{
    tqWarning( "WebInterfacePreference::btnUpdate_clicked(): Not implemented yet" );
}

void WebInterfacePreference::changeLedState()
{
    tqWarning( "WebInterfacePreference::changeLedState(): Not implemented yet" );
}

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

TQMetaObject *WebInterfacePreference::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_WebInterfacePreference( "WebInterfacePreference", &WebInterfacePreference::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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