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

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

#include "general.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqframe.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "general.ui.h"

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

    kcfg_removeCompletedJobs = new TQCheckBox( this, "kcfg_removeCompletedJobs" );
    GeneralLayout->addWidget( kcfg_removeCompletedJobs );

    kcfg_promptIfIncompleteInfo = new TQCheckBox( this, "kcfg_promptIfIncompleteInfo" );
    GeneralLayout->addWidget( kcfg_promptIfIncompleteInfo );

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

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

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

    textLabel1 = new TQLabel( groupBox2, "textLabel1" );
    textLabel1->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );

    groupBox2Layout->addMultiCellWidget( textLabel1, 0, 0, 0, 2 );

    inputlabel = new TQLabel( groupBox2, "inputlabel" );

    groupBox2Layout->addWidget( inputlabel, 5, 0 );

    outputLabel = new TQLabel( groupBox2, "outputLabel" );

    groupBox2Layout->addWidget( outputLabel, 6, 0 );

    exampleLabel = new TQLabel( groupBox2, "exampleLabel" );

    groupBox2Layout->addMultiCellWidget( exampleLabel, 4, 4, 0, 1 );

    exampleOutput = new TQLabel( groupBox2, "exampleOutput" );

    groupBox2Layout->addMultiCellWidget( exampleOutput, 6, 6, 1, 2 );

    example = new TQLineEdit( groupBox2, "example" );

    groupBox2Layout->addMultiCellWidget( example, 5, 5, 1, 2 );

    kcfg_replaceInput = new TQLineEdit( groupBox2, "kcfg_replaceInput" );

    groupBox2Layout->addMultiCellWidget( kcfg_replaceInput, 2, 2, 0, 1 );

    kcfg_replaceOutput = new TQLineEdit( groupBox2, "kcfg_replaceOutput" );

    groupBox2Layout->addWidget( kcfg_replaceOutput, 2, 2 );

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

    groupBox2Layout->addWidget( textLabel3, 1, 2 );

    line1 = new TQFrame( groupBox2, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );

    groupBox2Layout->addMultiCellWidget( line1, 3, 3, 0, 2 );
    GeneralLayout->addWidget( groupBox2 );

    kcfg_seperateMultiArtist = new TQGroupBox( this, "kcfg_seperateMultiArtist" );
    kcfg_seperateMultiArtist->setCheckable( true );
    kcfg_seperateMultiArtist->setChecked( true );
    kcfg_seperateMultiArtist->setColumnLayout(0, TQt::Vertical );
    kcfg_seperateMultiArtist->layout()->setSpacing( 6 );
    kcfg_seperateMultiArtist->layout()->setMargin( 11 );
    kcfg_seperateMultiArtistLayout = new TQHBoxLayout( kcfg_seperateMultiArtist->layout() );
    kcfg_seperateMultiArtistLayout->setAlignment( TQt::AlignTop );

    buttonGroup2 = new TQButtonGroup( kcfg_seperateMultiArtist, "buttonGroup2" );
    buttonGroup2->setColumnLayout(0, TQt::Vertical );
    buttonGroup2->layout()->setSpacing( 6 );
    buttonGroup2->layout()->setMargin( 11 );
    buttonGroup2Layout = new TQVBoxLayout( buttonGroup2->layout() );
    buttonGroup2Layout->setAlignment( TQt::AlignTop );

    kcfg_format_titleArtist = new TQRadioButton( buttonGroup2, "kcfg_format_titleArtist" );
    buttonGroup2Layout->addWidget( kcfg_format_titleArtist );

    kcfg_format_artistTitle = new TQRadioButton( buttonGroup2, "kcfg_format_artistTitle" );
    kcfg_format_artistTitle->setChecked( true );
    buttonGroup2Layout->addWidget( kcfg_format_artistTitle );
    kcfg_seperateMultiArtistLayout->addWidget( buttonGroup2 );

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

    delimiterLabel = new TQLabel( kcfg_seperateMultiArtist, "delimiterLabel" );

    layout1->addWidget( delimiterLabel, 1, 0 );

    genArtistLabel = new TQLabel( kcfg_seperateMultiArtist, "genArtistLabel" );

    layout1->addWidget( genArtistLabel, 0, 0 );

    kcfg_delimiter = new TQLineEdit( kcfg_seperateMultiArtist, "kcfg_delimiter" );

    layout1->addWidget( kcfg_delimiter, 1, 1 );

    kcfg_genericArtist = new TQLineEdit( kcfg_seperateMultiArtist, "kcfg_genericArtist" );

    layout1->addWidget( kcfg_genericArtist, 0, 1 );
    kcfg_seperateMultiArtistLayout->addLayout( layout1 );
    GeneralLayout->addWidget( kcfg_seperateMultiArtist );
    spacer1 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GeneralLayout->addItem( spacer1 );
    languageChange();
    resize( TQSize(442, 473).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_replaceInput, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( updateExample() ) );
    connect( kcfg_replaceOutput, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( updateExample() ) );
    connect( example, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( updateExample() ) );

    // tab order
    setTabOrder( kcfg_replaceInput, kcfg_replaceOutput );
    setTabOrder( kcfg_replaceOutput, example );
    setTabOrder( example, kcfg_removeCompletedJobs );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void General::languageChange()
{
    setCaption( tr2i18n( "General" ) );
    kcfg_removeCompletedJobs->setText( tr2i18n( "&Automatically remove jobs when finished" ) );
    kcfg_promptIfIncompleteInfo->setText( tr2i18n( "Prompt if information is not complete" ) );
    groupBox2->setTitle( tr2i18n( "File Regular Expression Replacement" ) );
    textLabel2->setText( tr2i18n( "Selection:" ) );
    textLabel1->setText( tr2i18n( "Regular expression used on all file names. For example using selection \" \" and replace with \"_\" would replace all the spaces with underlines.\n"
"" ) );
    inputlabel->setText( tr2i18n( "Input:" ) );
    outputLabel->setText( tr2i18n( "Output:" ) );
    exampleLabel->setText( tr2i18n( "Example" ) );
    exampleOutput->setText( tr2i18n( "Cool artist - example audio file.wav" ) );
    example->setText( tr2i18n( "Cool artist - example audio file.wav" ) );
    textLabel3->setText( tr2i18n( "Replace with:" ) );
    kcfg_seperateMultiArtist->setTitle( tr2i18n( "Automatically Separate Multi-Artist CDDB Entries" ) );
    buttonGroup2->setTitle( tr2i18n( "Format" ) );
    kcfg_format_titleArtist->setText( tr2i18n( "Title - Artist" ) );
    kcfg_format_artistTitle->setText( tr2i18n( "Artist - Title" ) );
    delimiterLabel->setText( tr2i18n( "Delimiter:" ) );
    genArtistLabel->setText( tr2i18n( "Generic artist:" ) );
}

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

TQMetaObject *General::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_General( "General", &General::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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