#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'addexistingdlgbase.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "addexistingdlgbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <kprogress.h>
#include <ksqueezedtextlabel.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqsplitter.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a AddExistingDlgBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
AddExistingDlgBase::AddExistingDlgBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "AddExistingDlgBase" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    AddExistingDlgBaseLayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "AddExistingDlgBaseLayout"); 

    layout10 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout10"); 
    buttonSpacer = new TQSpacerItem( 317, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout10->addItem( buttonSpacer );

    okButton = new TQPushButton( this, "okButton" );
    okButton->setDefault( true );
    layout10->addWidget( okButton );

    cancelButton = new TQPushButton( this, "cancelButton" );
    layout10->addWidget( cancelButton );

    AddExistingDlgBaseLayout->addLayout( layout10, 3, 0 );

    progressBar = new KProgress( this, "progressBar" );
    progressBar->setEnabled( true );

    AddExistingDlgBaseLayout->addWidget( progressBar, 2, 0 );

    infoGroupBox = new TQGroupBox( this, "infoGroupBox" );
    infoGroupBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, infoGroupBox->sizePolicy().hasHeightForWidth() ) );
    infoGroupBox->setMaximumSize( TQSize( 32767, 32767 ) );
    infoGroupBox->setFrameShape( TQGroupBox::Box );
    infoGroupBox->setFrameShadow( TQGroupBox::Sunken );
    infoGroupBox->setColumnLayout(0, TQt::Vertical );
    infoGroupBox->layout()->setSpacing( KDialog::spacingHint() );
    infoGroupBox->layout()->setMargin( KDialog::marginHint() );
    infoGroupBoxLayout = new TQHBoxLayout( infoGroupBox->layout() );
    infoGroupBoxLayout->setAlignment( TQt::AlignTop );

    infoLayout1 = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "infoLayout1"); 

    directoryStaticLabel = new TQLabel( infoGroupBox, "directoryStaticLabel" );
    directoryStaticLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, directoryStaticLabel->sizePolicy().hasHeightForWidth() ) );
    TQFont directoryStaticLabel_font(  directoryStaticLabel->font() );
    directoryStaticLabel->setFont( directoryStaticLabel_font ); 
    infoLayout1->addWidget( directoryStaticLabel );

    targetStaticLabel = new TQLabel( infoGroupBox, "targetStaticLabel" );
    targetStaticLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, targetStaticLabel->sizePolicy().hasHeightForWidth() ) );
    TQFont targetStaticLabel_font(  targetStaticLabel->font() );
    targetStaticLabel->setFont( targetStaticLabel_font ); 
    infoLayout1->addWidget( targetStaticLabel );
    infoGroupBoxLayout->addLayout( infoLayout1 );

    infoLayout2 = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "infoLayout2"); 

    directoryLabel = new KSqueezedTextLabel( infoGroupBox, "directoryLabel" );
    directoryLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, directoryLabel->sizePolicy().hasHeightForWidth() ) );
    infoLayout2->addWidget( directoryLabel );

    targetLabel = new TQLabel( infoGroupBox, "targetLabel" );
    infoLayout2->addWidget( targetLabel );
    infoGroupBoxLayout->addLayout( infoLayout2 );

    AddExistingDlgBaseLayout->addWidget( infoGroupBox, 0, 0 );

    splitter2 = new TQSplitter( this, "splitter2" );
    splitter2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, splitter2->sizePolicy().hasHeightForWidth() ) );
    splitter2->setOrientation( TQSplitter::Horizontal );

    TQWidget* privateLayoutWidget = new TQWidget( splitter2, "layout12" );
    layout12 = new TQVBoxLayout( privateLayoutWidget, KDialog::marginHint(), KDialog::spacingHint(), "layout12"); 

    layout10_2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout10_2"); 
    arrowSpacer1 = new TQSpacerItem( 84, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout10_2->addItem( arrowSpacer1 );

    addAllButton = new TQPushButton( privateLayoutWidget, "addAllButton" );
    layout10_2->addWidget( addAllButton );

    addSelectedButton = new TQPushButton( privateLayoutWidget, "addSelectedButton" );
    layout10_2->addWidget( addSelectedButton );
    arrowSpacer2 = new TQSpacerItem( 84, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout10_2->addItem( arrowSpacer2 );
    layout12->addLayout( layout10_2 );

    sourceGroupBox = new TQGroupBox( privateLayoutWidget, "sourceGroupBox" );
    sourceGroupBox->setMinimumSize( TQSize( 240, 250 ) );
    sourceGroupBox->setMaximumSize( TQSize( 32767, 32767 ) );
    sourceGroupBox->setColumnLayout(0, TQt::Vertical );
    sourceGroupBox->layout()->setSpacing( KDialog::spacingHint() );
    sourceGroupBox->layout()->setMargin( KDialog::marginHint() );
    sourceGroupBoxLayout = new TQVBoxLayout( sourceGroupBox->layout() );
    sourceGroupBoxLayout->setAlignment( TQt::AlignTop );
    layout12->addWidget( sourceGroupBox );

    TQWidget* privateLayoutWidget_2 = new TQWidget( splitter2, "layout13" );
    layout13 = new TQVBoxLayout( privateLayoutWidget_2, KDialog::marginHint(), KDialog::spacingHint(), "layout13"); 

    layout11 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout11"); 
    arrowSpacer1_2 = new TQSpacerItem( 21, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout11->addItem( arrowSpacer1_2 );

    removeAllButton = new TQPushButton( privateLayoutWidget_2, "removeAllButton" );
    layout11->addWidget( removeAllButton );

    removeSelectedButton = new TQPushButton( privateLayoutWidget_2, "removeSelectedButton" );
    layout11->addWidget( removeSelectedButton );
    arrowSpacer2_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout11->addItem( arrowSpacer2_2 );
    layout13->addLayout( layout11 );

    destGroupBox = new TQGroupBox( privateLayoutWidget_2, "destGroupBox" );
    destGroupBox->setMinimumSize( TQSize( 140, 100 ) );
    destGroupBox->setMaximumSize( TQSize( 32767, 32767 ) );
    destGroupBox->setColumnLayout(0, TQt::Vertical );
    destGroupBox->layout()->setSpacing( KDialog::spacingHint() );
    destGroupBox->layout()->setMargin( KDialog::marginHint() );
    destGroupBoxLayout = new TQVBoxLayout( destGroupBox->layout() );
    destGroupBoxLayout->setAlignment( TQt::AlignTop );
    layout13->addWidget( destGroupBox );

    AddExistingDlgBaseLayout->addWidget( splitter2, 1, 0 );
    languageChange();
    resize( TQSize(592, 445).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );

    // tab order
    setTabOrder( addAllButton, addSelectedButton );
    setTabOrder( addSelectedButton, removeAllButton );
    setTabOrder( removeAllButton, removeSelectedButton );
    setTabOrder( removeSelectedButton, okButton );
    setTabOrder( okButton, cancelButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AddExistingDlgBase::languageChange()
{
    setCaption( tr2i18n( "ImportExistingDlgBase" ) );
    okButton->setText( tr2i18n( "&OK" ) );
    cancelButton->setText( tr2i18n( "&Cancel" ) );
    infoGroupBox->setTitle( tr2i18n( "Subproject Information" ) );
    directoryStaticLabel->setText( tr2i18n( "Directory:" ) );
    targetStaticLabel->setText( tr2i18n( "Target:" ) );
    directoryLabel->setText( tr2i18n( "[DIRECTORY]" ) );
    targetLabel->setText( tr2i18n( "[TARGET]" ) );
    addAllButton->setText( tr2i18n( "A&dd All" ) );
    TQToolTip::add( addAllButton, tr2i18n( "Import by creating symbolic links (recommended)" ) );
    addSelectedButton->setText( tr2i18n( "&Add Selected" ) );
    TQToolTip::add( addSelectedButton, tr2i18n( "Import by copying (not recommended)" ) );
    sourceGroupBox->setTitle( tr2i18n( "&Source Directory" ) );
    TQToolTip::add( sourceGroupBox, TQString::null );
    removeAllButton->setText( tr2i18n( "R&emove All" ) );
    TQToolTip::add( removeAllButton, tr2i18n( "Removes all added files." ) );
    removeSelectedButton->setText( tr2i18n( "&Remove Selected" ) );
    TQToolTip::add( removeSelectedButton, tr2i18n( "Removes the selected files." ) );
    destGroupBox->setTitle( tr2i18n( "Add &Following" ) );
}

/****************************************************************************
** AddExistingDlgBase meta object code from reading C++ file 'addexistingdlgbase.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "addexistingdlgbase.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *AddExistingDlgBase::className() const
{
    return "AddExistingDlgBase";
}

TQMetaObject *AddExistingDlgBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AddExistingDlgBase( "AddExistingDlgBase", &AddExistingDlgBase::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString AddExistingDlgBase::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "AddExistingDlgBase", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString AddExistingDlgBase::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "AddExistingDlgBase", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* AddExistingDlgBase::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"AddExistingDlgBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_AddExistingDlgBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* AddExistingDlgBase::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "AddExistingDlgBase" ) )
	return this;
    return TQDialog::tqt_cast( clname );
}

bool AddExistingDlgBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

bool AddExistingDlgBase::tqt_emit( int _id, TQUObject* _o )
{
    return TQDialog::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool AddExistingDlgBase::tqt_property( int id, int f, TQVariant* v)
{
    return TQDialog::tqt_property( id, f, v);
}

bool AddExistingDlgBase::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
