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

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

#include "addclassdlg.h"

#include <ntqvariant.h>
#include <keditlistbox.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqtextedit.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    Implements = new KEditListBox( this, "Implements" );
    Implements->setLineWidth( 1 );

    AddClassDlgLayout->addMultiCellWidget( Implements, 1, 1, 0, 3 );

    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 );

    Extends = new KComboBox( false, GroupBox1, "Extends" );
    Extends->setEditable( true );
    Extends->setAutoCompletion( false );

    GroupBox1Layout->addMultiCellWidget( Extends, 2, 2, 1, 5 );
    Spacer2 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox1Layout->addMultiCell( Spacer2, 4, 4, 4, 5 );

    Abstract = new TQCheckBox( GroupBox1, "Abstract" );

    GroupBox1Layout->addWidget( Abstract, 3, 2 );

    Interface = new TQCheckBox( GroupBox1, "Interface" );

    GroupBox1Layout->addWidget( Interface, 3, 1 );

    TextLabel1 = new TQLabel( GroupBox1, "TextLabel1" );

    GroupBox1Layout->addWidget( TextLabel1, 1, 0 );

    ButtonGroup1 = new TQButtonGroup( GroupBox1, "ButtonGroup1" );
    ButtonGroup1->setLineWidth( 0 );
    ButtonGroup1->setColumnLayout(0, TQt::Vertical );
    ButtonGroup1->layout()->setSpacing( KDialog::spacingHint() );
    ButtonGroup1->layout()->setMargin( 0 );
    ButtonGroup1Layout = new TQHBoxLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( TQt::AlignTop );

    Public = new TQRadioButton( ButtonGroup1, "Public" );
    Public->setChecked( true );
    ButtonGroup1Layout->addWidget( Public );

    Protected = new TQRadioButton( ButtonGroup1, "Protected" );
    ButtonGroup1Layout->addWidget( Protected );

    Private = new TQRadioButton( ButtonGroup1, "Private" );
    ButtonGroup1Layout->addWidget( Private );

    GroupBox1Layout->addMultiCellWidget( ButtonGroup1, 4, 4, 1, 3 );

    Final = new TQCheckBox( GroupBox1, "Final" );

    GroupBox1Layout->addWidget( Final, 3, 3 );

    ClassName = new KLineEdit( GroupBox1, "ClassName" );

    GroupBox1Layout->addMultiCellWidget( ClassName, 1, 1, 1, 5 );
    Spacer1 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox1Layout->addMultiCell( Spacer1, 3, 3, 4, 5 );

    TextLabel2 = new TQLabel( GroupBox1, "TextLabel2" );

    GroupBox1Layout->addWidget( TextLabel2, 2, 0 );

    BrowseSourcePath = new TQPushButton( GroupBox1, "BrowseSourcePath" );
    BrowseSourcePath->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, BrowseSourcePath->sizePolicy().hasHeightForWidth() ) );

    GroupBox1Layout->addWidget( BrowseSourcePath, 0, 5 );

    SourcePath = new KLineEdit( GroupBox1, "SourcePath" );

    GroupBox1Layout->addMultiCellWidget( SourcePath, 0, 0, 1, 4 );

    TextLabel1_2 = new TQLabel( GroupBox1, "TextLabel1_2" );

    GroupBox1Layout->addWidget( TextLabel1_2, 0, 0 );

    AddClassDlgLayout->addMultiCellWidget( GroupBox1, 0, 0, 0, 3 );

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

    Constructor = new TQCheckBox( GroupBox3, "Constructor" );
    Constructor->setChecked( true );
    GroupBox3Layout->addWidget( Constructor );

    Main = new TQCheckBox( GroupBox3, "Main" );
    GroupBox3Layout->addWidget( Main );

    AddClassDlgLayout->addMultiCellWidget( GroupBox3, 2, 2, 0, 3 );

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

    TextLabel5 = new TQLabel( GroupBox4, "TextLabel5" );

    GroupBox4Layout->addWidget( TextLabel5, 1, 0 );

    License = new KComboBox( false, GroupBox4, "License" );
    License->setEditable( true );

    GroupBox4Layout->addWidget( License, 1, 1 );

    Documentation = new TQTextEdit( GroupBox4, "Documentation" );

    GroupBox4Layout->addMultiCellWidget( Documentation, 0, 0, 0, 2 );
    Spacer4 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox4Layout->addItem( Spacer4, 1, 2 );

    AddClassDlgLayout->addMultiCellWidget( GroupBox4, 3, 3, 0, 3 );

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

    AddClassDlgLayout->addMultiCellWidget( Line1, 4, 4, 0, 3 );

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

    AddClassDlgLayout->addWidget( PushButton3, 5, 3 );
    Spacer5 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    AddClassDlgLayout->addItem( Spacer5, 5, 2 );

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

    AddClassDlgLayout->addWidget( PushButton1, 5, 0 );

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

    AddClassDlgLayout->addWidget( PushButton2, 5, 1 );
    languageChange();
    resize( TQSize(656, 684).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( Interface, TQ_SIGNAL( toggled(bool) ), Abstract, TQ_SLOT( setDisabled(bool) ) );
    connect( Interface, TQ_SIGNAL( toggled(bool) ), Final, TQ_SLOT( setDisabled(bool) ) );
    connect( PushButton1, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( PushButton2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( Interface, TQ_SIGNAL( toggled(bool) ), Constructor, TQ_SLOT( setDisabled(bool) ) );
    connect( Interface, TQ_SIGNAL( toggled(bool) ), Main, TQ_SLOT( setDisabled(bool) ) );
    connect( Interface, TQ_SIGNAL( toggled(bool) ), Implements, TQ_SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( SourcePath, BrowseSourcePath );
    setTabOrder( BrowseSourcePath, ClassName );
    setTabOrder( ClassName, Extends );
    setTabOrder( Extends, Interface );
    setTabOrder( Interface, Abstract );
    setTabOrder( Abstract, Final );
    setTabOrder( Final, Public );
    setTabOrder( Public, Protected );
    setTabOrder( Protected, Private );
    setTabOrder( Private, Constructor );
    setTabOrder( Constructor, Main );
    setTabOrder( Main, License );
    setTabOrder( License, PushButton1 );
    setTabOrder( PushButton1, PushButton2 );
    setTabOrder( PushButton2, PushButton3 );

    // buddies
    TextLabel1->setBuddy( ClassName );
    TextLabel2->setBuddy( Extends );
    TextLabel1_2->setBuddy( SourcePath );
    TextLabel5->setBuddy( License );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AddClassDlg::languageChange()
{
    setCaption( tr2i18n( "Add Class" ) );
    Implements->setTitle( tr2i18n( "&Implements" ) );
    GroupBox1->setTitle( tr2i18n( "&Class" ) );
    Abstract->setText( tr2i18n( "&Abstract" ) );
    Interface->setText( tr2i18n( "&Interface" ) );
    TextLabel1->setText( tr2i18n( "&Name:" ) );
    ButtonGroup1->setTitle( TQString::null );
    Public->setText( tr2i18n( "&Public" ) );
    Protected->setText( tr2i18n( "P&rotected" ) );
    Private->setText( tr2i18n( "Pri&vate" ) );
    Final->setText( tr2i18n( "&Final" ) );
    TextLabel2->setText( tr2i18n( "&Extends:" ) );
    BrowseSourcePath->setText( tr2i18n( "..." ) );
    TextLabel1_2->setText( tr2i18n( "&Source path:" ) );
    GroupBox3->setTitle( tr2i18n( "&Options" ) );
    Constructor->setText( tr2i18n( "&Create default constructor" ) );
    Main->setText( tr2i18n( "Create &main method" ) );
    GroupBox4->setTitle( tr2i18n( "&Documentation" ) );
    TextLabel5->setText( tr2i18n( "&License:" ) );
    License->clear();
    License->insertItem( tr2i18n( "LGPL" ) );
    License->insertItem( tr2i18n( "GPL" ) );
    License->insertItem( tr2i18n( "QPL" ) );
    PushButton3->setText( tr2i18n( "&Help" ) );
    PushButton1->setText( tr2i18n( "&Add" ) );
    PushButton2->setText( tr2i18n( "&Cancel" ) );
}

void AddClassDlg::Public_toggled(bool)
{
    tqWarning( "AddClassDlg::Public_toggled(bool): Not implemented yet" );
}

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

TQMetaObject *AddClassDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AddClassDlg( "AddClassDlg", &AddClassDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool AddClassDlg::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: Public_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 1: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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