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

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

#include "pasteoptionsbase.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqlistbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a PasteOptionsBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
PasteOptionsBase::PasteOptionsBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "PasteOptionsBase" );
    PasteOptionsBaseLayout = new TQGridLayout( this, 1, 1, 0, 6, "PasteOptionsBaseLayout"); 

    label_sep = new TQLabel( this, "label_sep" );

    PasteOptionsBaseLayout->addWidget( label_sep, 0, 0 );

    SeparatorCombo = new KComboBox( false, this, "SeparatorCombo" );
    SeparatorCombo->setMinimumSize( TQSize( 140, 0 ) );

    PasteOptionsBaseLayout->addWidget( SeparatorCombo, 0, 1 );
    Spacer3 = new TQSpacerItem( 310, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    PasteOptionsBaseLayout->addItem( Spacer3, 0, 2 );

    label_order = new TQGroupBox( this, "label_order" );
    label_order->setColumnLayout(0, TQt::Vertical );
    label_order->layout()->setSpacing( 6 );
    label_order->layout()->setMargin( 11 );
    label_orderLayout = new TQGridLayout( label_order->layout() );
    label_orderLayout->setAlignment( TQt::AlignTop );

    OrderList = new TQListBox( label_order, "OrderList" );
    OrderList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, OrderList->sizePolicy().hasHeightForWidth() ) );

    label_orderLayout->addMultiCellWidget( OrderList, 1, 4, 0, 0 );

    DownButton = new TQPushButton( label_order, "DownButton" );

    label_orderLayout->addWidget( DownButton, 3, 1 );

    SkipButton = new TQPushButton( label_order, "SkipButton" );

    label_orderLayout->addWidget( SkipButton, 2, 1 );

    UpButton = new TQPushButton( label_order, "UpButton" );

    label_orderLayout->addWidget( UpButton, 1, 1 );

    kcfg_UseCurrent = new TQCheckBox( label_order, "kcfg_UseCurrent" );

    label_orderLayout->addMultiCellWidget( kcfg_UseCurrent, 0, 0, 0, 1 );
    spacer5 = new TQSpacerItem( 21, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    label_orderLayout->addItem( spacer5, 4, 1 );

    PasteOptionsBaseLayout->addMultiCellWidget( label_order, 1, 1, 0, 2 );
    spacer4 = new TQSpacerItem( 80, 31, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    PasteOptionsBaseLayout->addMultiCell( spacer4, 2, 2, 1, 2 );
    languageChange();
    resize( TQSize(379, 275).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_UseCurrent, TQ_SIGNAL( toggled(bool) ), OrderList, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_UseCurrent, TQ_SIGNAL( toggled(bool) ), UpButton, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_UseCurrent, TQ_SIGNAL( toggled(bool) ), DownButton, TQ_SLOT( setDisabled(bool) ) );
    connect( kcfg_UseCurrent, TQ_SIGNAL( toggled(bool) ), SkipButton, TQ_SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( SeparatorCombo, kcfg_UseCurrent );
    setTabOrder( kcfg_UseCurrent, OrderList );
    setTabOrder( OrderList, UpButton );
    setTabOrder( UpButton, SkipButton );
    setTabOrder( SkipButton, DownButton );

    // buddies
    label_sep->setBuddy( SeparatorCombo );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PasteOptionsBase::languageChange()
{
    label_sep->setText( tr2i18n( "Sep&arator:" ) );
    TQToolTip::add( SeparatorCombo, tr2i18n( "Choose which separator you want to use to separate your data." ) );
    TQWhatsThis::add( SeparatorCombo, tr2i18n( "Choose one separator which will divide the parts of an expression when transferring data from or to another application over the clipboard." ) );
    label_order->setTitle( tr2i18n( "Order" ) );
    DownButton->setText( tr2i18n( "&Down" ) );
    SkipButton->setText( tr2i18n( "S&kip" ) );
    UpButton->setText( tr2i18n( "&Up" ) );
    kcfg_UseCurrent->setText( tr2i18n( "Use &current document" ) );
    TQToolTip::add( kcfg_UseCurrent, tr2i18n( "Check this if you want the items in the clipboard to be in the same language order as the current document." ) );
    TQWhatsThis::add( kcfg_UseCurrent, tr2i18n( "When checked, the items in the clipboard are assumed to be in the same language order as the current document." ) );
}

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

TQMetaObject *PasteOptionsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PasteOptionsBase( "PasteOptionsBase", &PasteOptionsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* PasteOptionsBase::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 = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"PasteOptionsBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PasteOptionsBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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