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

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

#include "sfprefwidgetbase.h"

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

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

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

    use1 = new TQCheckBox( this, "use1" );
    layout16->addWidget( use1 );

    use2 = new TQCheckBox( this, "use2" );
    layout16->addWidget( use2 );

    use3 = new TQCheckBox( this, "use3" );
    layout16->addWidget( use3 );

    SfPrefPageWidgetBaseLayout->addLayout( layout16, 0, 0 );

    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 );

    moveCheck = new TQCheckBox( buttonGroup1, "moveCheck" );

    buttonGroup1Layout->addWidget( moveCheck, 2, 0 );

    openSilently = new TQCheckBox( buttonGroup1, "openSilently" );

    buttonGroup1Layout->addWidget( openSilently, 0, 0 );

    deleteCheck = new TQCheckBox( buttonGroup1, "deleteCheck" );

    buttonGroup1Layout->addWidget( deleteCheck, 1, 0 );

    SfPrefPageWidgetBaseLayout->addWidget( buttonGroup1, 3, 0 );

    groupBox9 = new TQGroupBox( this, "groupBox9" );
    groupBox9->setColumnLayout(0, TQt::Vertical );
    groupBox9->layout()->setSpacing( 6 );
    groupBox9->layout()->setMargin( 11 );
    groupBox9Layout = new TQGridLayout( groupBox9->layout() );
    groupBox9Layout->setAlignment( TQt::AlignTop );

    url1 = new KURLRequester( groupBox9, "url1" );
    url1->setEnabled( false );

    groupBox9Layout->addWidget( url1, 0, 1 );

    url2 = new KURLRequester( groupBox9, "url2" );
    url2->setEnabled( false );

    groupBox9Layout->addWidget( url2, 1, 1 );

    url3 = new KURLRequester( groupBox9, "url3" );
    url3->setEnabled( false );

    groupBox9Layout->addWidget( url3, 2, 1 );

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

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

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

    groupBox9Layout->addWidget( textLabel2, 1, 0 );

    textLabel3 = new TQLabel( groupBox9, "textLabel3" );

    groupBox9Layout->addWidget( textLabel3, 2, 0 );

    SfPrefPageWidgetBaseLayout->addWidget( groupBox9, 2, 0 );
    spacer6 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    SfPrefPageWidgetBaseLayout->addItem( spacer6, 1, 0 );
    spacer4 = new TQSpacerItem( 20, 90, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    SfPrefPageWidgetBaseLayout->addItem( spacer4, 4, 0 );
    languageChange();
    resize( TQSize(546, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( use1, TQ_SIGNAL( toggled(bool) ), url1, TQ_SLOT( setEnabled(bool) ) );
    connect( use2, TQ_SIGNAL( toggled(bool) ), url2, TQ_SLOT( setEnabled(bool) ) );
    connect( use3, TQ_SIGNAL( toggled(bool) ), url3, TQ_SLOT( setEnabled(bool) ) );
    connect( deleteCheck, TQ_SIGNAL( toggled(bool) ), moveCheck, TQ_SLOT( setDisabled(bool) ) );
    connect( moveCheck, TQ_SIGNAL( toggled(bool) ), deleteCheck, TQ_SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( use1, use2 );
    setTabOrder( use2, use3 );
    setTabOrder( use3, url1 );
    setTabOrder( url1, url2 );
    setTabOrder( url2, url3 );
    setTabOrder( url3, openSilently );
    setTabOrder( openSilently, deleteCheck );
    setTabOrder( deleteCheck, moveCheck );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SfPrefPageWidgetBase::languageChange()
{
    setCaption( tr2i18n( "ScanFolder Preferences" ) );
    use1->setText( tr2i18n( "Scan folder &1" ) );
    use2->setText( tr2i18n( "Scan folder &2" ) );
    use3->setText( tr2i18n( "Scan folder &3" ) );
    buttonGroup1->setTitle( tr2i18n( "Options" ) );
    moveCheck->setText( tr2i18n( "Move to \"loaded\" directory &after loading" ) );
    TQToolTip::add( moveCheck, tr2i18n( "Move torrent to \"loaded\" directory after loading it" ) );
    openSilently->setText( tr2i18n( "Open torrents silentl&y" ) );
    TQToolTip::add( openSilently, tr2i18n( "Do not show 'Select files to download' dialog" ) );
    deleteCheck->setText( tr2i18n( "Delete after loadin&g" ) );
    TQToolTip::add( deleteCheck, tr2i18n( "Deletes torrent after loading" ) );
    groupBox9->setTitle( tr2i18n( "Folders to scan" ) );
    textLabel1->setText( tr2i18n( "Folder 1:" ) );
    textLabel2->setText( tr2i18n( "Folder 2:" ) );
    textLabel3->setText( tr2i18n( "Folder 3:" ) );
}

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

TQMetaObject *SfPrefPageWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SfPrefPageWidgetBase( "SfPrefPageWidgetBase", &SfPrefPageWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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