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

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

#include "kcmkuickdialog.h"

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

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

    m_chkShow = new TQCheckBox( this, "m_chkShow" );
    KCMKuickDialogLayout->addWidget( m_chkShow );

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

    pbCopyClear = new TQPushButton( m_grpCopy, "pbCopyClear" );

    m_grpCopyLayout->addWidget( pbCopyClear, 2, 0 );

    m_txtCopyDir = new TQLabel( m_grpCopy, "m_txtCopyDir" );

    m_grpCopyLayout->addWidget( m_txtCopyDir, 0, 2 );

    m_txtCopyCache = new TQLabel( m_grpCopy, "m_txtCopyCache" );
    m_txtCopyCache->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, m_txtCopyCache->sizePolicy().hasHeightForWidth() ) );

    m_grpCopyLayout->addWidget( m_txtCopyCache, 0, 0 );

    m_sbCopy = new TQSpinBox( m_grpCopy, "m_sbCopy" );
    m_sbCopy->setMaxValue( 20 );
    m_sbCopy->setMinValue( 1 );

    m_grpCopyLayout->addWidget( m_sbCopy, 0, 1 );
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    m_grpCopyLayout->addItem( Spacer2, 0, 3 );
    KCMKuickDialogLayout->addWidget( m_grpCopy );

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

    pbMoveClear = new TQPushButton( m_grpMove, "pbMoveClear" );

    m_grpMoveLayout->addWidget( pbMoveClear, 2, 0 );

    m_txtMoveCache = new TQLabel( m_grpMove, "m_txtMoveCache" );

    m_grpMoveLayout->addWidget( m_txtMoveCache, 0, 0 );

    m_sbMove = new TQSpinBox( m_grpMove, "m_sbMove" );
    m_sbMove->setMaxValue( 20 );
    m_sbMove->setMinValue( 1 );

    m_grpMoveLayout->addWidget( m_sbMove, 0, 1 );

    m_txtMoveDir = new TQLabel( m_grpMove, "m_txtMoveDir" );

    m_grpMoveLayout->addWidget( m_txtMoveDir, 0, 2 );
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    m_grpMoveLayout->addItem( Spacer3, 0, 3 );
    KCMKuickDialogLayout->addWidget( m_grpMove );
    languageChange();
    resize( TQSize(598, 190).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_sbCopy, pbCopyClear );
    setTabOrder( pbCopyClear, m_sbMove );
    setTabOrder( m_sbMove, pbMoveClear );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KCMKuickDialog::languageChange()
{
    m_chkShow->setText( tr2i18n( "&Show \"Copy To\" and \"Move To\" entries in context menus" ) );
    m_grpCopy->setTitle( tr2i18n( "Copy Operations" ) );
    pbCopyClear->setText( tr2i18n( "&Clear List" ) );
    m_txtCopyDir->setText( tr2i18n( "folders." ) );
    m_txtCopyCache->setText( tr2i18n( "Cache the last" ) );
    m_grpMove->setTitle( tr2i18n( "Move Operations" ) );
    pbMoveClear->setText( tr2i18n( "Clear &List" ) );
    m_txtMoveCache->setText( tr2i18n( "Cache the last" ) );
    m_txtMoveDir->setText( tr2i18n( "folders." ) );
}

void KCMKuickDialog::slotClearMoveCache()
{
    tqWarning( "KCMKuickDialog::slotClearMoveCache(): Not implemented yet" );
}

void KCMKuickDialog::slotClearCopyCache()
{
    tqWarning( "KCMKuickDialog::slotClearCopyCache(): Not implemented yet" );
}

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

TQMetaObject *KCMKuickDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KCMKuickDialog( "KCMKuickDialog", &KCMKuickDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KCMKuickDialog::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 TQUMethod slot_1 = {"slotClearCopyCache", 0, 0 };
    static const TQUMethod slot_2 = {"slotClearMoveCache", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "slotClearCopyCache()", &slot_1, TQMetaData::Protected },
	{ "slotClearMoveCache()", &slot_2, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KCMKuickDialog", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KCMKuickDialog.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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