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

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

#include "abbreviations.h"

#include <ntqvariant.h>
#include <tdelistview.h>
#include <tdelistbox.h>
#include <kpushbutton.h>
#include <kcombobox.h>
#include <ntqlabel.h>
#include <ntqtextedit.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    addDTEPButton = new KPushButton( this, "addDTEPButton" );

    AbbreviationDlgSLayout->addMultiCellWidget( addDTEPButton, 1, 1, 2, 3 );

    removeDTEPButton = new KPushButton( this, "removeDTEPButton" );

    AbbreviationDlgSLayout->addMultiCellWidget( removeDTEPButton, 2, 2, 2, 3 );

    newGroupButton = new KPushButton( this, "newGroupButton" );

    AbbreviationDlgSLayout->addMultiCellWidget( newGroupButton, 0, 0, 2, 3 );

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    textLabel1_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );

    AbbreviationDlgSLayout->addWidget( textLabel1_2, 0, 0 );

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );

    AbbreviationDlgSLayout->addWidget( textLabel1, 1, 0 );

    groupCombo = new KComboBox( false, this, "groupCombo" );
    groupCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, groupCombo->sizePolicy().hasHeightForWidth() ) );

    AbbreviationDlgSLayout->addWidget( groupCombo, 0, 1 );

    codeEdit = new TQTextEdit( this, "codeEdit" );
    codeEdit->setTextFormat( TQTextEdit::PlainText );

    AbbreviationDlgSLayout->addMultiCellWidget( codeEdit, 10, 10, 0, 3 );

    templatesList = new TDEListView( this, "templatesList" );
    templatesList->addColumn( tr2i18n( "Template" ) );
    templatesList->addColumn( tr2i18n( "Description" ) );
    templatesList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, templatesList->sizePolicy().hasHeightForWidth() ) );
    templatesList->setResizeMode( TDEListView::LastColumn );
    templatesList->setFullWidth( true );

    AbbreviationDlgSLayout->addMultiCellWidget( templatesList, 5, 8, 0, 1 );

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

    AbbreviationDlgSLayout->addMultiCellWidget( addButton, 5, 5, 2, 3 );
    spacer4 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
    AbbreviationDlgSLayout->addItem( spacer4, 8, 3 );

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

    AbbreviationDlgSLayout->addMultiCellWidget( removeButton, 6, 6, 2, 3 );

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

    AbbreviationDlgSLayout->addMultiCellWidget( editButton, 7, 7, 2, 3 );

    textLabel2 = new TQLabel( this, "textLabel2" );
    textLabel2->setFrameShape( TQLabel::NoFrame );
    textLabel2->setFrameShadow( TQLabel::Plain );

    AbbreviationDlgSLayout->addMultiCellWidget( textLabel2, 9, 9, 0, 2 );

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

    AbbreviationDlgSLayout->addWidget( textLabel3, 4, 0 );

    dtepList = new TDEListBox( this, "dtepList" );
    dtepList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, dtepList->sizePolicy().hasHeightForWidth() ) );
    dtepList->setSelectionMode( TDEListBox::Extended );

    AbbreviationDlgSLayout->addMultiCellWidget( dtepList, 1, 3, 1, 1 );
    spacer2 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    AbbreviationDlgSLayout->addMultiCell( spacer2, 3, 4, 3, 3 );
    languageChange();
    resize( TQSize(600, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( templatesList, TQ_SIGNAL( selectionChanged(TQListViewItem*) ), this, TQ_SLOT( slotTemplateSelectionChanged(TQListViewItem*) ) );
    connect( addButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotAddTemplate() ) );
    connect( removeButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotRemoveTemplate() ) );
    connect( editButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotEditTemplate() ) );
    connect( groupCombo, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( slotGroupChanged(const TQString&) ) );
    connect( newGroupButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotNewGroup() ) );
    connect( addDTEPButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotAddDTEP() ) );
    connect( removeDTEPButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotRemoveDTEP() ) );
    connect( templatesList, TQ_SIGNAL( doubleClicked(TQListViewItem*) ), this, TQ_SLOT( slotEditTemplate() ) );

    // tab order
    setTabOrder( templatesList, groupCombo );
    setTabOrder( groupCombo, newGroupButton );
    setTabOrder( newGroupButton, dtepList );
    setTabOrder( dtepList, addDTEPButton );
    setTabOrder( addDTEPButton, removeDTEPButton );
    setTabOrder( removeDTEPButton, addButton );
    setTabOrder( addButton, removeButton );
    setTabOrder( removeButton, editButton );
    setTabOrder( editButton, codeEdit );

    // buddies
    textLabel1_2->setBuddy( groupCombo );
    textLabel1->setBuddy( dtepList );
    textLabel2->setBuddy( codeEdit );
    textLabel3->setBuddy( templatesList );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AbbreviationDlgS::languageChange()
{
    setCaption( tr2i18n( "Abbreviations" ) );
    addDTEPButton->setText( tr2i18n( "Add..." ) );
    removeDTEPButton->setText( tr2i18n( "Remove" ) );
    newGroupButton->setText( tr2i18n( "&New..." ) );
    textLabel1_2->setText( tr2i18n( "&Group:" ) );
    textLabel1->setText( tr2i18n( "&Valid for:" ) );
    templatesList->header()->setLabel( 0, tr2i18n( "Template" ) );
    templatesList->header()->setLabel( 1, tr2i18n( "Description" ) );
    addButton->setText( tr2i18n( "&Add..." ) );
    removeButton->setText( tr2i18n( "&Remove" ) );
    editButton->setText( tr2i18n( "&Edit..." ) );
    textLabel2->setText( tr2i18n( "Expands to:" ) );
    textLabel3->setText( tr2i18n( "&Templates:" ) );
}

void AbbreviationDlgS::slotTemplateSelectionChanged(TQListViewItem*)
{
    tqWarning( "AbbreviationDlgS::slotTemplateSelectionChanged(TQListViewItem*): Not implemented yet" );
}

void AbbreviationDlgS::dtdCombo_activated(const TQString&)
{
    tqWarning( "AbbreviationDlgS::dtdCombo_activated(const TQString&): Not implemented yet" );
}

void AbbreviationDlgS::slotGroupChanged(const TQString&)
{
    tqWarning( "AbbreviationDlgS::slotGroupChanged(const TQString&): Not implemented yet" );
}

void AbbreviationDlgS::slotAddTemplate()
{
    tqWarning( "AbbreviationDlgS::slotAddTemplate(): Not implemented yet" );
}

void AbbreviationDlgS::slotRemoveTemplate()
{
    tqWarning( "AbbreviationDlgS::slotRemoveTemplate(): Not implemented yet" );
}

void AbbreviationDlgS::templatesList_currentChanged(TQListViewItem*)
{
    tqWarning( "AbbreviationDlgS::templatesList_currentChanged(TQListViewItem*): Not implemented yet" );
}

void AbbreviationDlgS::slotEditTemplate()
{
    tqWarning( "AbbreviationDlgS::slotEditTemplate(): Not implemented yet" );
}

void AbbreviationDlgS::slotAddDTEP()
{
    tqWarning( "AbbreviationDlgS::slotAddDTEP(): Not implemented yet" );
}

void AbbreviationDlgS::slotRemoveDTEP()
{
    tqWarning( "AbbreviationDlgS::slotRemoveDTEP(): Not implemented yet" );
}

void AbbreviationDlgS::slotNewGroup()
{
    tqWarning( "AbbreviationDlgS::slotNewGroup(): Not implemented yet" );
}

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

TQMetaObject *AbbreviationDlgS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AbbreviationDlgS( "AbbreviationDlgS", &AbbreviationDlgS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* AbbreviationDlgS::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 TQUParameter param_slot_0[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"slotTemplateSelectionChanged", 1, param_slot_0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"dtdCombo_activated", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"slotGroupChanged", 1, param_slot_2 };
    static const TQUMethod slot_3 = {"slotAddTemplate", 0, 0 };
    static const TQUMethod slot_4 = {"slotRemoveTemplate", 0, 0 };
    static const TQUParameter param_slot_5[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_5 = {"templatesList_currentChanged", 1, param_slot_5 };
    static const TQUMethod slot_6 = {"slotEditTemplate", 0, 0 };
    static const TQUMethod slot_7 = {"slotAddDTEP", 0, 0 };
    static const TQUMethod slot_8 = {"slotRemoveDTEP", 0, 0 };
    static const TQUMethod slot_9 = {"slotNewGroup", 0, 0 };
    static const TQUMethod slot_10 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotTemplateSelectionChanged(TQListViewItem*)", &slot_0, TQMetaData::Public },
	{ "dtdCombo_activated(const TQString&)", &slot_1, TQMetaData::Public },
	{ "slotGroupChanged(const TQString&)", &slot_2, TQMetaData::Public },
	{ "slotAddTemplate()", &slot_3, TQMetaData::Public },
	{ "slotRemoveTemplate()", &slot_4, TQMetaData::Public },
	{ "templatesList_currentChanged(TQListViewItem*)", &slot_5, TQMetaData::Public },
	{ "slotEditTemplate()", &slot_6, TQMetaData::Public },
	{ "slotAddDTEP()", &slot_7, TQMetaData::Public },
	{ "slotRemoveDTEP()", &slot_8, TQMetaData::Public },
	{ "slotNewGroup()", &slot_9, TQMetaData::Public },
	{ "languageChange()", &slot_10, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"AbbreviationDlgS", parentObject,
	slot_tbl, 11,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_AbbreviationDlgS.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool AbbreviationDlgS::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotTemplateSelectionChanged((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 1: dtdCombo_activated((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 2: slotGroupChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 3: slotAddTemplate(); break;
    case 4: slotRemoveTemplate(); break;
    case 5: templatesList_currentChanged((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 6: slotEditTemplate(); break;
    case 7: slotAddDTEP(); break;
    case 8: slotRemoveDTEP(); break;
    case 9: slotNewGroup(); break;
    case 10: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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