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

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

#include "base_k3bcddboptiontab.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <knuminput.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqcheckbox.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqtoolbutton.h>
#include <ntqcombobox.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    m_mainTabbed = new TQTabWidget( this, "m_mainTabbed" );
    m_mainTabbed->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, m_mainTabbed->sizePolicy().hasHeightForWidth() ) );

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

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

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

    m_checkSaveLocalEntries = new TQCheckBox( tab, "m_checkSaveLocalEntries" );
    m_checkSaveLocalEntries->setEnabled( false );

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

    m_boxLocalDirectory = new TQFrame( tab, "m_boxLocalDirectory" );
    m_boxLocalDirectory->setEnabled( false );
    m_boxLocalDirectory->setFrameShape( TQFrame::NoFrame );
    m_boxLocalDirectory->setFrameShadow( TQFrame::Raised );
    m_boxLocalDirectory->setLineWidth( 0 );
    m_boxLocalDirectoryLayout = new TQGridLayout( m_boxLocalDirectory, 1, 1, 0, 6, "m_boxLocalDirectoryLayout"); 

    TextLabel1_4 = new TQLabel( m_boxLocalDirectory, "TextLabel1_4" );

    m_boxLocalDirectoryLayout->addWidget( TextLabel1_4, 0, 0 );

    m_viewLocalDir = new TDEListView( m_boxLocalDirectory, "m_viewLocalDir" );
    m_viewLocalDir->addColumn( tr2i18n( "Directory" ) );
    m_viewLocalDir->header()->setClickEnabled( false, m_viewLocalDir->header()->count() - 1 );
    m_viewLocalDir->setFullWidth( true );

    m_boxLocalDirectoryLayout->addMultiCellWidget( m_viewLocalDir, 1, 4, 0, 1 );

    m_buttonLocalDirDown = new TQToolButton( m_boxLocalDirectory, "m_buttonLocalDirDown" );
    m_buttonLocalDirDown->setAutoRaise( true );

    m_boxLocalDirectoryLayout->addWidget( m_buttonLocalDirDown, 3, 2 );

    m_buttonAddLocalDir = new TQToolButton( m_boxLocalDirectory, "m_buttonAddLocalDir" );
    m_buttonAddLocalDir->setAutoRaise( true );

    m_boxLocalDirectoryLayout->addWidget( m_buttonAddLocalDir, 0, 2 );

    m_editLocalDir = new KLineEdit( m_boxLocalDirectory, "m_editLocalDir" );

    m_boxLocalDirectoryLayout->addWidget( m_editLocalDir, 0, 1 );

    m_buttonRemoveLocalDir = new TQToolButton( m_boxLocalDirectory, "m_buttonRemoveLocalDir" );
    m_buttonRemoveLocalDir->setAutoRaise( true );

    m_boxLocalDirectoryLayout->addWidget( m_buttonRemoveLocalDir, 1, 2 );

    m_buttonLocalDirUp = new TQToolButton( m_boxLocalDirectory, "m_buttonLocalDirUp" );
    m_buttonLocalDirUp->setAutoRaise( true );

    m_boxLocalDirectoryLayout->addWidget( m_buttonLocalDirUp, 2, 2 );
    Spacer11_2 = new TQSpacerItem( 20, 51, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    m_boxLocalDirectoryLayout->addItem( Spacer11_2, 4, 2 );

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

    tab_2 = new TQWidget( m_mainTabbed, "tab_2" );
    tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 

    m_boxCddbServer = new TQFrame( tab_2, "m_boxCddbServer" );
    m_boxCddbServer->setEnabled( false );
    m_boxCddbServer->setFrameShape( TQFrame::NoFrame );
    m_boxCddbServer->setFrameShadow( TQFrame::Raised );
    m_boxCddbServer->setLineWidth( 0 );
    m_boxCddbServerLayout = new TQGridLayout( m_boxCddbServer, 1, 1, 0, 6, "m_boxCddbServerLayout"); 

    TextLabel1 = new TQLabel( m_boxCddbServer, "TextLabel1" );

    m_boxCddbServerLayout->addWidget( TextLabel1, 0, 0 );

    m_comboCddbType = new TQComboBox( false, m_boxCddbServer, "m_comboCddbType" );

    m_boxCddbServerLayout->addWidget( m_comboCddbType, 0, 1 );

    m_viewCddbServer = new TDEListView( m_boxCddbServer, "m_viewCddbServer" );
    m_viewCddbServer->addColumn( tr2i18n( "Type" ) );
    m_viewCddbServer->header()->setClickEnabled( false, m_viewCddbServer->header()->count() - 1 );
    m_viewCddbServer->addColumn( tr2i18n( "Server" ) );
    m_viewCddbServer->header()->setClickEnabled( false, m_viewCddbServer->header()->count() - 1 );
    m_viewCddbServer->addColumn( tr2i18n( "Port" ) );
    m_viewCddbServer->header()->setClickEnabled( false, m_viewCddbServer->header()->count() - 1 );
    m_viewCddbServer->setAllColumnsShowFocus( true );
    m_viewCddbServer->setFullWidth( true );

    m_boxCddbServerLayout->addMultiCellWidget( m_viewCddbServer, 1, 4, 0, 3 );

    m_editCddbServer = new KLineEdit( m_boxCddbServer, "m_editCddbServer" );

    m_boxCddbServerLayout->addWidget( m_editCddbServer, 0, 2 );

    m_editCddbPort = new KIntNumInput( m_boxCddbServer, "m_editCddbPort" );
    m_editCddbPort->setValue( 80 );
    m_editCddbPort->setMinValue( 0 );
    m_editCddbPort->setMaxValue( 64000 );

    m_boxCddbServerLayout->addWidget( m_editCddbPort, 0, 3 );

    m_buttonAddCddbServer = new TQToolButton( m_boxCddbServer, "m_buttonAddCddbServer" );
    m_buttonAddCddbServer->setAutoRaise( true );

    m_boxCddbServerLayout->addWidget( m_buttonAddCddbServer, 0, 4 );

    m_buttonRemoveCddbServer = new TQToolButton( m_boxCddbServer, "m_buttonRemoveCddbServer" );
    m_buttonRemoveCddbServer->setAutoRaise( true );

    m_boxCddbServerLayout->addWidget( m_buttonRemoveCddbServer, 1, 4 );

    m_buttonCddbServerUp = new TQToolButton( m_boxCddbServer, "m_buttonCddbServerUp" );
    m_buttonCddbServerUp->setAutoRaise( true );

    m_boxCddbServerLayout->addWidget( m_buttonCddbServerUp, 2, 4 );

    m_buttonCddbServerDown = new TQToolButton( m_boxCddbServer, "m_buttonCddbServerDown" );
    m_buttonCddbServerDown->setAutoRaise( true );

    m_boxCddbServerLayout->addWidget( m_buttonCddbServerDown, 3, 4 );
    Spacer10 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    m_boxCddbServerLayout->addItem( Spacer10, 4, 4 );

    tabLayout_2->addWidget( m_boxCddbServer, 1, 0 );

    m_checkRemoteCddb = new TQCheckBox( tab_2, "m_checkRemoteCddb" );

    tabLayout_2->addWidget( m_checkRemoteCddb, 0, 0 );
    m_mainTabbed->insertTab( tab_2, TQString::fromLatin1("") );

    tab_3 = new TQWidget( m_mainTabbed, "tab_3" );
    tabLayout_3 = new TQVBoxLayout( tab_3, 11, 6, "tabLayout_3"); 

    m_groupCgi = new TQGroupBox( tab_3, "m_groupCgi" );
    m_groupCgi->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, m_groupCgi->sizePolicy().hasHeightForWidth() ) );
    m_groupCgi->setColumnLayout(0, TQt::Vertical );
    m_groupCgi->layout()->setSpacing( 6 );
    m_groupCgi->layout()->setMargin( 11 );
    m_groupCgiLayout = new TQGridLayout( m_groupCgi->layout() );
    m_groupCgiLayout->setAlignment( TQt::AlignTop );

    m_editManualCgiPath = new KLineEdit( m_groupCgi, "m_editManualCgiPath" );
    m_editManualCgiPath->setEnabled( false );

    m_groupCgiLayout->addWidget( m_editManualCgiPath, 2, 1 );

    TextLabel3 = new TQLabel( m_groupCgi, "TextLabel3" );
    TextLabel3->setEnabled( false );

    m_groupCgiLayout->addWidget( TextLabel3, 2, 0 );

    m_checkManualCgiPath = new TQCheckBox( m_groupCgi, "m_checkManualCgiPath" );

    m_groupCgiLayout->addMultiCellWidget( m_checkManualCgiPath, 1, 1, 0, 1 );
    tabLayout_3->addWidget( m_groupCgi );
    spacer5 = new TQSpacerItem( 31, 151, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_3->addItem( spacer5 );
    m_mainTabbed->insertTab( tab_3, TQString::fromLatin1("") );
    base_K3bCddbOptionTabLayout->addWidget( m_mainTabbed );
    languageChange();
    resize( TQSize(648, 553).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_checkManualCgiPath, TQ_SIGNAL( toggled(bool) ), m_editManualCgiPath, TQ_SLOT( setEnabled(bool) ) );
    connect( m_checkManualCgiPath, TQ_SIGNAL( toggled(bool) ), TextLabel3, TQ_SLOT( setEnabled(bool) ) );
    connect( m_checkUseLocalCddb, TQ_SIGNAL( toggled(bool) ), m_boxLocalDirectory, TQ_SLOT( setEnabled(bool) ) );
    connect( m_checkUseLocalCddb, TQ_SIGNAL( toggled(bool) ), m_checkSaveLocalEntries, TQ_SLOT( setEnabled(bool) ) );
    connect( m_checkRemoteCddb, TQ_SIGNAL( toggled(bool) ), m_boxCddbServer, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( m_mainTabbed, m_checkUseLocalCddb );
    setTabOrder( m_checkUseLocalCddb, m_checkSaveLocalEntries );
    setTabOrder( m_checkSaveLocalEntries, m_editLocalDir );
    setTabOrder( m_editLocalDir, m_viewLocalDir );
    setTabOrder( m_viewLocalDir, m_checkRemoteCddb );
    setTabOrder( m_checkRemoteCddb, m_comboCddbType );
    setTabOrder( m_comboCddbType, m_editCddbServer );
    setTabOrder( m_editCddbServer, m_editCddbPort );
    setTabOrder( m_editCddbPort, m_viewCddbServer );
    setTabOrder( m_viewCddbServer, m_checkManualCgiPath );
    setTabOrder( m_checkManualCgiPath, m_editManualCgiPath );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void base_K3bCddbOptionTab::languageChange()
{
    setCaption( tr2i18n( "CDDB Options" ) );
    m_checkUseLocalCddb->setText( tr2i18n( "Use local CDDB directory" ) );
    m_checkSaveLocalEntries->setText( tr2i18n( "Save entries in local directory (the first directory in the list)" ) );
    TextLabel1_4->setText( tr2i18n( "Directory:" ) );
    m_viewLocalDir->header()->setLabel( 0, tr2i18n( "Directory" ) );
    m_buttonLocalDirDown->setText( TQString::null );
    TQToolTip::add( m_buttonLocalDirDown, tr2i18n( "Move directory down" ) );
    m_buttonAddLocalDir->setText( TQString::null );
    TQToolTip::add( m_buttonAddLocalDir, tr2i18n( "Add directory" ) );
    m_editLocalDir->setText( TQString::null );
    m_buttonRemoveLocalDir->setText( TQString::null );
    TQToolTip::add( m_buttonRemoveLocalDir, tr2i18n( "Remove directory" ) );
    m_buttonLocalDirUp->setText( TQString::null );
    TQToolTip::add( m_buttonLocalDirUp, tr2i18n( "Move directory up" ) );
    m_mainTabbed->changeTab( tab, tr2i18n( "Local" ) );
    TextLabel1->setText( tr2i18n( "Server:" ) );
    m_viewCddbServer->header()->setLabel( 0, tr2i18n( "Type" ) );
    m_viewCddbServer->header()->setLabel( 1, tr2i18n( "Server" ) );
    m_viewCddbServer->header()->setLabel( 2, tr2i18n( "Port" ) );
    m_editCddbServer->setText( TQString::null );
    m_editCddbPort->setLabel( TQString::null );
    m_editCddbPort->setPrefix( tr2i18n( "Port " ) );
    m_buttonAddCddbServer->setText( TQString::null );
    TQToolTip::add( m_buttonAddCddbServer, tr2i18n( "Add server" ) );
    m_buttonRemoveCddbServer->setText( TQString::null );
    TQToolTip::add( m_buttonRemoveCddbServer, tr2i18n( "Remove server" ) );
    m_buttonCddbServerUp->setText( TQString::null );
    TQToolTip::add( m_buttonCddbServerUp, tr2i18n( "Move server up" ) );
    m_buttonCddbServerDown->setText( TQString::null );
    TQToolTip::add( m_buttonCddbServerDown, tr2i18n( "Move server down" ) );
    m_checkRemoteCddb->setText( tr2i18n( "Enable remote CDDB queries" ) );
    m_mainTabbed->changeTab( tab_2, tr2i18n( "Remote" ) );
    m_groupCgi->setTitle( tr2i18n( "CGI Path" ) );
    m_editManualCgiPath->setText( tr2i18n( "~/cddb/cddb.cgi" ) );
    TextLabel3->setText( tr2i18n( "Path:" ) );
    m_checkManualCgiPath->setText( tr2i18n( "Manual CGI path" ) );
    m_mainTabbed->changeTab( tab_3, tr2i18n( "Advanced" ) );
}

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

TQMetaObject *base_K3bCddbOptionTab::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_base_K3bCddbOptionTab( "base_K3bCddbOptionTab", &base_K3bCddbOptionTab::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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