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

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

#include "subclassingdlgbase.h"

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

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

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

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

    groupBox1Layout->addMultiCellWidget( textLabel1, 2, 2, 0, 2 );

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

    groupBox1Layout->addMultiCellWidget( m_edClassName, 0, 0, 1, 2 );

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( textLabel2, 0, 0 );

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

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

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

    groupBox1Layout->addMultiCellWidget( m_edFileName, 1, 1, 1, 2 );

    m_slotView = new TQListView( groupBox1, "m_slotView" );
    m_slotView->addColumn( tr2i18n( "Method" ) );
    m_slotView->addColumn( tr2i18n( "Access" ) );
    m_slotView->addColumn( tr2i18n( "Specifier" ) );
    m_slotView->addColumn( tr2i18n( "Return Type" ) );
    m_slotView->addColumn( tr2i18n( "Type" ) );

    groupBox1Layout->addMultiCellWidget( m_slotView, 3, 3, 0, 2 );

    reformat_box = new TQCheckBox( groupBox1, "reformat_box" );

    groupBox1Layout->addMultiCellWidget( reformat_box, 4, 4, 0, 1 );

    reformatDefault_box = new TQCheckBox( groupBox1, "reformatDefault_box" );
    reformatDefault_box->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)0, 0, 0, reformatDefault_box->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( reformatDefault_box, 4, 2 );

    SubclassingDlgBaseLayout->addMultiCellWidget( groupBox1, 0, 0, 0, 2 );

    m_btnOk = new TQPushButton( this, "m_btnOk" );
    m_btnOk->setDefault( true );

    SubclassingDlgBaseLayout->addWidget( m_btnOk, 1, 1 );

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

    SubclassingDlgBaseLayout->addWidget( m_btnCancel, 1, 2 );
    spacer1 = new TQSpacerItem( 110, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    SubclassingDlgBaseLayout->addItem( spacer1, 1, 0 );
    languageChange();
    resize( TQSize(588, 493).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_btnOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( m_btnCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( m_edClassName, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( onChangedClassName() ) );

    // buddies
    textLabel1->setBuddy( m_slotView );
    textLabel2->setBuddy( m_edClassName );
    textLabel3->setBuddy( m_edFileName );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SubclassingDlgBase::languageChange()
{
    setCaption( tr2i18n( "Create Subclass" ) );
    groupBox1->setTitle( tr2i18n( "Subclass Properties" ) );
    textLabel1->setText( tr2i18n( "&Specialize following slots:" ) );
    textLabel2->setText( tr2i18n( "C&lass name:" ) );
    textLabel3->setText( tr2i18n( "F&ile name:" ) );
    m_slotView->header()->setLabel( 0, tr2i18n( "Method" ) );
    m_slotView->header()->setLabel( 1, tr2i18n( "Access" ) );
    m_slotView->header()->setLabel( 2, tr2i18n( "Specifier" ) );
    m_slotView->header()->setLabel( 3, tr2i18n( "Return Type" ) );
    m_slotView->header()->setLabel( 4, tr2i18n( "Type" ) );
    reformat_box->setText( tr2i18n( "Re&format source" ) );
    reformatDefault_box->setText( tr2i18n( "Reformat source by &default" ) );
    m_btnOk->setText( tr2i18n( "C&reate" ) );
    m_btnCancel->setText( tr2i18n( "&Cancel" ) );
}

void SubclassingDlgBase::onChangedClassName()
{
    tqWarning( "SubclassingDlgBase::onChangedClassName(): Not implemented yet" );
}

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

TQMetaObject *SubclassingDlgBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SubclassingDlgBase( "SubclassingDlgBase", &SubclassingDlgBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool SubclassingDlgBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: onChangedClassName(); break;
    case 1: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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