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

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

#include "genericmediadeviceconfigdialog.h"

#include <ntqvariant.h>
#include <metabundle.h>
#include <qstringx.h>
#include <collectionbrowser.h>
#include <kactivelabel.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlistbox.h>
#include <ntqcombobox.h>
#include <ntqcheckbox.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "genericmediadeviceconfigdialog.ui.h"

/*
 *  Constructs a GenericMediaDeviceConfigDialog as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
GenericMediaDeviceConfigDialog::GenericMediaDeviceConfigDialog( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "GenericMediaDeviceConfigDialog" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    GenericMediaDeviceConfigDialogLayout = new TQGridLayout( this, 1, 1, 0, 0, "GenericMediaDeviceConfigDialogLayout"); 

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

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)3, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) );
    groupBox1->setFrameShape( TQGroupBox::GroupBoxPanel );
    groupBox1->setFrameShadow( TQGroupBox::Sunken );
    groupBox1->setFlat( false );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );
    textLabel2->setFrameShape( TQLabel::NoFrame );
    textLabel2->setFrameShadow( TQLabel::Plain );

    groupBox1Layout->addWidget( textLabel2, 0, 0 );

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

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

    m_supportedListBox = new TQListBox( groupBox1, "m_supportedListBox" );
    m_supportedListBox->setSelectionMode( TQListBox::Multi );
    layout23->addWidget( m_supportedListBox );

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    layout23->addWidget( textLabel1 );
    layout24->addLayout( layout23 );

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

    m_addSupportedButton = new TQPushButton( groupBox1, "m_addSupportedButton" );
    layout19->addWidget( m_addSupportedButton );

    m_removeSupportedButton = new TQPushButton( groupBox1, "m_removeSupportedButton" );
    layout19->addWidget( m_removeSupportedButton );
    spacer1 = new TQSpacerItem( 20, 93, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout19->addItem( spacer1 );

    m_convertComboBox = new TQComboBox( false, groupBox1, "m_convertComboBox" );
    m_convertComboBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_convertComboBox->sizePolicy().hasHeightForWidth() ) );
    layout19->addWidget( m_convertComboBox );
    layout24->addLayout( layout19 );

    groupBox1Layout->addLayout( layout24, 1, 0 );
    layout88->addWidget( groupBox1 );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, groupBox2->sizePolicy().hasHeightForWidth() ) );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQGridLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

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

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

    m_ignoreTheCheck = new TQCheckBox( groupBox2, "m_ignoreTheCheck" );

    layout119->addWidget( m_ignoreTheCheck, 1, 1 );

    m_spaceCheck = new TQCheckBox( groupBox2, "m_spaceCheck" );

    layout119->addWidget( m_spaceCheck, 1, 0 );

    m_asciiCheck = new TQCheckBox( groupBox2, "m_asciiCheck" );

    layout119->addWidget( m_asciiCheck, 0, 0 );

    m_vfatCheck = new TQCheckBox( groupBox2, "m_vfatCheck" );

    layout119->addWidget( m_vfatCheck, 0, 1 );
    layout120->addLayout( layout119 );

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

    textLabel1_2_2 = new TQLabel( groupBox2, "textLabel1_2_2" );
    layout96->addWidget( textLabel1_2_2 );

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

    m_songLocationBox = new TQLineEdit( groupBox2, "m_songLocationBox" );
    layout86->addWidget( m_songLocationBox );

    m_formatHelp = new KActiveLabel( groupBox2, "m_formatHelp" );
    m_formatHelp->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)7, 0, 0, m_formatHelp->sizePolicy().hasHeightForWidth() ) );
    layout86->addWidget( m_formatHelp );
    layout96->addLayout( layout86 );

    textLabel2_2 = new TQLabel( groupBox2, "textLabel2_2" );
    layout96->addWidget( textLabel2_2 );

    m_previewLabel = new TQLabel( groupBox2, "m_previewLabel" );
    m_previewLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, m_previewLabel->sizePolicy().hasHeightForWidth() ) );
    m_previewLabel->setFrameShape( TQLabel::StyledPanel );
    m_previewLabel->setFrameShadow( TQLabel::Plain );
    m_previewLabel->setMargin( 2 );
    layout96->addWidget( m_previewLabel );

    textLabel2_2_2 = new TQLabel( groupBox2, "textLabel2_2_2" );
    layout96->addWidget( textLabel2_2_2 );

    m_podcastLocationBox = new TQLineEdit( groupBox2, "m_podcastLocationBox" );
    layout96->addWidget( m_podcastLocationBox );
    layout120->addLayout( layout96 );

    groupBox2Layout->addLayout( layout120, 0, 0 );
    layout88->addWidget( groupBox2 );

    GenericMediaDeviceConfigDialogLayout->addLayout( layout88, 0, 0 );
    languageChange();
    resize( TQSize(486, 577).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_removeSupportedButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( removeSupportedButtonClicked() ) );
    connect( m_supportedListBox, TQ_SIGNAL( doubleClicked(TQListBoxItem*) ), this, TQ_SLOT( supportedListBoxDoubleClicked(TQListBoxItem*) ) );
    connect( m_songLocationBox, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( updatePreviewLabel(const TQString&) ) );
    connect( m_asciiCheck, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( updatePreviewLabel() ) );
    connect( m_spaceCheck, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( updatePreviewLabel() ) );
    connect( m_ignoreTheCheck, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( updatePreviewLabel() ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GenericMediaDeviceConfigDialog::languageChange()
{
    setCaption( tr2i18n( "GenericMediaDeviceConfigDialog1" ) );
    groupBox1->setTitle( tr2i18n( "Transferring files to media device" ) );
    textLabel2->setText( tr2i18n( "The following formats will be transferred directly:" ) );
    TQToolTip::add( m_supportedListBox, tr2i18n( "The formats supported by the generic media device." ) );
    textLabel1->setText( tr2i18n( "Other formats will be converted to:" ) );
    m_addSupportedButton->setText( tr2i18n( "&Add format..." ) );
    TQToolTip::add( m_addSupportedButton, tr2i18n( "Add the above format to the list." ) );
    m_removeSupportedButton->setText( tr2i18n( "Remove selected" ) );
    TQToolTip::add( m_removeSupportedButton, tr2i18n( "Remove the selected formats from the list." ) );
    TQToolTip::add( m_convertComboBox, tr2i18n( "The preferred format for transcoding files." ) );
    groupBox2->setTitle( tr2i18n( "Transfered files locations" ) );
    m_ignoreTheCheck->setText( tr2i18n( "Ig&nore \"The\"" ) );
    m_spaceCheck->setText( tr2i18n( "Convert spaces" ) );
    m_asciiCheck->setText( tr2i18n( "ASCII te&xt" ) );
    m_vfatCheck->setText( tr2i18n( "Always use &VFAT-safe names" ) );
    TQToolTip::add( m_vfatCheck, tr2i18n( "Always use VFAT-safe names even on devices with non-VFAT filesystems." ) );
    textLabel1_2_2->setText( tr2i18n( "Song location:" ) );
    m_songLocationBox->setText( TQString::null );
    TQToolTip::add( m_songLocationBox, tr2i18n( "The location of the transfered songs relative to the device mount point." ) );
    m_formatHelp->setText( tr2i18n( "<p align=\"center\">(help)</p>" ) );
    textLabel2_2->setText( tr2i18n( "Example song location:" ) );
    m_previewLabel->setText( TQString::null );
    textLabel2_2_2->setText( tr2i18n( "Podcast location:" ) );
    m_podcastLocationBox->setText( TQString::null );
    TQToolTip::add( m_podcastLocationBox, tr2i18n( "The location of the transfered podcasts relative to the device mount point." ) );
}

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

TQMetaObject *GenericMediaDeviceConfigDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_GenericMediaDeviceConfigDialog( "GenericMediaDeviceConfigDialog", &GenericMediaDeviceConfigDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* GenericMediaDeviceConfigDialog::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 TQUParameter param_slot_0[] = {
	{ "id", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"addSupportedButtonClicked", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"removeSupportedButtonClicked", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ "item", &static_QUType_ptr, "TQListBoxItem", TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"supportedListBoxDoubleClicked", 1, param_slot_2 };
    static const TQUMethod slot_3 = {"updatePreviewLabel", 0, 0 };
    static const TQUParameter param_slot_4[] = {
	{ "format", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_4 = {"updatePreviewLabel", 1, param_slot_4 };
    static const TQUMethod slot_5 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "addSupportedButtonClicked(int)", &slot_0, TQMetaData::Public },
	{ "removeSupportedButtonClicked()", &slot_1, TQMetaData::Public },
	{ "supportedListBoxDoubleClicked(TQListBoxItem*)", &slot_2, TQMetaData::Public },
	{ "updatePreviewLabel()", &slot_3, TQMetaData::Public },
	{ "updatePreviewLabel(const TQString&)", &slot_4, TQMetaData::Public },
	{ "languageChange()", &slot_5, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"GenericMediaDeviceConfigDialog", parentObject,
	slot_tbl, 6,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_GenericMediaDeviceConfigDialog.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool GenericMediaDeviceConfigDialog::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: addSupportedButtonClicked((int)static_QUType_int.get(_o+1)); break;
    case 1: removeSupportedButtonClicked(); break;
    case 2: supportedListBoxDoubleClicked((TQListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 3: updatePreviewLabel(); break;
    case 4: updatePreviewLabel((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 5: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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