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

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

#include "functions.h"

#include <ntqvariant.h>
#include <ktextbrowser.h>
#include <kcombobox.h>
#include <tdelistbox.h>
#include <kpushbutton.h>
#include <klineedit.h>
#include <ktextedit.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    layout7_2->addWidget( textLabel1_2 );

    descriptionText = new KTextBrowser( this, "descriptionText" );
    descriptionText->setMinimumSize( TQSize( 200, 0 ) );
    layout7_2->addWidget( descriptionText );

    FunctionsDialogBaseLayout->addLayout( layout7_2, 0, 2 );

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

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

    groupComboBox = new KComboBox( false, this, "groupComboBox" );
    groupComboBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, groupComboBox->sizePolicy().hasHeightForWidth() ) );
    groupComboBox->setMinimumSize( TQSize( 150, 0 ) );
    layout7->addWidget( groupComboBox );

    textLabel2 = new TQLabel( this, "textLabel2" );
    layout7->addWidget( textLabel2 );

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

    FunctionsDialogBaseLayout->addLayout( layout7, 0, 0 );

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

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

    groupBox1Layout->addWidget( argLabel3, 6, 0 );

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

    groupBox1Layout->addWidget( argLabel5, 10, 0 );
    spacer4 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    groupBox1Layout->addItem( spacer4, 14, 0 );

    copyButton = new KPushButton( groupBox1, "copyButton" );
    copyButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, copyButton->sizePolicy().hasHeightForWidth() ) );
    copyButton->setMaximumSize( TQSize( 32767, 32 ) );

    groupBox1Layout->addWidget( copyButton, 15, 0 );

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

    groupBox1Layout->addWidget( argLabel4, 8, 0 );

    widgetComboBox = new KComboBox( false, groupBox1, "widgetComboBox" );
    widgetComboBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, widgetComboBox->sizePolicy().hasHeightForWidth() ) );

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

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

    arg1Edit = new KLineEdit( groupBox1, "arg1Edit" );
    arg1Edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, arg1Edit->sizePolicy().hasHeightForWidth() ) );
    layout11->addWidget( arg1Edit );

    quote1 = new TQCheckBox( groupBox1, "quote1" );
    layout11->addWidget( quote1 );

    combo1 = new KComboBox( false, groupBox1, "combo1" );
    combo1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, combo1->sizePolicy().hasHeightForWidth() ) );
    layout11->addWidget( combo1 );

    groupBox1Layout->addLayout( layout11, 3, 0 );

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

    groupBox1Layout->addWidget( argLabel1, 2, 0 );

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

    arg2Edit = new KLineEdit( groupBox1, "arg2Edit" );
    arg2Edit->setEnabled( true );
    arg2Edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, arg2Edit->sizePolicy().hasHeightForWidth() ) );
    layout12->addWidget( arg2Edit );

    quote2 = new TQCheckBox( groupBox1, "quote2" );
    layout12->addWidget( quote2 );

    combo2 = new KComboBox( false, groupBox1, "combo2" );
    combo2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, combo2->sizePolicy().hasHeightForWidth() ) );
    layout12->addWidget( combo2 );

    groupBox1Layout->addLayout( layout12, 5, 0 );

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

    arg3Edit = new KLineEdit( groupBox1, "arg3Edit" );
    arg3Edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, arg3Edit->sizePolicy().hasHeightForWidth() ) );
    layout13->addWidget( arg3Edit );

    quote3 = new TQCheckBox( groupBox1, "quote3" );
    layout13->addWidget( quote3 );

    combo3 = new KComboBox( false, groupBox1, "combo3" );
    combo3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, combo3->sizePolicy().hasHeightForWidth() ) );
    layout13->addWidget( combo3 );

    groupBox1Layout->addLayout( layout13, 7, 0 );

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

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

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

    arg4Edit = new KLineEdit( groupBox1, "arg4Edit" );
    arg4Edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, arg4Edit->sizePolicy().hasHeightForWidth() ) );
    layout14->addWidget( arg4Edit );

    quote4 = new TQCheckBox( groupBox1, "quote4" );
    layout14->addWidget( quote4 );

    combo4 = new KComboBox( false, groupBox1, "combo4" );
    combo4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, combo4->sizePolicy().hasHeightForWidth() ) );
    layout14->addWidget( combo4 );

    groupBox1Layout->addLayout( layout14, 9, 0 );

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

    arg5Edit = new KLineEdit( groupBox1, "arg5Edit" );
    arg5Edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, arg5Edit->sizePolicy().hasHeightForWidth() ) );
    layout15->addWidget( arg5Edit );

    quote5 = new TQCheckBox( groupBox1, "quote5" );
    layout15->addWidget( quote5 );

    combo5 = new KComboBox( false, groupBox1, "combo5" );
    combo5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, combo5->sizePolicy().hasHeightForWidth() ) );
    layout15->addWidget( combo5 );

    groupBox1Layout->addLayout( layout15, 11, 0 );

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

    arg6Edit = new KLineEdit( groupBox1, "arg6Edit" );
    arg6Edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, arg6Edit->sizePolicy().hasHeightForWidth() ) );
    layout16->addWidget( arg6Edit );

    quote6 = new TQCheckBox( groupBox1, "quote6" );
    layout16->addWidget( quote6 );

    combo6 = new KComboBox( false, groupBox1, "combo6" );
    combo6->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, combo6->sizePolicy().hasHeightForWidth() ) );
    layout16->addWidget( combo6 );

    groupBox1Layout->addLayout( layout16, 13, 0 );

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

    groupBox1Layout->addWidget( argLabel6, 12, 0 );

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

    groupBox1Layout->addWidget( argLabel2, 4, 0 );

    FunctionsDialogBaseLayout->addWidget( groupBox1, 0, 1 );

    layout6 = new TQHBoxLayout( 0, 0, 6, "layout6"); 
    spacer3 = new TQSpacerItem( 100, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer3 );

    buttonOk = new KPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    layout6->addWidget( buttonOk );

    buttonCancel = new KPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    layout6->addWidget( buttonCancel );
    spacer2 = new TQSpacerItem( 100, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer2 );

    FunctionsDialogBaseLayout->addMultiCellLayout( layout6, 2, 2, 0, 2 );

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

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

    clearButton = new KPushButton( this, "clearButton" );
    clearButton->setMaximumSize( TQSize( 32767, 20 ) );
    clearButton->setFlat( true );
    layout11_2->addWidget( clearButton );

    textLabel4 = new TQLabel( this, "textLabel4" );
    layout11_2->addWidget( textLabel4 );
    layout12_2->addLayout( layout11_2 );

    insertedText = new KTextEdit( this, "insertedText" );
    insertedText->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, insertedText->sizePolicy().hasHeightForWidth() ) );
    insertedText->setFocusPolicy( KTextEdit::StrongFocus );
    insertedText->setTextFormat( KTextEdit::PlainText );
    insertedText->setLinkUnderline( false );
    insertedText->setAutoFormatting( int( KTextEdit::AutoAll ) );
    layout12_2->addWidget( insertedText );

    FunctionsDialogBaseLayout->addMultiCellLayout( layout12_2, 1, 1, 0, 2 );
    languageChange();
    resize( TQSize(638, 670).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );

    // tab order
    setTabOrder( groupComboBox, functionListBox );
    setTabOrder( functionListBox, widgetComboBox );
    setTabOrder( widgetComboBox, arg1Edit );
    setTabOrder( arg1Edit, arg2Edit );
    setTabOrder( arg2Edit, arg3Edit );
    setTabOrder( arg3Edit, arg4Edit );
    setTabOrder( arg4Edit, arg5Edit );
    setTabOrder( arg5Edit, arg6Edit );
    setTabOrder( arg6Edit, copyButton );
    setTabOrder( copyButton, descriptionText );
    setTabOrder( descriptionText, clearButton );
    setTabOrder( clearButton, buttonOk );
    setTabOrder( buttonOk, buttonCancel );

    // buddies
    textLabel1->setBuddy( groupComboBox );
    textLabel2->setBuddy( functionListBox );
    textLabel4->setBuddy( insertedText );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FunctionsDialogBase::languageChange()
{
    setCaption( tr2i18n( "Function Browser" ) );
    textLabel1_2->setText( tr2i18n( "Description:" ) );
    textLabel1->setText( tr2i18n( "&Group:" ) );
    textLabel2->setText( tr2i18n( "&Function:" ) );
    groupBox1->setTitle( tr2i18n( "&Parameters" ) );
    argLabel3->setText( tr2i18n( "Arg3" ) );
    argLabel5->setText( tr2i18n( "Arg5" ) );
    copyButton->setText( TQString::null );
    TQToolTip::add( copyButton, tr2i18n( "Insert function" ) );
    argLabel4->setText( tr2i18n( "Arg4" ) );
    quote1->setText( tr2i18n( "Quote" ) );
    argLabel1->setText( tr2i18n( "Arg1" ) );
    quote2->setText( tr2i18n( "Quote" ) );
    quote3->setText( tr2i18n( "Quote" ) );
    widgetLabel->setText( tr2i18n( "Widget:" ) );
    quote4->setText( tr2i18n( "Quote" ) );
    quote5->setText( tr2i18n( "Quote" ) );
    quote6->setText( tr2i18n( "Quote" ) );
    argLabel6->setText( tr2i18n( "Arg6" ) );
    argLabel2->setText( tr2i18n( "Arg2" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    clearButton->setText( TQString::null );
    TQToolTip::add( clearButton, tr2i18n( "Clear edited text" ) );
    textLabel4->setText( tr2i18n( "Inserted &text:" ) );
}

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

TQMetaObject *FunctionsDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FunctionsDialogBase( "FunctionsDialogBase", &FunctionsDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* FunctionsDialogBase::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(
	"FunctionsDialogBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_FunctionsDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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