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

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

#include "sq_imageeditoptions.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "sq_config.h"
#include "sq_imageedit.h"
#include "sq_imageeditoptions.ui.h"

/*
 *  Constructs a SQ_ImageEditOptions 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.
 */
SQ_ImageEditOptions::SQ_ImageEditOptions( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "SQ_ImageEditOptions" );
    setSizeGripEnabled( true );
    SQ_ImageEditOptionsLayout = new TQGridLayout( this, 1, 1, 11, 6, "SQ_ImageEditOptionsLayout"); 

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 2 );
    buttonGroup1->layout()->setMargin( 9 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    radioPutHere = new TQRadioButton( buttonGroup1, "radioPutHere" );
    buttonGroup1->insert( radioPutHere, 3 );

    buttonGroup1Layout->addWidget( radioPutHere, 3, 0 );

    radioReplace = new TQRadioButton( buttonGroup1, "radioReplace" );
    buttonGroup1->insert( radioReplace, 2 );

    buttonGroup1Layout->addWidget( radioReplace, 2, 0 );

    kurl = new KURLRequester( buttonGroup1, "kurl" );
    kurl->setEnabled( false );

    buttonGroup1Layout->addWidget( kurl, 4, 0 );

    radioCurrentDir = new TQRadioButton( buttonGroup1, "radioCurrentDir" );
    buttonGroup1->insert( radioCurrentDir, 1 );

    buttonGroup1Layout->addWidget( radioCurrentDir, 1, 0 );

    radioCurrentDir_2 = new TQRadioButton( buttonGroup1, "radioCurrentDir_2" );
    buttonGroup1->insert( radioCurrentDir_2, 0 );

    buttonGroup1Layout->addWidget( radioCurrentDir_2, 0, 0 );

    SQ_ImageEditOptionsLayout->addMultiCellWidget( buttonGroup1, 0, 0, 0, 2 );

    checkClose = new TQCheckBox( this, "checkClose" );

    SQ_ImageEditOptionsLayout->addMultiCellWidget( checkClose, 1, 1, 0, 2 );
    spacer3 = new TQSpacerItem( 16, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    SQ_ImageEditOptionsLayout->addItem( spacer3, 2, 0 );

    pushOK = new TQPushButton( this, "pushOK" );
    pushOK->setDefault( true );

    SQ_ImageEditOptionsLayout->addWidget( pushOK, 4, 1 );

    pushCancel = new TQPushButton( this, "pushCancel" );

    SQ_ImageEditOptionsLayout->addWidget( pushCancel, 4, 2 );
    spacer4 = new TQSpacerItem( 260, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    SQ_ImageEditOptionsLayout->addItem( spacer4, 4, 0 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );

    SQ_ImageEditOptionsLayout->addMultiCellWidget( line1, 3, 3, 0, 2 );
    languageChange();
    resize( TQSize(465, 266).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushOK, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( pushCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( radioPutHere, TQ_SIGNAL( toggled(bool) ), kurl, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( radioCurrentDir_2, radioCurrentDir );
    setTabOrder( radioCurrentDir, radioReplace );
    setTabOrder( radioReplace, radioPutHere );
    setTabOrder( radioPutHere, kurl );
    setTabOrder( kurl, checkClose );
    setTabOrder( checkClose, pushOK );
    setTabOrder( pushOK, pushCancel );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SQ_ImageEditOptions::languageChange()
{
    setCaption( tr2i18n( "Edit options" ) );
    buttonGroup1->setTitle( tr2i18n( "New files" ) );
    radioPutHere->setText( tr2i18n( "Place here" ) );
    radioReplace->setText( tr2i18n( "Replace original files" ) );
    radioCurrentDir->setText( tr2i18n( "Place files in current directory, renaming them if necessary" ) );
    radioCurrentDir_2->setText( tr2i18n( "Place files in current directory, replacing existing files" ) );
    checkClose->setText( tr2i18n( "Close, when all operations succeeded" ) );
    pushOK->setText( tr2i18n( "OK" ) );
    pushCancel->setText( tr2i18n( "Cancel" ) );
}

/****************************************************************************
** SQ_ImageEditOptions meta object code from reading C++ file 'sq_imageeditoptions.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 "sq_imageeditoptions.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 *SQ_ImageEditOptions::className() const
{
    return "SQ_ImageEditOptions";
}

TQMetaObject *SQ_ImageEditOptions::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SQ_ImageEditOptions( "SQ_ImageEditOptions", &SQ_ImageEditOptions::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SQ_ImageEditOptions::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(
	"SQ_ImageEditOptions", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SQ_ImageEditOptions.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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