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

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

#include "dlglimitsbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <knuminput.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a DlgLimitsBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
DlgLimitsBase::DlgLimitsBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "DlgLimitsBase" );
    DlgLimitsBaseLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "DlgLimitsBaseLayout"); 

    gb_limits = new TQGroupBox( this, "gb_limits" );
    gb_limits->setColumnLayout(0, TQt::Vertical );
    gb_limits->layout()->setSpacing( KDialog::spacingHint() );
    gb_limits->layout()->setMargin( KDialog::marginHint() );
    gb_limitsLayout = new TQGridLayout( gb_limits->layout() );
    gb_limitsLayout->setAlignment( TQt::AlignTop );

    lbl_maxnum = new TQLabel( gb_limits, "lbl_maxnum" );

    gb_limitsLayout->addMultiCellWidget( lbl_maxnum, 0, 1, 0, 0 );

    lb_minband = new TQLabel( gb_limits, "lb_minband" );

    gb_limitsLayout->addWidget( lb_minband, 2, 0 );

    lb_maxband = new TQLabel( gb_limits, "lb_maxband" );

    gb_limitsLayout->addWidget( lb_maxband, 3, 0 );

    le_maxnum = new KIntSpinBox( gb_limits, "le_maxnum" );
    le_maxnum->setMinValue( 1 );

    gb_limitsLayout->addWidget( le_maxnum, 0, 2 );

    le_minband = new KIntSpinBox( gb_limits, "le_minband" );
    le_minband->setMaxValue( 100000 );
    le_minband->setMinValue( 100 );
    le_minband->setLineStep( 100 );

    gb_limitsLayout->addMultiCellWidget( le_minband, 1, 2, 2, 2 );

    le_maxband = new KIntSpinBox( gb_limits, "le_maxband" );
    le_maxband->setMaxValue( 100000 );
    le_maxband->setMinValue( 100 );
    le_maxband->setLineStep( 100 );

    gb_limitsLayout->addWidget( le_maxband, 3, 2 );
    spacer19 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    gb_limitsLayout->addItem( spacer19, 0, 1 );
    spacer20 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    gb_limitsLayout->addItem( spacer20, 2, 1 );
    spacer21 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    gb_limitsLayout->addItem( spacer21, 3, 1 );
    DlgLimitsBaseLayout->addWidget( gb_limits );
    languageChange();
    resize( TQSize(568, 141).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( le_maxband, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( slotChanged() ) );
    connect( le_maxnum, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( slotChanged() ) );
    connect( le_minband, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( slotChanged() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DlgLimitsBase::languageChange()
{
    gb_limits->setTitle( tr2i18n( "Limits Options" ) );
    lbl_maxnum->setText( tr2i18n( "Maximum open connections:" ) );
    lb_minband->setText( tr2i18n( "Minimum network bandwidth:" ) );
    lb_maxband->setText( tr2i18n( "Maximum network bandwidth:" ) );
    le_minband->setSuffix( tr2i18n( " bytes/sec" ) );
    le_maxband->setSuffix( tr2i18n( " bytes/sec" ) );
}

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

TQMetaObject *DlgLimitsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DlgLimitsBase( "DlgLimitsBase", &DlgLimitsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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