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

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

#include "eventconfigurationdlgs.h"

#include <ntqvariant.h>
#include <tdelistview.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    enableEventsBox = new TQCheckBox( this, "enableEventsBox" );
    enableEventsBox->setChecked( true );

    EventConfigurationDlgSLayout->addWidget( enableEventsBox, 0, 0 );

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

    addButton = new KPushButton( groupBox1, "addButton" );

    groupBox1Layout->addWidget( addButton, 1, 0 );

    editButton = new KPushButton( groupBox1, "editButton" );

    groupBox1Layout->addWidget( editButton, 1, 2 );
    spacer4 = new TQSpacerItem( 172, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addItem( spacer4, 1, 1 );

    eventsListView = new TDEListView( groupBox1, "eventsListView" );
    eventsListView->addColumn( tr2i18n( "Event" ) );
    eventsListView->addColumn( tr2i18n( "Action" ) );
    eventsListView->addColumn( tr2i18n( "Argument 1" ) );
    eventsListView->addColumn( tr2i18n( "Argument 2" ) );
    eventsListView->addColumn( tr2i18n( "Argument 3" ) );
    eventsListView->addColumn( tr2i18n( "Argument 4" ) );

    groupBox1Layout->addMultiCellWidget( eventsListView, 0, 0, 0, 4 );
    spacer3 = new TQSpacerItem( 150, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addItem( spacer3, 1, 3 );

    deleteButton = new KPushButton( groupBox1, "deleteButton" );

    groupBox1Layout->addWidget( deleteButton, 1, 4 );

    EventConfigurationDlgSLayout->addWidget( groupBox1, 1, 0 );
    languageChange();
    resize( TQSize(600, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( addButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotAddEvent() ) );
    connect( deleteButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotDeleteEvent() ) );
    connect( editButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotEditEvent() ) );
    connect( eventsListView, TQ_SIGNAL( doubleClicked(TQListViewItem*) ), this, TQ_SLOT( slotEditEvent() ) );
    connect( enableEventsBox, TQ_SIGNAL( toggled(bool) ), groupBox1, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( eventsListView, addButton );
    setTabOrder( addButton, editButton );
    setTabOrder( editButton, deleteButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EventConfigurationDlgS::languageChange()
{
    enableEventsBox->setText( tr2i18n( "Ena&ble the event actions" ) );
    groupBox1->setTitle( tr2i18n( "Configure Events" ) );
    addButton->setText( tr2i18n( "&Add" ) );
    editButton->setText( tr2i18n( "&Edit" ) );
    eventsListView->header()->setLabel( 0, tr2i18n( "Event" ) );
    eventsListView->header()->setLabel( 1, tr2i18n( "Action" ) );
    eventsListView->header()->setLabel( 2, tr2i18n( "Argument 1" ) );
    eventsListView->header()->setLabel( 3, tr2i18n( "Argument 2" ) );
    eventsListView->header()->setLabel( 4, tr2i18n( "Argument 3" ) );
    eventsListView->header()->setLabel( 5, tr2i18n( "Argument 4" ) );
    deleteButton->setText( tr2i18n( "&Delete" ) );
}

void EventConfigurationDlgS::slotEditEvent()
{
    tqWarning( "EventConfigurationDlgS::slotEditEvent(): Not implemented yet" );
}

void EventConfigurationDlgS::slotAddEvent()
{
    tqWarning( "EventConfigurationDlgS::slotAddEvent(): Not implemented yet" );
}

void EventConfigurationDlgS::slotDeleteEvent()
{
    tqWarning( "EventConfigurationDlgS::slotDeleteEvent(): Not implemented yet" );
}

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

TQMetaObject *EventConfigurationDlgS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_EventConfigurationDlgS( "EventConfigurationDlgS", &EventConfigurationDlgS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* EventConfigurationDlgS::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 = {"slotEditEvent", 0, 0 };
    static const TQUMethod slot_1 = {"slotAddEvent", 0, 0 };
    static const TQUMethod slot_2 = {"slotDeleteEvent", 0, 0 };
    static const TQUMethod slot_3 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotEditEvent()", &slot_0, TQMetaData::Public },
	{ "slotAddEvent()", &slot_1, TQMetaData::Public },
	{ "slotDeleteEvent()", &slot_2, TQMetaData::Public },
	{ "languageChange()", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"EventConfigurationDlgS", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_EventConfigurationDlgS.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool EventConfigurationDlgS::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotEditEvent(); break;
    case 1: slotAddEvent(); break;
    case 2: slotDeleteEvent(); break;
    case 3: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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