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

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

/*
 *  Constructs a newArchiveStorageDirDlg 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.
 */
newArchiveStorageDirDlg::newArchiveStorageDirDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "newArchiveStorageDirDlg" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    newArchiveStorageDirDlgLayout = new QVBoxLayout( this, 11, 6, "newArchiveStorageDirDlgLayout"); 

    textLabel1 = new QLabel( this, "textLabel1" );
    textLabel1->setAlignment( int( QLabel::AlignVCenter ) );
    newArchiveStorageDirDlgLayout->addWidget( textLabel1 );

    newArchiveStorageDir = new KURLRequester( this, "newArchiveStorageDir" );
    newArchiveStorageDirDlgLayout->addWidget( newArchiveStorageDir );
    spacer31 = new QSpacerItem( 21, 72, QSizePolicy::Minimum, QSizePolicy::Expanding );
    newArchiveStorageDirDlgLayout->addItem( spacer31 );

    layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); 
    spacer30 = new QSpacerItem( 220, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout2->addItem( spacer30 );

    pushButton16 = new QPushButton( this, "pushButton16" );
    pushButton16->setEnabled( TRUE );
    pushButton16->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, pushButton16->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( pushButton16 );

    pushButton2 = new QPushButton( this, "pushButton2" );
    layout2->addWidget( pushButton2 );
    newArchiveStorageDirDlgLayout->addLayout( layout2 );
    languageChange();
    resize( QSize(491, 380).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void newArchiveStorageDirDlg::languageChange()
{
    setCaption( tr2i18n( "Select backup directory" ) );
    textLabel1->setText( tr2i18n( "Welcome to KDar, the KDE Disk archiver.\n"
"\n"
"Please choose a directory to store your \n"
"archives and backups into.\n"
"\n"
"Click on the \"folder\" icon below, and choose \n"
"the directory. If you would like to create a new \n"
"one, click on the \"new folder\" icon at the top of \n"
"the dialog window." ) );
    pushButton16->setText( tr2i18n( "&OK" ) );
    pushButton16->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) );
    pushButton2->setText( tr2i18n( "&Cancel" ) );
    pushButton2->setAccel( QKeySequence( tr2i18n( "Alt+C" ) ) );
    QToolTip::add( pushButton2, tr2i18n( "Skip this step for now. You can set a default backup directory later." ) );
    QWhatsThis::add( pushButton2, tr2i18n( "Click here to skip this step. You can choose a backup directory later if you wish." ) );
}

#include "newarchivestoragedirdlg.moc"
