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

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

#include "edittypebase.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kicondialog.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a EditTypeBase 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.
 */
EditTypeBase::EditTypeBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "EditTypeBase" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
    EditTypeBaseLayout = new TQVBoxLayout( this, 11, 6, "EditTypeBaseLayout"); 

    label15 = new TQLabel( this, "label15" );
    EditTypeBaseLayout->addWidget( label15 );

    layout8 = new TQHBoxLayout( 0, 0, 6, "layout8"); 

    layout8_2 = new TQVBoxLayout( 0, 0, 6, "layout8_2"); 

    Layout2 = new TQHBoxLayout( 0, 0, 6, "Layout2"); 

    label16 = new TQLabel( this, "label16" );
    Layout2->addWidget( label16 );

    editName = new KLineEdit( this, "editName" );
    Layout2->addWidget( editName );
    layout8_2->addLayout( Layout2 );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 

    label17 = new TQLabel( this, "label17" );
    Layout1->addWidget( label17 );

    editDescription = new KLineEdit( this, "editDescription" );
    Layout1->addWidget( editDescription );
    layout8_2->addLayout( Layout1 );
    layout8->addLayout( layout8_2 );

    layout23 = new TQVBoxLayout( 0, 0, 6, "layout23"); 

    typeIcon = new TDEIconButton( this, "typeIcon" );
    layout23->addWidget( typeIcon );
    spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout23->addItem( spacer );
    layout8->addLayout( layout23 );
    EditTypeBaseLayout->addLayout( layout8 );

    Line1 = new TQFrame( this, "Line1" );
    Line1->setFrameShape( TQFrame::HLine );
    Line1->setFrameShadow( TQFrame::Sunken );
    Line1->setFrameShape( TQFrame::HLine );
    EditTypeBaseLayout->addWidget( Line1 );

    layout24 = new TQHBoxLayout( 0, 0, 6, "layout24"); 

    buttonHelp = new KPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( true );
    layout24->addWidget( buttonHelp );
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout24->addItem( Horizontal_Spacing2 );

    buttonOk = new KPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    layout24->addWidget( buttonOk );

    buttonCancel = new KPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    layout24->addWidget( buttonCancel );
    EditTypeBaseLayout->addLayout( layout24 );
    languageChange();
    resize( TQSize(481, 142).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonHelp, TQ_SIGNAL( clicked() ), this, TQ_SLOT( helpSlot() ) );
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( okSlot() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( cancelSlot() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EditTypeBase::languageChange()
{
    setCaption( tr2i18n( "Edit Type" ) );
    label15->setText( tr2i18n( "Here you can modify the name, the description and the icon of this macro type." ) );
    label16->setText( tr2i18n( "Name:" ) );
    TQWhatsThis::add( editName, tr2i18n( "Here you can edit the name of the current macro type." ) );
    label17->setText( tr2i18n( "Description:" ) );
    TQWhatsThis::add( editDescription, tr2i18n( "Here you can edit the description of the current macro type. This field is optional, so you can also leave this empty: if you do so, then your macro type will have no description." ) );
    typeIcon->setText( TQString::null );
    TQWhatsThis::add( typeIcon, tr2i18n( "Use this button to change the icon of the current macro type." ) );
    buttonHelp->setText( tr2i18n( "&Help" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
}

void EditTypeBase::helpSlot()
{
    tqWarning( "EditTypeBase::helpSlot(): Not implemented yet" );
}

void EditTypeBase::okSlot()
{
    tqWarning( "EditTypeBase::okSlot(): Not implemented yet" );
}

void EditTypeBase::cancelSlot()
{
    tqWarning( "EditTypeBase::cancelSlot(): Not implemented yet" );
}

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

TQMetaObject *EditTypeBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_EditTypeBase( "EditTypeBase", &EditTypeBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool EditTypeBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: helpSlot(); break;
    case 1: okSlot(); break;
    case 2: cancelSlot(); break;
    case 3: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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