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

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

#include "quickopenfunctionchooseformbase.h"

#include <ntqvariant.h>
#include <ksqueezedtextlabel.h>
#include <tdelistbox.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    filepathlabel = new KSqueezedTextLabel( this, "filepathlabel" );
    filepathlabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, filepathlabel->sizePolicy().hasHeightForWidth() ) );

    QuickOpenFunctionChooseFormBaseLayout->addMultiCellWidget( filepathlabel, 1, 1, 0, 3 );

    cancelBtn = new TQPushButton( this, "cancelBtn" );
    cancelBtn->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, cancelBtn->sizePolicy().hasHeightForWidth() ) );

    QuickOpenFunctionChooseFormBaseLayout->addWidget( cancelBtn, 2, 3 );

    okBtn = new TQPushButton( this, "okBtn" );
    okBtn->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, okBtn->sizePolicy().hasHeightForWidth() ) );
    okBtn->setDefault( true );
    okBtn->setFlat( false );

    QuickOpenFunctionChooseFormBaseLayout->addWidget( okBtn, 2, 2 );

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

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

    fileBox = new TDEListBox( this, "fileBox" );
    fileBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, fileBox->sizePolicy().hasHeightForWidth() ) );
    layout1->addWidget( fileBox );

    QuickOpenFunctionChooseFormBaseLayout->addLayout( layout1, 0, 0 );
    spacer1 = new TQSpacerItem( 261, 31, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    QuickOpenFunctionChooseFormBaseLayout->addMultiCell( spacer1, 2, 2, 0, 1 );

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

    textLabel2 = new TQLabel( this, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
    layout3->addWidget( textLabel2 );

    argBox = new TDEListBox( this, "argBox" );
    argBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, argBox->sizePolicy().hasHeightForWidth() ) );
    layout3->addWidget( argBox );

    QuickOpenFunctionChooseFormBaseLayout->addMultiCellLayout( layout3, 0, 0, 1, 3 );
    languageChange();
    resize( TQSize(642, 373).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( okBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( argBox, TQ_SIGNAL( highlighted(int) ), this, TQ_SLOT( slotFileChange(int) ) );
    connect( fileBox, TQ_SIGNAL( highlighted(int) ), this, TQ_SLOT( slotArgsChange(int) ) );
    connect( argBox, TQ_SIGNAL( returnPressed(TQListBoxItem*) ), this, TQ_SLOT( accept() ) );
    connect( argBox, TQ_SIGNAL( clicked(TQListBoxItem*) ), this, TQ_SLOT( accept() ) );
    connect( fileBox, TQ_SIGNAL( returnPressed(TQListBoxItem*) ), this, TQ_SLOT( accept() ) );
    connect( fileBox, TQ_SIGNAL( clicked(TQListBoxItem*) ), this, TQ_SLOT( accept() ) );
    connect( cancelBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );

    // tab order
    setTabOrder( fileBox, argBox );
    setTabOrder( argBox, okBtn );
    setTabOrder( okBtn, cancelBtn );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void QuickOpenFunctionChooseFormBase::languageChange()
{
    filepathlabel->setText( TQString::null );
    cancelBtn->setText( tr2i18n( "&Cancel" ) );
    okBtn->setText( tr2i18n( "&OK" ) );
    textLabel1->setText( tr2i18n( "File name:" ) );
    textLabel2->setText( tr2i18n( "Function arguments list:" ) );
    argBox->setCurrentItem( -1 );
}

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

TQMetaObject *QuickOpenFunctionChooseFormBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_QuickOpenFunctionChooseFormBase( "QuickOpenFunctionChooseFormBase", &QuickOpenFunctionChooseFormBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* QuickOpenFunctionChooseFormBase::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[] = {
	{ "id", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"slotFileChange", 1, param_slot_0 };
    static const TQUParameter param_slot_1[] = {
	{ "id", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"slotArgsChange", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotFileChange(int)", &slot_0, TQMetaData::Public },
	{ "slotArgsChange(int)", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"QuickOpenFunctionChooseFormBase", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_QuickOpenFunctionChooseFormBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool QuickOpenFunctionChooseFormBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotFileChange((int)static_QUType_int.get(_o+1)); break;
    case 1: slotArgsChange((int)static_QUType_int.get(_o+1)); break;
    case 2: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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