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

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

#include "abbrevconfigwidgetbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqmultilineedit.h>
#include <ntqcheckbox.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a AbbrevConfigWidgetBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
AbbrevConfigWidgetBase::AbbrevConfigWidgetBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "abbrev_config_widget" );
    abbrev_config_widgetLayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "abbrev_config_widgetLayout"); 

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

    abbrev_config_widgetLayout->addWidget( TextLabel2, 2, 0 );

    editCode = new TQMultiLineEdit( this, "editCode" );

    abbrev_config_widgetLayout->addWidget( editCode, 3, 0 );

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

    abbrev_config_widgetLayout->addWidget( checkWordCompletion, 0, 0 );

    layout2 = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout2"); 

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

    layout2->addWidget( buttonRemoveTemplate, 2, 1 );

    listTemplates = new TQListView( this, "listTemplates" );
    listTemplates->addColumn( tr2i18n( "Template" ) );
    listTemplates->addColumn( tr2i18n( "Description" ) );
    listTemplates->addColumn( tr2i18n( "Suffixes" ) );
    listTemplates->setAllColumnsShowFocus( true );
    listTemplates->setResizeMode( TQListView::AllColumns );

    layout2->addMultiCellWidget( listTemplates, 1, 3, 0, 0 );

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

    layout2->addWidget( buttonAddTemplate, 1, 1 );

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

    layout2->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 );
    Spacer1 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout2->addItem( Spacer1, 3, 1 );

    abbrev_config_widgetLayout->addLayout( layout2, 1, 0 );
    languageChange();
    resize( TQSize(474, 410).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonAddTemplate, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addTemplate() ) );
    connect( buttonRemoveTemplate, TQ_SIGNAL( clicked() ), this, TQ_SLOT( removeTemplate() ) );
    connect( editCode, TQ_SIGNAL( textChanged() ), this, TQ_SLOT( codeChanged() ) );
    connect( listTemplates, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( selectionChanged() ) );

    // tab order
    setTabOrder( checkWordCompletion, listTemplates );
    setTabOrder( listTemplates, buttonAddTemplate );
    setTabOrder( buttonAddTemplate, buttonRemoveTemplate );
    setTabOrder( buttonRemoveTemplate, editCode );

    // buddies
    TextLabel2->setBuddy( editCode );
    TextLabel1->setBuddy( listTemplates );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AbbrevConfigWidgetBase::languageChange()
{
    setCaption( tr2i18n( "Code Templates" ) );
    TextLabel2->setText( tr2i18n( "Co&de:" ) );
    checkWordCompletion->setText( tr2i18n( "&Enable automatic word completion" ) );
    buttonRemoveTemplate->setText( tr2i18n( "&Remove" ) );
    listTemplates->header()->setLabel( 0, tr2i18n( "Template" ) );
    listTemplates->header()->setLabel( 1, tr2i18n( "Description" ) );
    listTemplates->header()->setLabel( 2, tr2i18n( "Suffixes" ) );
    buttonAddTemplate->setText( tr2i18n( "&Add..." ) );
    TextLabel1->setText( tr2i18n( "&Templates:" ) );
}

void AbbrevConfigWidgetBase::addTemplate()
{
    tqWarning( "AbbrevConfigWidgetBase::addTemplate(): Not implemented yet" );
}

void AbbrevConfigWidgetBase::codeChanged()
{
    tqWarning( "AbbrevConfigWidgetBase::codeChanged(): Not implemented yet" );
}

void AbbrevConfigWidgetBase::removeTemplate()
{
    tqWarning( "AbbrevConfigWidgetBase::removeTemplate(): Not implemented yet" );
}

void AbbrevConfigWidgetBase::selectionChanged()
{
    tqWarning( "AbbrevConfigWidgetBase::selectionChanged(): Not implemented yet" );
}

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

TQMetaObject *AbbrevConfigWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AbbrevConfigWidgetBase( "AbbrevConfigWidgetBase", &AbbrevConfigWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* AbbrevConfigWidgetBase::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 = {"addTemplate", 0, 0 };
    static const TQUMethod slot_2 = {"codeChanged", 0, 0 };
    static const TQUMethod slot_3 = {"removeTemplate", 0, 0 };
    static const TQUMethod slot_4 = {"selectionChanged", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "addTemplate()", &slot_1, TQMetaData::Protected },
	{ "codeChanged()", &slot_2, TQMetaData::Protected },
	{ "removeTemplate()", &slot_3, TQMetaData::Protected },
	{ "selectionChanged()", &slot_4, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"AbbrevConfigWidgetBase", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_AbbrevConfigWidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool AbbrevConfigWidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: addTemplate(); break;
    case 2: codeChanged(); break;
    case 3: removeTemplate(); break;
    case 4: selectionChanged(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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