#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './kdarfilefilterdlg.ui'
**
** Created: Sun Jul 10 12:14:36 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 "kdarfilefilterdlg.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qframe.h>
#include <qlabel.h>
#include <qcombobox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a kdarFileFilterDlg 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.
 */
kdarFileFilterDlg::kdarFileFilterDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "kdarFileFilterDlg" );
    kdarFileFilterDlgLayout = new QVBoxLayout( this, 11, 6, "kdarFileFilterDlgLayout"); 

    frame6 = new QFrame( this, "frame6" );
    frame6->setFrameShape( QFrame::StyledPanel );
    frame6->setFrameShadow( QFrame::Raised );
    frame6Layout = new QVBoxLayout( frame6, 11, 6, "frame6Layout"); 

    layout153 = new QHBoxLayout( 0, 0, 6, "layout153"); 

    textLabel2 = new QLabel( frame6, "textLabel2" );
    layout153->addWidget( textLabel2 );

    fileFilterValueComboBox = new QComboBox( FALSE, frame6, "fileFilterValueComboBox" );
    fileFilterValueComboBox->setEditable( TRUE );
    fileFilterValueComboBox->setInsertionPolicy( QComboBox::NoInsertion );
    layout153->addWidget( fileFilterValueComboBox );
    frame6Layout->addLayout( layout153 );
    kdarFileFilterDlgLayout->addWidget( frame6 );
    spacer144 = new QSpacerItem( 20, 81, QSizePolicy::Minimum, QSizePolicy::Expanding );
    kdarFileFilterDlgLayout->addItem( spacer144 );

    layout154 = new QHBoxLayout( 0, 0, 6, "layout154"); 
    spacer34 = new QSpacerItem( 301, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout154->addItem( spacer34 );

    fileFilterOKButton = new QPushButton( this, "fileFilterOKButton" );
    layout154->addWidget( fileFilterOKButton );

    fileFilterCancelButton = new QPushButton( this, "fileFilterCancelButton" );
    layout154->addWidget( fileFilterCancelButton );
    kdarFileFilterDlgLayout->addLayout( layout154 );
    languageChange();
    resize( QSize(551, 147).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( fileFilterOKButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( fileFilterCancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void kdarFileFilterDlg::languageChange()
{
    setCaption( tr2i18n( "Add file filter" ) );
    textLabel2->setText( tr2i18n( "Choose a filter or type a new one:" ) );
    fileFilterValueComboBox->clear();
    fileFilterValueComboBox->insertItem( tr2i18n( "*~" ) );
    fileFilterValueComboBox->insertItem( tr2i18n( ".*~" ) );
    fileFilterValueComboBox->insertItem( tr2i18n( "*.dar" ) );
    fileFilterValueComboBox->insertItem( tr2i18n( "All of the above" ) );
    fileFilterValueComboBox->setCurrentItem( 0 );
    fileFilterOKButton->setText( tr2i18n( "&OK" ) );
    fileFilterOKButton->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) );
    fileFilterCancelButton->setText( tr2i18n( "&Cancel" ) );
    fileFilterCancelButton->setAccel( QKeySequence( tr2i18n( "Alt+C" ) ) );
}

#include "kdarfilefilterdlg.moc"
