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

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

#include "implementationwidgetbase.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a CreateImplemenationWidgetBase 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.
 */
CreateImplemenationWidgetBase::CreateImplemenationWidgetBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "CreateImplemenationWidgetBase" );
    CreateImplemenationWidgetBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "CreateImplemenationWidgetBaseLayout"); 

    layout4 = new TQHBoxLayout( 0, 0, 6, "layout4"); 
    spacer4 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer4 );

    okButton = new TQPushButton( this, "okButton" );
    okButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, okButton->sizePolicy().hasHeightForWidth() ) );
    okButton->setDefault( true );
    layout4->addWidget( okButton );

    cancelButton = new TQPushButton( this, "cancelButton" );
    cancelButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, cancelButton->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( cancelButton );

    CreateImplemenationWidgetBaseLayout->addLayout( layout4, 1, 0 );

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    createButton = new TQRadioButton( buttonGroup1, "createButton" );
    createButton->setChecked( true );

    buttonGroup1Layout->addWidget( createButton, 0, 0 );

    classView = new TDEListView( buttonGroup1, "classView" );
    classView->addColumn( tr2i18n( "Class Name" ) );
    classView->addColumn( tr2i18n( "File" ) );
    classView->setEnabled( false );

    buttonGroup1Layout->addWidget( classView, 4, 0 );

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

    classNameLabel = new TQLabel( buttonGroup1, "classNameLabel" );
    layout2->addWidget( classNameLabel );

    classNameEdit = new KLineEdit( buttonGroup1, "classNameEdit" );
    layout2->addWidget( classNameEdit );

    buttonGroup1Layout->addLayout( layout2, 1, 0 );

    useButton = new TQRadioButton( buttonGroup1, "useButton" );

    buttonGroup1Layout->addWidget( useButton, 3, 0 );

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

    fileNameLabel = new TQLabel( buttonGroup1, "fileNameLabel" );
    layout2_2->addWidget( fileNameLabel );

    fileNameEdit = new KLineEdit( buttonGroup1, "fileNameEdit" );
    layout2_2->addWidget( fileNameEdit );

    buttonGroup1Layout->addLayout( layout2_2, 2, 0 );

    CreateImplemenationWidgetBaseLayout->addWidget( buttonGroup1, 0, 0 );
    languageChange();
    resize( TQSize(518, 353).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( okButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( createButton, TQ_SIGNAL( toggled(bool) ), classNameLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( createButton, TQ_SIGNAL( toggled(bool) ), classNameEdit, TQ_SLOT( setEnabled(bool) ) );
    connect( useButton, TQ_SIGNAL( toggled(bool) ), classView, TQ_SLOT( setEnabled(bool) ) );
    connect( createButton, TQ_SIGNAL( toggled(bool) ), fileNameLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( createButton, TQ_SIGNAL( toggled(bool) ), fileNameEdit, TQ_SLOT( setEnabled(bool) ) );
    connect( classNameEdit, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( classNameChanged(const TQString&) ) );

    // tab order
    setTabOrder( createButton, classNameEdit );
    setTabOrder( classNameEdit, fileNameEdit );
    setTabOrder( fileNameEdit, classView );
    setTabOrder( classView, okButton );
    setTabOrder( okButton, cancelButton );

    // buddies
    classNameLabel->setBuddy( classNameEdit );
    fileNameLabel->setBuddy( fileNameEdit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CreateImplemenationWidgetBase::languageChange()
{
    setCaption( tr2i18n( "Create or Select Implementation Class" ) );
    okButton->setText( tr2i18n( "&OK" ) );
    cancelButton->setText( tr2i18n( "&Cancel" ) );
    buttonGroup1->setTitle( TQString::null );
    createButton->setText( tr2i18n( "Create &new class" ) );
    classView->header()->setLabel( 0, tr2i18n( "Class Name" ) );
    classView->header()->setLabel( 1, tr2i18n( "File" ) );
    classNameLabel->setText( tr2i18n( "C&lass name:" ) );
    useButton->setText( tr2i18n( "Use &existing class" ) );
    fileNameLabel->setText( tr2i18n( "&File name:" ) );
}

void CreateImplemenationWidgetBase::classNameChanged(const TQString&)
{
    tqWarning( "CreateImplemenationWidgetBase::classNameChanged(const TQString&): Not implemented yet" );
}

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

TQMetaObject *CreateImplemenationWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CreateImplemenationWidgetBase( "CreateImplemenationWidgetBase", &CreateImplemenationWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CreateImplemenationWidgetBase::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 = {"languageChange", 0, 0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"classNameChanged", 1, param_slot_1 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "classNameChanged(const TQString&)", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"CreateImplemenationWidgetBase", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CreateImplemenationWidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool CreateImplemenationWidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: classNameChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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