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

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

#include "createscopedlgbase.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqwidgetstack.h>
#include <ntqwidget.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    textLabel1 = new TQLabel( this, "textLabel1" );
    layout4->addWidget( textLabel1 );

    comboScopeType = new KComboBox( false, this, "comboScopeType" );
    layout4->addWidget( comboScopeType );
    spacer3 = new TQSpacerItem( 95, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer3 );
    CreateScopeDlgBaseLayout->addLayout( layout4 );

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

    widgetStack1 = new TQWidgetStack( groupBox1, "widgetStack1" );

    simplePage = new TQWidget( widgetStack1, "simplePage" );
    simplePageLayout = new TQGridLayout( simplePage, 1, 1, 11, 6, "simplePageLayout"); 

    editScopeName = new KLineEdit( simplePage, "editScopeName" );

    simplePageLayout->addWidget( editScopeName, 0, 1 );

    textLabel2 = new TQLabel( simplePage, "textLabel2" );

    simplePageLayout->addWidget( textLabel2, 0, 0 );
    widgetStack1->addWidget( simplePage, 0 );

    funcPage = new TQWidget( widgetStack1, "funcPage" );
    funcPageLayout = new TQGridLayout( funcPage, 1, 1, 11, 6, "funcPageLayout"); 

    editFunction = new KLineEdit( funcPage, "editFunction" );

    funcPageLayout->addWidget( editFunction, 0, 1 );

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

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

    textLabel4 = new TQLabel( funcPage, "textLabel4" );

    funcPageLayout->addWidget( textLabel4, 1, 0 );

    editArguments = new KLineEdit( funcPage, "editArguments" );

    funcPageLayout->addWidget( editArguments, 1, 1 );
    widgetStack1->addWidget( funcPage, 1 );

    incPage = new TQWidget( widgetStack1, "incPage" );
    incPageLayout = new TQGridLayout( incPage, 1, 1, 11, 6, "incPageLayout"); 

    incUrl = new KURLRequester( incPage, "incUrl" );
    incUrl->setFocusPolicy( KURLRequester::StrongFocus );
    incUrl->setMode( 25 );

    incPageLayout->addWidget( incUrl, 0, 1 );

    textLabel5 = new TQLabel( incPage, "textLabel5" );

    incPageLayout->addWidget( textLabel5, 0, 0 );

    checkNotInc = new TQCheckBox( incPage, "checkNotInc" );

    incPageLayout->addMultiCellWidget( checkNotInc, 1, 1, 0, 1 );
    widgetStack1->addWidget( incPage, 2 );

    groupBox1Layout->addWidget( widgetStack1, 0, 0 );
    CreateScopeDlgBaseLayout->addWidget( groupBox1 );

    layout3 = new TQHBoxLayout( 0, 0, 6, "layout3"); 
    spacer2 = new TQSpacerItem( 150, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer2 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    layout3->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    layout3->addWidget( buttonCancel );
    CreateScopeDlgBaseLayout->addLayout( layout3 );
    languageChange();
    resize( TQSize(348, 208).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( comboScopeType, TQ_SIGNAL( activated(int) ), widgetStack1, TQ_SLOT( raiseWidget(int) ) );
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );

    // tab order
    setTabOrder( editFunction, editArguments );
    setTabOrder( editArguments, comboScopeType );
    setTabOrder( comboScopeType, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
    setTabOrder( buttonCancel, editScopeName );
    setTabOrder( editScopeName, incUrl );
    setTabOrder( incUrl, checkNotInc );

    // buddies
    textLabel2->setBuddy( editScopeName );
    textLabel3->setBuddy( editFunction );
    textLabel4->setBuddy( editArguments );
    textLabel5->setBuddy( incUrl );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CreateScopeDlgBase::languageChange()
{
    setCaption( tr2i18n( "Create Scope" ) );
    textLabel1->setText( tr2i18n( "Scopetype:" ) );
    comboScopeType->clear();
    comboScopeType->insertItem( tr2i18n( "Simple Scope" ) );
    comboScopeType->insertItem( tr2i18n( "Function Scope" ) );
    comboScopeType->insertItem( tr2i18n( "Include File" ) );
    TQToolTip::add( comboScopeType, tr2i18n( "Choose between the different types of new scopes" ) );
    groupBox1->setTitle( tr2i18n( "Scope Settings" ) );
    TQToolTip::add( editScopeName, tr2i18n( "Specify the new scope name" ) );
    textLabel2->setText( tr2i18n( "Scopename:" ) );
    textLabel3->setText( tr2i18n( "Function:" ) );
    TQToolTip::add( textLabel3, tr2i18n( "Specify the function name" ) );
    textLabel4->setText( tr2i18n( "Arguments:" ) );
    TQToolTip::add( textLabel4, tr2i18n( "Specify the list of function arguments, delimited by a comma" ) );
    incUrl->setFilter( tr2i18n( "*.pri" ) );
    TQToolTip::add( incUrl, tr2i18n( "Choose the .pri file to include" ) );
    textLabel5->setText( tr2i18n( "Include File:" ) );
    checkNotInc->setText( tr2i18n( "&use !include instead of include" ) );
    TQToolTip::add( checkNotInc, tr2i18n( "Use !include instead of include for the function scope" ) );
    buttonOk->setText( tr2i18n( "O&K" ) );
    buttonCancel->setText( tr2i18n( "Ca&ncel" ) );
}

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

TQMetaObject *CreateScopeDlgBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CreateScopeDlgBase( "CreateScopeDlgBase", &CreateScopeDlgBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CreateScopeDlgBase::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 TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"CreateScopeDlgBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CreateScopeDlgBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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