#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/home/oliver/work/programming/kyammi/src/UpdateDatabaseMediaDialogBase.ui'
**
** Created: Sun Jul 31 13:19:51 2005
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "UpdateDatabaseMediaDialogBase.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

/*
 *  Constructs a UpdateDatabaseMediaDialogBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
UpdateDatabaseMediaDialogBase::UpdateDatabaseMediaDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "UpdateDatabaseMediaDialogBase" );
    setSizeGripEnabled( TRUE );
    UpdateDatabaseMediaDialogBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "UpdateDatabaseMediaDialogBaseLayout"); 

    ButtonChooseMediaDir = new QPushButton( this, "ButtonChooseMediaDir" );

    UpdateDatabaseMediaDialogBaseLayout->addWidget( ButtonChooseMediaDir, 1, 2 );

    LabelMediaDir = new QLabel( this, "LabelMediaDir" );

    UpdateDatabaseMediaDialogBaseLayout->addWidget( LabelMediaDir, 1, 0 );

    PushButtonOk = new QPushButton( this, "PushButtonOk" );
    PushButtonOk->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, PushButtonOk->sizePolicy().hasHeightForWidth() ) );

    UpdateDatabaseMediaDialogBaseLayout->addWidget( PushButtonOk, 5, 0 );

    LineEditMediaDir = new QLineEdit( this, "LineEditMediaDir" );

    UpdateDatabaseMediaDialogBaseLayout->addWidget( LineEditMediaDir, 1, 1 );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)4, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
    QFont TextLabel1_font(  TextLabel1->font() );
    TextLabel1_font.setFamily( "Nimbus Sans l [Urw]" );
    TextLabel1_font.setBold( TRUE );
    TextLabel1_font.setItalic( TRUE );
    TextLabel1->setFont( TextLabel1_font ); 

    UpdateDatabaseMediaDialogBaseLayout->addMultiCellWidget( TextLabel1, 0, 0, 0, 2 );

    PushButtonCancel = new QPushButton( this, "PushButtonCancel" );
    PushButtonCancel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, PushButtonCancel->sizePolicy().hasHeightForWidth() ) );

    UpdateDatabaseMediaDialogBaseLayout->addMultiCellWidget( PushButtonCancel, 5, 5, 1, 2 );

    LabelFilePattern_2 = new QLabel( this, "LabelFilePattern_2" );

    UpdateDatabaseMediaDialogBaseLayout->addWidget( LabelFilePattern_2, 4, 0 );

    LineEditMediaName = new QLineEdit( this, "LineEditMediaName" );

    UpdateDatabaseMediaDialogBaseLayout->addWidget( LineEditMediaName, 4, 1 );

    LabelFilePattern = new QLabel( this, "LabelFilePattern" );

    UpdateDatabaseMediaDialogBaseLayout->addWidget( LabelFilePattern, 3, 0 );

    LineEditFilePattern = new QLineEdit( this, "LineEditFilePattern" );

    UpdateDatabaseMediaDialogBaseLayout->addWidget( LineEditFilePattern, 3, 1 );

    CheckBoxMountMediaDir = new QCheckBox( this, "CheckBoxMountMediaDir" );

    UpdateDatabaseMediaDialogBaseLayout->addMultiCellWidget( CheckBoxMountMediaDir, 2, 2, 1, 2 );

    CheckBoxFollowSymLinks = new QCheckBox( this, "CheckBoxFollowSymLinks" );

    UpdateDatabaseMediaDialogBaseLayout->addWidget( CheckBoxFollowSymLinks, 2, 0 );
    languageChange();
    resize( QSize(467, 287).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( PushButtonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( PushButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( LineEditMediaDir, ButtonChooseMediaDir );
    setTabOrder( ButtonChooseMediaDir, CheckBoxFollowSymLinks );
    setTabOrder( CheckBoxFollowSymLinks, CheckBoxMountMediaDir );
    setTabOrder( CheckBoxMountMediaDir, LineEditFilePattern );
    setTabOrder( LineEditFilePattern, LineEditMediaName );
    setTabOrder( LineEditMediaName, PushButtonOk );
    setTabOrder( PushButtonOk, PushButtonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void UpdateDatabaseMediaDialogBase::languageChange()
{
    setCaption( tr2i18n( "Update Database - Scan Media" ) );
    ButtonChooseMediaDir->setText( tr2i18n( "..." ) );
    QToolTip::add( ButtonChooseMediaDir, tr2i18n( "choose directory" ) );
    LabelMediaDir->setText( tr2i18n( "media directory" ) );
    QToolTip::add( LabelMediaDir, tr2i18n( "yammi will search in this directory (and recursive in all subdirectories) for new song files" ) );
    PushButtonOk->setText( tr2i18n( "Start Scan..." ) );
    QToolTip::add( LineEditMediaDir, tr2i18n( "yammi will search in this directory (and recursive in all subdirectories) for new song files" ) );
    TextLabel1->setText( tr2i18n( "Options for scanning a media (e.g. CD)" ) );
    PushButtonCancel->setText( tr2i18n( "Cancel" ) );
    LabelFilePattern_2->setText( tr2i18n( "name of medium" ) );
    QToolTip::add( LabelFilePattern_2, tr2i18n( "identifies the medium by name" ) );
    QToolTip::add( LineEditMediaName, tr2i18n( "identifies the medium by name" ) );
    LabelFilePattern->setText( tr2i18n( "pattern of files to import" ) );
    QToolTip::add( LabelFilePattern, tr2i18n( "filename pattern (eg. \"*.mp3 *.ogg\")" ) );
    QToolTip::add( LineEditFilePattern, tr2i18n( "filename pattern (eg. \"*.mp3 *.ogg\")" ) );
    CheckBoxMountMediaDir->setText( tr2i18n( "mount directory" ) );
    CheckBoxFollowSymLinks->setText( tr2i18n( "follow symbolic links" ) );
    QToolTip::add( CheckBoxFollowSymLinks, tr2i18n( "Choose whether yammi should follow symbolic links when traversing the directory structure" ) );
}

#include "UpdateDatabaseMediaDialogBase.moc"
