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

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

#include "classgeneratorconfigbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcombobox.h>
#include <ntqtextedit.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    templatename_box = new TQComboBox( false, groupBox7_2, "templatename_box" );

    groupBox7_2Layout->addWidget( templatename_box, 0, 0 );

    template_edit = new TQTextEdit( groupBox7_2, "template_edit" );

    groupBox7_2Layout->addWidget( template_edit, 1, 0 );

    ClassGeneratorConfigBaseLayout->addWidget( groupBox7_2, 0, 0 );

    groupBox10 = new TQGroupBox( this, "groupBox10" );
    groupBox10->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, groupBox10->sizePolicy().hasHeightForWidth() ) );
    groupBox10->setColumnLayout(0, TQt::Vertical );
    groupBox10->layout()->setSpacing( KDialog::spacingHint() );
    groupBox10->layout()->setMargin( KDialog::marginHint() );
    groupBox10Layout = new TQGridLayout( groupBox10->layout() );
    groupBox10Layout->setAlignment( TQt::AlignTop );

    textLabel3_2 = new TQLabel( groupBox10, "textLabel3_2" );

    groupBox10Layout->addWidget( textLabel3_2, 0, 1 );

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

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

    filecase_box = new TQComboBox( false, groupBox10, "filecase_box" );

    groupBox10Layout->addWidget( filecase_box, 1, 0 );

    defcase_box = new TQComboBox( false, groupBox10, "defcase_box" );

    groupBox10Layout->addWidget( defcase_box, 1, 1 );

    supercase_box = new TQComboBox( false, groupBox10, "supercase_box" );

    groupBox10Layout->addWidget( supercase_box, 1, 2 );

    textLabel3_3 = new TQLabel( groupBox10, "textLabel3_3" );

    groupBox10Layout->addWidget( textLabel3_3, 0, 2 );

    ClassGeneratorConfigBaseLayout->addWidget( groupBox10, 1, 0 );

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

    author_box = new TQCheckBox( groupBox9, "author_box" );

    groupBox9Layout->addWidget( author_box, 0, 0 );

    doc_box = new TQCheckBox( groupBox9, "doc_box" );

    groupBox9Layout->addWidget( doc_box, 1, 0 );

    ClassGeneratorConfigBaseLayout->addWidget( groupBox9, 2, 0 );

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

    ClassGeneratorConfigBaseLayout->addWidget( reformat_box, 3, 0 );
    languageChange();
    resize( TQSize(576, 528).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( templatename_box, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( templateTypeChanged(int) ) );

    // tab order
    setTabOrder( templatename_box, template_edit );
    setTabOrder( template_edit, filecase_box );
    setTabOrder( filecase_box, defcase_box );
    setTabOrder( defcase_box, supercase_box );
    setTabOrder( supercase_box, author_box );
    setTabOrder( author_box, doc_box );

    // buddies
    textLabel3_2->setBuddy( defcase_box );
    textLabel3->setBuddy( filecase_box );
    textLabel3_3->setBuddy( supercase_box );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ClassGeneratorConfigBase::languageChange()
{
    groupBox7_2->setTitle( tr2i18n( "Class &Templates" ) );
    templatename_box->clear();
    templatename_box->insertItem( tr2i18n( "Cpp Header" ) );
    templatename_box->insertItem( tr2i18n( "Cpp Source" ) );
    templatename_box->insertItem( tr2i18n( "Objective-C Header" ) );
    templatename_box->insertItem( tr2i18n( "Objective-C Source" ) );
    templatename_box->insertItem( tr2i18n( "GTK C Header" ) );
    templatename_box->insertItem( tr2i18n( "GTK C Source" ) );
    groupBox10->setTitle( tr2i18n( "Names" ) );
    textLabel3_2->setText( tr2i18n( "#ifndef - #&define names:" ) );
    textLabel3->setText( tr2i18n( "&File names:" ) );
    filecase_box->clear();
    filecase_box->insertItem( tr2i18n( "Lowercase" ) );
    filecase_box->insertItem( tr2i18n( "Uppercase" ) );
    filecase_box->insertItem( tr2i18n( "Same as Class Names" ) );
    defcase_box->clear();
    defcase_box->insertItem( tr2i18n( "Lowercase" ) );
    defcase_box->insertItem( tr2i18n( "Uppercase" ) );
    defcase_box->insertItem( tr2i18n( "Same as Class Names" ) );
    defcase_box->insertItem( tr2i18n( "Same as File Names" ) );
    defcase_box->setCurrentItem( 1 );
    supercase_box->clear();
    supercase_box->insertItem( tr2i18n( "Lowercase" ) );
    supercase_box->insertItem( tr2i18n( "Uppercase" ) );
    supercase_box->insertItem( tr2i18n( "Same as Class Names" ) );
    textLabel3_3->setText( tr2i18n( "&Superclass file names:" ) );
    groupBox9->setTitle( tr2i18n( "Class Documentation" ) );
    author_box->setText( tr2i18n( "Include &author name in class documentation" ) );
    doc_box->setText( tr2i18n( "Generate &empty documentation strings" ) );
    reformat_box->setText( tr2i18n( "&Reformat source before creating files" ) );
}

void ClassGeneratorConfigBase::templateTypeChanged(int)
{
    tqWarning( "ClassGeneratorConfigBase::templateTypeChanged(int): Not implemented yet" );
}

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

TQMetaObject *ClassGeneratorConfigBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ClassGeneratorConfigBase( "ClassGeneratorConfigBase", &ClassGeneratorConfigBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool ClassGeneratorConfigBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: templateTypeChanged((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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