#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './kdarcompressionfilterdlg.ui'
**
** Created: Sun Jul 10 12:14:31 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 "kdarcompressionfilterdlg.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 kdarCompressionFilterDlg 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.
 */
kdarCompressionFilterDlg::kdarCompressionFilterDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "kdarCompressionFilterDlg" );
    kdarCompressionFilterDlgLayout = new QVBoxLayout( this, 11, 6, "kdarCompressionFilterDlgLayout"); 

    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 );

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

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

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

    compressionFilterCancelButton = new QPushButton( this, "compressionFilterCancelButton" );
    layout154->addWidget( compressionFilterCancelButton );
    kdarCompressionFilterDlgLayout->addLayout( layout154 );
    languageChange();
    resize( QSize(548, 143).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void kdarCompressionFilterDlg::languageChange()
{
    setCaption( tr2i18n( "Add compression filter" ) );
    textLabel2->setText( tr2i18n( "Choose a filter or type a new one:" ) );
    compressionFilterValueComboBox->clear();
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.jpg" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.gz" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.bz2" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.mpg" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.avi" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.Z" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.zip" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.gif" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.mov" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.pdf" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.png" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.pnm" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "*.pbm" ) );
    compressionFilterValueComboBox->insertItem( tr2i18n( "All of the above" ) );
    compressionFilterOKButton->setText( tr2i18n( "&OK" ) );
    compressionFilterOKButton->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) );
    compressionFilterCancelButton->setText( tr2i18n( "&Cancel" ) );
}

#include "kdarcompressionfilterdlg.moc"
