#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './kdarcreatedlg.ui'
**
** Created: Thu Jul 14 22:38:15 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 "kdarcreatedlg.h"

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

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

    groupBox1 = new QGroupBox( this, "groupBox1" );
    groupBox1->setFrameShape( QGroupBox::GroupBoxPanel );
    groupBox1->setFrameShadow( QGroupBox::Sunken );
    groupBox1->setColumnLayout(0, Qt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( Qt::AlignTop );

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

    rootDirectoryLabel = new QLabel( groupBox1, "rootDirectoryLabel" );
    layout10->addWidget( rootDirectoryLabel );

    rootDirectoryKURLRequester = new KURLRequester( groupBox1, "rootDirectoryKURLRequester" );
    layout10->addWidget( rootDirectoryKURLRequester );
    groupBox1Layout->addLayout( layout10 );

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

    archiveNameLabel = new QLabel( groupBox1, "archiveNameLabel" );
    archiveNameLabel->setEnabled( FALSE );
    layout28->addWidget( archiveNameLabel );

    archiveNameKURLRequester = new KURLRequester( groupBox1, "archiveNameKURLRequester" );
    archiveNameKURLRequester->setEnabled( FALSE );
    layout28->addWidget( archiveNameKURLRequester );
    groupBox1Layout->addLayout( layout28 );

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

    diffBackupCheckBox = new QCheckBox( groupBox1, "diffBackupCheckBox" );
    diffBackupCheckBox->setEnabled( FALSE );
    layout2->addWidget( diffBackupCheckBox );
    spacer1 = new QSpacerItem( 290, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout2->addItem( spacer1 );
    groupBox1Layout->addLayout( layout2 );

    layout29 = new QHBoxLayout( 0, 0, 6, "layout29"); 
    spacer2 = new QSpacerItem( 17, 38, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout29->addItem( spacer2 );

    referenceArchiveLabel = new QLabel( groupBox1, "referenceArchiveLabel" );
    referenceArchiveLabel->setEnabled( FALSE );
    layout29->addWidget( referenceArchiveLabel );

    referenceArchiveKURLRequester = new KURLRequester( groupBox1, "referenceArchiveKURLRequester" );
    referenceArchiveKURLRequester->setEnabled( FALSE );
    layout29->addWidget( referenceArchiveKURLRequester );
    groupBox1Layout->addLayout( layout29 );

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

    configureCreationSettingsPushButton = new QPushButton( groupBox1, "configureCreationSettingsPushButton" );
    layout37->addWidget( configureCreationSettingsPushButton );
    spacer34 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout37->addItem( spacer34 );
    groupBox1Layout->addLayout( layout37 );

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

    dryRunCheckBox = new QCheckBox( groupBox1, "dryRunCheckBox" );
    layout11->addWidget( dryRunCheckBox );
    spacer10 = new QSpacerItem( 191, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout11->addItem( spacer10 );
    groupBox1Layout->addLayout( layout11 );
    archiveCreateDlgLayout->addWidget( groupBox1 );

    groupBox16 = new QGroupBox( this, "groupBox16" );
    groupBox16->setColumnLayout(0, Qt::Vertical );
    groupBox16->layout()->setSpacing( 6 );
    groupBox16->layout()->setMargin( 11 );
    groupBox16Layout = new QVBoxLayout( groupBox16->layout() );
    groupBox16Layout->setAlignment( Qt::AlignTop );

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

    saveProfilePushButton = new QPushButton( groupBox16, "saveProfilePushButton" );
    layout38->addWidget( saveProfilePushButton );

    textLabel1 = new QLabel( groupBox16, "textLabel1" );
    layout38->addWidget( textLabel1 );
    spacer35 = new QSpacerItem( 81, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout38->addItem( spacer35 );
    groupBox16Layout->addLayout( layout38 );

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

    restoreProfilePushButton = new QPushButton( groupBox16, "restoreProfilePushButton" );
    layout39->addWidget( restoreProfilePushButton );

    textLabel2 = new QLabel( groupBox16, "textLabel2" );
    layout39->addWidget( textLabel2 );
    spacer36 = new QSpacerItem( 81, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout39->addItem( spacer36 );
    groupBox16Layout->addLayout( layout39 );

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

    exportDarCommandButton = new QPushButton( groupBox16, "exportDarCommandButton" );
    layout10_2->addWidget( exportDarCommandButton );

    textLabel1_2 = new QLabel( groupBox16, "textLabel1_2" );
    layout10_2->addWidget( textLabel1_2 );
    spacer9 = new QSpacerItem( 31, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout10_2->addItem( spacer9 );
    groupBox16Layout->addLayout( layout10_2 );
    archiveCreateDlgLayout->addWidget( groupBox16 );

    groupBox3 = new QGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, Qt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new QHBoxLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( Qt::AlignTop );

    priorityKComboBox = new KComboBox( FALSE, groupBox3, "priorityKComboBox" );
    groupBox3Layout->addWidget( priorityKComboBox );
    spacer10_2 = new QSpacerItem( 200, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    groupBox3Layout->addItem( spacer10_2 );
    archiveCreateDlgLayout->addWidget( groupBox3 );
    spacer37 = new QSpacerItem( 21, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
    archiveCreateDlgLayout->addItem( spacer37 );

    layout5 = new QHBoxLayout( 0, 0, 6, "layout5"); 
    spacer4 = new QSpacerItem( 240, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout5->addItem( spacer4 );

    createArchiveOKButton = new QPushButton( this, "createArchiveOKButton" );
    layout5->addWidget( createArchiveOKButton );

    createArchiveCancelButton = new QPushButton( this, "createArchiveCancelButton" );
    createArchiveCancelButton->setOn( FALSE );
    layout5->addWidget( createArchiveCancelButton );
    archiveCreateDlgLayout->addLayout( layout5 );
    languageChange();
    resize( QSize(411, 521).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( diffBackupCheckBox, SIGNAL( toggled(bool) ), referenceArchiveLabel, SLOT( setEnabled(bool) ) );
    connect( createArchiveOKButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( createArchiveCancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( rootDirectoryKURLRequester, SIGNAL( urlSelected(const QString&) ), this, SLOT( slotChooseRootDirectory(const QString&) ) );
    connect( archiveNameKURLRequester, SIGNAL( returnPressed(const QString&) ), this, SLOT( slotChooseArchiveName(const QString&) ) );
    connect( diffBackupCheckBox, SIGNAL( toggled(bool) ), referenceArchiveKURLRequester, SLOT( setEnabled(bool) ) );
    connect( rootDirectoryKURLRequester, SIGNAL( textChanged(const QString&) ), this, SLOT( slotChooseRootDirectory(const QString&) ) );
    connect( archiveNameKURLRequester, SIGNAL( textChanged(const QString&) ), this, SLOT( slotChooseArchiveName(const QString&) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void archiveCreateDlg::languageChange()
{
    setCaption( tr2i18n( "Create archive" ) );
    groupBox1->setTitle( tr2i18n( "Archive" ) );
    rootDirectoryLabel->setText( tr2i18n( "Root directory" ) );
    archiveNameLabel->setText( tr2i18n( "Archive name" ) );
    diffBackupCheckBox->setText( tr2i18n( "differential &backup" ) );
    diffBackupCheckBox->setAccel( QKeySequence( tr2i18n( "Alt+B" ) ) );
    referenceArchiveLabel->setText( tr2i18n( "Reference archive" ) );
    configureCreationSettingsPushButton->setText( tr2i18n( "Co&nfigure creation options" ) );
    configureCreationSettingsPushButton->setAccel( QKeySequence( tr2i18n( "Alt+N" ) ) );
    dryRunCheckBox->setText( tr2i18n( "Dr&y run" ) );
    dryRunCheckBox->setAccel( QKeySequence( tr2i18n( "Alt+Y" ) ) );
    groupBox16->setTitle( tr2i18n( "Profiles" ) );
    saveProfilePushButton->setText( tr2i18n( "&Save" ) );
    saveProfilePushButton->setAccel( QKeySequence( tr2i18n( "Alt+S" ) ) );
    textLabel1->setText( tr2i18n( "this creation profile to disk", "The word 'Save' precedes this text on a button." ) );
    restoreProfilePushButton->setText( tr2i18n( "&Load" ) );
    restoreProfilePushButton->setAccel( QKeySequence( tr2i18n( "Alt+L" ) ) );
    textLabel2->setText( tr2i18n( "a creation profile from disk", "the word 'Load' precedes this phrase" ) );
    exportDarCommandButton->setText( tr2i18n( "E&xport" ) );
    exportDarCommandButton->setAccel( QKeySequence( tr2i18n( "Alt+X" ) ) );
    textLabel1_2->setText( tr2i18n( "dar command line", "The word 'export' precedes this phrase" ) );
    groupBox3->setTitle( tr2i18n( "Priority (niceness)" ) );
    priorityKComboBox->clear();
    priorityKComboBox->insertItem( tr2i18n( "Idle" ) );
    priorityKComboBox->insertItem( tr2i18n( "Lowest" ) );
    priorityKComboBox->insertItem( tr2i18n( "Low" ) );
    priorityKComboBox->insertItem( tr2i18n( "Normal" ) );
    priorityKComboBox->insertItem( tr2i18n( "High" ) );
    priorityKComboBox->insertItem( tr2i18n( "Highest" ) );
    priorityKComboBox->insertItem( tr2i18n( "Time Critical" ) );
    priorityKComboBox->insertItem( tr2i18n( "Inherit from KDar" ) );
    priorityKComboBox->setCurrentItem( 3 );
    createArchiveOKButton->setText( tr2i18n( "&OK" ) );
    createArchiveCancelButton->setText( tr2i18n( "&Cancel" ) );
}

void archiveCreateDlg::slotChooseRootDirectory(const QString&)
{
    qWarning( "archiveCreateDlg::slotChooseRootDirectory(const QString&): Not implemented yet" );
}

void archiveCreateDlg::slotChooseArchiveName(const QString&)
{
    qWarning( "archiveCreateDlg::slotChooseArchiveName(const QString&): Not implemented yet" );
}

void archiveCreateDlg::slotNewFileFilter()
{
    qWarning( "archiveCreateDlg::slotNewFileFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotEditFileFilter()
{
    qWarning( "archiveCreateDlg::slotEditFileFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotRemoveFileFilter()
{
    qWarning( "archiveCreateDlg::slotRemoveFileFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotNewCompressionFilter()
{
    qWarning( "archiveCreateDlg::slotNewCompressionFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotEditCompressionFilter()
{
    qWarning( "archiveCreateDlg::slotEditCompressionFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotRemoveCompressionFilter()
{
    qWarning( "archiveCreateDlg::slotRemoveCompressionFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotChooseReferenceArchive(const QString&)
{
    qWarning( "archiveCreateDlg::slotChooseReferenceArchive(const QString&): Not implemented yet" );
}

void archiveCreateDlg::slotRemoveAllDirectoryFilter()
{
    qWarning( "archiveCreateDlg::slotRemoveAllDirectoryFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotRemoveAllFileFilter()
{
    qWarning( "archiveCreateDlg::slotRemoveAllFileFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotRemoveAllCompressionFilter()
{
    qWarning( "archiveCreateDlg::slotRemoveAllCompressionFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotNewDirectoryFilter()
{
    qWarning( "archiveCreateDlg::slotNewDirectoryFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotEditDirectoryFilter()
{
    qWarning( "archiveCreateDlg::slotEditDirectoryFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotRemoveDirectoryFilter()
{
    qWarning( "archiveCreateDlg::slotRemoveDirectoryFilter(): Not implemented yet" );
}

void archiveCreateDlg::slotDryRun(bool)
{
    qWarning( "archiveCreateDlg::slotDryRun(bool): Not implemented yet" );
}

#include "kdarcreatedlg.moc"
