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

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

#include "addattributedialogbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a AddAttributeDialogBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
AddAttributeDialogBase::AddAttributeDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "AddAttributeDialogBase" );
    setSizeGripEnabled( true );
    AddAttributeDialogBaseLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "AddAttributeDialogBaseLayout"); 

    attributes = new TQListView( this, "attributes" );
    attributes->addColumn( tr2i18n( "Access" ) );
    attributes->addColumn( tr2i18n( "Storage" ) );
    attributes->addColumn( tr2i18n( "Type" ) );
    attributes->addColumn( tr2i18n( "Declarator" ) );
    attributes->setAllColumnsShowFocus( true );
    attributes->setResizeMode( TQListView::LastColumn );
    AddAttributeDialogBaseLayout->addWidget( attributes );

    layout3 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout3"); 
    spacer3 = new TQSpacerItem( 111, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer3 );

    addAttributeButton = new TQPushButton( this, "addAttributeButton" );
    layout3->addWidget( addAttributeButton );

    deleteAttributeButton = new TQPushButton( this, "deleteAttributeButton" );
    layout3->addWidget( deleteAttributeButton );
    AddAttributeDialogBaseLayout->addLayout( layout3 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( KDialog::spacingHint() );
    groupBox1->layout()->setMargin( KDialog::marginHint() );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

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

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );

    layout4->addWidget( textLabel1, 0, 0 );

    returnType = new TQComboBox( false, groupBox1, "returnType" );
    returnType->setEditable( true );

    layout4->addWidget( returnType, 1, 0 );

    declarator = new KLineEdit( groupBox1, "declarator" );

    layout4->addWidget( declarator, 1, 1 );

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );

    layout4->addWidget( textLabel2, 0, 1 );
    groupBox1Layout->addLayout( layout4 );

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

    storage = new TQComboBox( false, groupBox1, "storage" );

    layout5->addWidget( storage, 1, 1 );

    textLabel5 = new TQLabel( groupBox1, "textLabel5" );

    layout5->addWidget( textLabel5, 0, 1 );

    textLabel3 = new TQLabel( groupBox1, "textLabel3" );

    layout5->addWidget( textLabel3, 0, 0 );

    access = new TQComboBox( false, groupBox1, "access" );

    layout5->addWidget( access, 1, 0 );
    groupBox1Layout->addLayout( layout5 );
    AddAttributeDialogBaseLayout->addWidget( groupBox1 );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    Layout1->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout1->addWidget( buttonCancel );
    AddAttributeDialogBaseLayout->addLayout( Layout1 );
    languageChange();
    resize( TQSize(619, 413).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( addAttributeButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addAttribute() ) );
    connect( deleteAttributeButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( deleteCurrentAttribute() ) );
    connect( attributes, TQ_SIGNAL( selectionChanged(TQListViewItem*) ), this, TQ_SLOT( currentChanged(TQListViewItem*) ) );
    connect( returnType, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( updateGUI() ) );
    connect( declarator, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( updateGUI() ) );
    connect( access, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( updateGUI() ) );
    connect( storage, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( updateGUI() ) );
    connect( returnType, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( updateGUI() ) );

    // tab order
    setTabOrder( attributes, addAttributeButton );
    setTabOrder( addAttributeButton, deleteAttributeButton );
    setTabOrder( deleteAttributeButton, returnType );
    setTabOrder( returnType, declarator );
    setTabOrder( declarator, access );
    setTabOrder( access, storage );
    setTabOrder( storage, buttonOk );
    setTabOrder( buttonOk, buttonCancel );

    // buddies
    textLabel1->setBuddy( returnType );
    textLabel2->setBuddy( declarator );
    textLabel5->setBuddy( storage );
    textLabel3->setBuddy( access );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AddAttributeDialogBase::languageChange()
{
    setCaption( tr2i18n( "Add Attribute" ) );
    attributes->header()->setLabel( 0, tr2i18n( "Access" ) );
    attributes->header()->setLabel( 1, tr2i18n( "Storage" ) );
    attributes->header()->setLabel( 2, tr2i18n( "Type" ) );
    attributes->header()->setLabel( 3, tr2i18n( "Declarator" ) );
    addAttributeButton->setText( tr2i18n( "&Add Attribute" ) );
    deleteAttributeButton->setText( tr2i18n( "&Delete Attribute" ) );
    groupBox1->setTitle( tr2i18n( "Attribute Properties" ) );
    textLabel1->setText( tr2i18n( "T&ype:" ) );
    textLabel2->setText( tr2i18n( "D&eclarator:" ) );
    textLabel5->setText( tr2i18n( "S&torage:" ) );
    textLabel3->setText( tr2i18n( "Acce&ss:" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
}

void AddAttributeDialogBase::init()
{
}

void AddAttributeDialogBase::destroy()
{
}

void AddAttributeDialogBase::addAttribute()
{
    tqWarning( "AddAttributeDialogBase::addAttribute(): Not implemented yet" );
}

void AddAttributeDialogBase::deleteCurrentAttribute()
{
    tqWarning( "AddAttributeDialogBase::deleteCurrentAttribute(): Not implemented yet" );
}

void AddAttributeDialogBase::currentChanged(TQListViewItem*)
{
    tqWarning( "AddAttributeDialogBase::currentChanged(TQListViewItem*): Not implemented yet" );
}

void AddAttributeDialogBase::updateGUI()
{
    tqWarning( "AddAttributeDialogBase::updateGUI(): Not implemented yet" );
}

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

TQMetaObject *AddAttributeDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AddAttributeDialogBase( "AddAttributeDialogBase", &AddAttributeDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* AddAttributeDialogBase::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"addAttribute", 0, 0 };
    static const TQUMethod slot_1 = {"deleteCurrentAttribute", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"currentChanged", 1, param_slot_2 };
    static const TQUMethod slot_3 = {"updateGUI", 0, 0 };
    static const TQUMethod slot_4 = {"languageChange", 0, 0 };
    static const TQUMethod slot_5 = {"init", 0, 0 };
    static const TQUMethod slot_6 = {"destroy", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "addAttribute()", &slot_0, TQMetaData::Public },
	{ "deleteCurrentAttribute()", &slot_1, TQMetaData::Public },
	{ "currentChanged(TQListViewItem*)", &slot_2, TQMetaData::Public },
	{ "updateGUI()", &slot_3, TQMetaData::Public },
	{ "languageChange()", &slot_4, TQMetaData::Protected },
	{ "init()", &slot_5, TQMetaData::Protected },
	{ "destroy()", &slot_6, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"AddAttributeDialogBase", parentObject,
	slot_tbl, 7,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_AddAttributeDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool AddAttributeDialogBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: addAttribute(); break;
    case 1: deleteCurrentAttribute(); break;
    case 2: currentChanged((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 3: updateGUI(); break;
    case 4: languageChange(); break;
    case 5: init(); break;
    case 6: destroy(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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