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

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

#include "tagguesserconfigdlgwidget.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <kpushbutton.h>
#include <tdelistview.h>
#include <ntqtoolbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    lvSchemes = new TDEListView( this, "lvSchemes" );
    lvSchemes->addColumn( tr2i18n( "File Name Scheme" ) );
    lvSchemes->header()->setClickEnabled( false, lvSchemes->header()->count() - 1 );
    lvSchemes->header()->setResizeEnabled( false, lvSchemes->header()->count() - 1 );
    lvSchemes->setFrameShape( TDEListView::StyledPanel );
    lvSchemes->setFrameShadow( TDEListView::Sunken );
    lvSchemes->setFullWidth( true );

    Form1Layout->addMultiCellWidget( lvSchemes, 0, 4, 0, 0 );

    bAdd = new KPushButton( this, "bAdd" );

    Form1Layout->addMultiCellWidget( bAdd, 1, 1, 1, 3 );

    bMoveUp = new TQToolButton( this, "bMoveUp" );

    Form1Layout->addWidget( bMoveUp, 0, 1 );

    bMoveDown = new TQToolButton( this, "bMoveDown" );

    Form1Layout->addWidget( bMoveDown, 0, 3 );

    bModify = new KPushButton( this, "bModify" );

    Form1Layout->addMultiCellWidget( bModify, 2, 2, 1, 3 );

    bRemove = new KPushButton( this, "bRemove" );

    Form1Layout->addMultiCellWidget( bRemove, 3, 3, 1, 3 );
    spacer1 = new TQSpacerItem( 20, 130, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Form1Layout->addItem( spacer1, 4, 2 );
    languageChange();
    resize( TQSize(600, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TagGuesserConfigDlgWidget::languageChange()
{
    lvSchemes->header()->setLabel( 0, tr2i18n( "File Name Scheme" ) );
    TQToolTip::add( lvSchemes, tr2i18n( "Currently used file name schemes" ) );
    TQWhatsThis::add( lvSchemes, tr2i18n( "Here you can see the currently configured file name schemes which the \"Suggest\" button in the tag editor uses to extract tag information from a file name. Each string may contain one of the following placeholders:<ul>\n"
"<li>%t: Title</li>\n"
"<li>%a: Artist</li>\n"
"<li>%A: Album</li>\n"
"<li>%T: Track</li>\n"
"<li>%c: Comment</li>\n"
"</ul>\n"
"For example, the file name scheme \"[%T] %a - %t\" would match \"[01] Deep Purple - Smoke on the water\" but not \"(Deep Purple) Smoke on the water\". For that second name, you would use the scheme \"(%a) %t\".<p/>\n"
"Note that the order in which the schemes appear in the list is relevant, since the tag guesser will go through the list from the top to the bottom, and use the first matching scheme." ) );
    bAdd->setText( tr2i18n( "&Add" ) );
    TQToolTip::add( bAdd, tr2i18n( "Add a new scheme" ) );
    TQWhatsThis::add( bAdd, tr2i18n( "Press this button to add a new file name scheme to the end of the list." ) );
    bMoveUp->setText( TQString::null );
    TQToolTip::add( bMoveUp, tr2i18n( "Move scheme up" ) );
    TQWhatsThis::add( bMoveUp, tr2i18n( "Press this button to move the currently selected scheme one step upwards." ) );
    bMoveDown->setText( TQString::null );
    TQToolTip::add( bMoveDown, tr2i18n( "Move scheme down" ) );
    TQWhatsThis::add( bMoveDown, tr2i18n( "Press this button to move the currently selected scheme one step downwards." ) );
    bModify->setText( tr2i18n( "&Modify" ) );
    TQToolTip::add( bModify, tr2i18n( "Modify scheme" ) );
    TQWhatsThis::add( bModify, tr2i18n( "Press this button to modify the currently selected scheme." ) );
    bRemove->setText( tr2i18n( "&Remove" ) );
    TQToolTip::add( bRemove, tr2i18n( "Remove scheme" ) );
    TQWhatsThis::add( bRemove, tr2i18n( "Press this button to remove the currently selected scheme from the list." ) );
}

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

TQMetaObject *TagGuesserConfigDlgWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TagGuesserConfigDlgWidget( "TagGuesserConfigDlgWidget", &TagGuesserConfigDlgWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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