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

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

#include "adapterdialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqslider.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a AdapterDialog as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
AdapterDialog::AdapterDialog( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "AdapterDialog" );
    AdapterDialogLayout = new TQVBoxLayout( this, 11, 6, "AdapterDialogLayout"); 

    groupBoxSettings = new TQGroupBox( this, "groupBoxSettings" );
    groupBoxSettings->setGeometry( TQRect( 21, 21, 360, 218 ) );
    groupBoxSettings->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, groupBoxSettings->sizePolicy().hasHeightForWidth() ) );
    groupBoxSettings->setMinimumSize( TQSize( 360, 0 ) );
    TQFont groupBoxSettings_font(  groupBoxSettings->font() );
    groupBoxSettings->setFont( groupBoxSettings_font ); 
    groupBoxSettings->setColumnLayout(0, TQt::Vertical );
    groupBoxSettings->layout()->setSpacing( 6 );
    groupBoxSettings->layout()->setMargin( 11 );
    groupBoxSettingsLayout = new TQHBoxLayout( groupBoxSettings->layout() );
    groupBoxSettingsLayout->setAlignment( TQt::AlignTop );

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

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

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

    textLabel10 = new TQLabel( groupBoxSettings, "textLabel10" );
    TQFont textLabel10_font(  textLabel10->font() );
    textLabel10->setFont( textLabel10_font ); 
    layoutName->addWidget( textLabel10 );

    adapterName = new TQLineEdit( groupBoxSettings, "adapterName" );
    TQFont adapterName_font(  adapterName->font() );
    adapterName->setFont( adapterName_font ); 
    layoutName->addWidget( adapterName );
    layout13->addLayout( layoutName );

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

    textLabel1 = new TQLabel( groupBoxSettings, "textLabel1" );
    TQFont textLabel1_font(  textLabel1->font() );
    textLabel1->setFont( textLabel1_font ); 
    layout12->addWidget( textLabel1 );

    deviceModes = new TQComboBox( false, groupBoxSettings, "deviceModes" );
    TQFont deviceModes_font(  deviceModes->font() );
    deviceModes->setFont( deviceModes_font ); 
    layout12->addWidget( deviceModes );
    layout13->addLayout( layout12 );

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

    textLabel9 = new TQLabel( groupBoxSettings, "textLabel9" );
    TQFont textLabel9_font(  textLabel9->font() );
    textLabel9->setFont( textLabel9_font ); 
    layout10->addWidget( textLabel9 );

    timeout = new TQLabel( groupBoxSettings, "timeout" );
    TQFont timeout_font(  timeout->font() );
    timeout->setFont( timeout_font ); 
    timeout->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    layout10->addWidget( timeout );
    layout13->addLayout( layout10 );

    sliderTimeout = new TQSlider( groupBoxSettings, "sliderTimeout" );
    sliderTimeout->setPaletteForegroundColor( TQColor( 0, 0, 0 ) );
    sliderTimeout->setMinValue( 60 );
    sliderTimeout->setMaxValue( 900 );
    sliderTimeout->setLineStep( 60 );
    sliderTimeout->setPageStep( 120 );
    sliderTimeout->setOrientation( TQSlider::Horizontal );
    sliderTimeout->setTickmarks( TQSlider::NoMarks );
    layout13->addWidget( sliderTimeout );
    layout11->addLayout( layout13 );

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

    textLabel1_2 = new TQLabel( groupBoxSettings, "textLabel1_2" );
    TQFont textLabel1_2_font(  textLabel1_2->font() );
    textLabel1_2->setFont( textLabel1_2_font ); 
    layout8->addWidget( textLabel1_2 );

    deviceClass = new TQComboBox( false, groupBoxSettings, "deviceClass" );
    TQFont deviceClass_font(  deviceClass->font() );
    deviceClass->setFont( deviceClass_font ); 
    layout8->addWidget( deviceClass );
    layout11->addLayout( layout8 );
    groupBoxSettingsLayout->addLayout( layout11 );
    AdapterDialogLayout->addWidget( groupBoxSettings );

    groupBoxInfo = new TQGroupBox( this, "groupBoxInfo" );
    groupBoxInfo->setGeometry( TQRect( 21, 245, 360, 131 ) );
    groupBoxInfo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, groupBoxInfo->sizePolicy().hasHeightForWidth() ) );
    groupBoxInfo->setMinimumSize( TQSize( 360, 0 ) );
    TQFont groupBoxInfo_font(  groupBoxInfo->font() );
    groupBoxInfo->setFont( groupBoxInfo_font ); 
    groupBoxInfo->setColumnLayout(0, TQt::Vertical );
    groupBoxInfo->layout()->setSpacing( 6 );
    groupBoxInfo->layout()->setMargin( 11 );
    groupBoxInfoLayout = new TQVBoxLayout( groupBoxInfo->layout() );
    groupBoxInfoLayout->setAlignment( TQt::AlignTop );

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

    macLabel = new TQLabel( groupBoxInfo, "macLabel" );
    macLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, macLabel->sizePolicy().hasHeightForWidth() ) );
    TQFont macLabel_font(  macLabel->font() );
    macLabel->setFont( macLabel_font ); 
    macLabel->setAlignment( int( TQLabel::AlignTop ) );
    layout14->addWidget( macLabel );

    verLabel = new TQLabel( groupBoxInfo, "verLabel" );
    TQFont verLabel_font(  verLabel->font() );
    verLabel->setFont( verLabel_font ); 
    layout14->addWidget( verLabel );
    groupBoxInfoLayout->addLayout( layout14 );
    AdapterDialogLayout->addWidget( groupBoxInfo );
    languageChange();
    resize( TQSize(404, 385).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AdapterDialog::languageChange()
{
    setCaption( tr2i18n( "AdapterDialog" ) );
    groupBoxSettings->setTitle( tr2i18n( "Device Settings" ) );
    textLabel10->setText( tr2i18n( "Adapter Name:" ) );
    textLabel1->setText( tr2i18n( "Mode:" ) );
    deviceModes->setCurrentItem( 0 );
    textLabel9->setText( tr2i18n( "Discoverable Timeout:" ) );
    timeout->setText( TQString::null );
    TQToolTip::add( sliderTimeout, tr2i18n( "Timeout after the adapter gets invisible" ) );
    textLabel1_2->setText( tr2i18n( "Class of Device:" ) );
    deviceClass->clear();
    deviceClass->insertItem( tr2i18n( "Unspecified" ) );
    deviceClass->insertItem( tr2i18n( "Desktop" ) );
    deviceClass->insertItem( tr2i18n( "Laptop" ) );
    groupBoxInfo->setTitle( tr2i18n( "Device Information" ) );
    macLabel->setText( TQString::null );
    verLabel->setText( TQString::null );
}

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

TQMetaObject *AdapterDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AdapterDialog( "AdapterDialog", &AdapterDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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