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

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

#include "parseroptionsui.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqspinbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ParserOptionsUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ParserOptionsUI::ParserOptionsUI( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "ParserOptionsUI" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 0, 0 ) );
    ParserOptionsUILayout = new TQGridLayout( this, 1, 1, 11, 6, "ParserOptionsUILayout"); 

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    refreshFrequency = new TQSpinBox( buttonGroup1, "refreshFrequency" );
    refreshFrequency->setMinValue( 0 );
    refreshFrequency->setValue( 5 );

    buttonGroup1Layout->addWidget( refreshFrequency, 3, 2 );
    Spacer4_2 = new TQSpacerItem( 122, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    buttonGroup1Layout->addItem( Spacer4_2, 4, 1 );

    instantUpdate = new TQCheckBox( buttonGroup1, "instantUpdate" );

    buttonGroup1Layout->addMultiCellWidget( instantUpdate, 2, 2, 0, 2 );
    Spacer2 = new TQSpacerItem( 122, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    buttonGroup1Layout->addItem( Spacer2, 3, 1 );

    showClosingTags = new TQCheckBox( buttonGroup1, "showClosingTags" );

    buttonGroup1Layout->addMultiCellWidget( showClosingTags, 1, 1, 0, 2 );

    showEmptyNodes = new TQCheckBox( buttonGroup1, "showEmptyNodes" );

    buttonGroup1Layout->addMultiCellWidget( showEmptyNodes, 0, 0, 0, 2 );

    spinExpand = new TQSpinBox( buttonGroup1, "spinExpand" );
    spinExpand->setValue( 4 );

    buttonGroup1Layout->addWidget( spinExpand, 4, 2 );

    TextLabel1_5 = new TQLabel( buttonGroup1, "TextLabel1_5" );

    buttonGroup1Layout->addWidget( TextLabel1_5, 3, 0 );

    TextLabel2_2 = new TQLabel( buttonGroup1, "TextLabel2_2" );

    buttonGroup1Layout->addWidget( TextLabel2_2, 4, 0 );

    ParserOptionsUILayout->addWidget( buttonGroup1, 1, 0 );

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

    comboDoubleClick = new TQComboBox( false, GroupBox1, "comboDoubleClick" );

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

    comboLBM = new TQComboBox( false, GroupBox1, "comboLBM" );

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

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

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

    comboRBM = new TQComboBox( false, GroupBox1, "comboRBM" );

    GroupBox1Layout->addWidget( comboRBM, 2, 1 );

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

    GroupBox1Layout->addWidget( TextLabel1_4, 3, 0 );

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

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

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

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

    comboMBM = new TQComboBox( false, GroupBox1, "comboMBM" );

    GroupBox1Layout->addWidget( comboMBM, 1, 1 );

    ParserOptionsUILayout->addWidget( GroupBox1, 0, 0 );
    spacer3 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ParserOptionsUILayout->addItem( spacer3, 2, 0 );
    languageChange();
    resize( TQSize(470, 413).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( instantUpdate, TQ_SIGNAL( toggled(bool) ), refreshFrequency, TQ_SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( comboLBM, comboMBM );
    setTabOrder( comboMBM, comboRBM );
    setTabOrder( comboRBM, comboDoubleClick );
    setTabOrder( comboDoubleClick, showEmptyNodes );
    setTabOrder( showEmptyNodes, showClosingTags );
    setTabOrder( showClosingTags, instantUpdate );
    setTabOrder( instantUpdate, refreshFrequency );
    setTabOrder( refreshFrequency, spinExpand );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ParserOptionsUI::languageChange()
{
    buttonGroup1->setTitle( tr2i18n( "Structure Tree Look && Feel" ) );
    TQToolTip::add( refreshFrequency, tr2i18n( "Use 0 to disable the automatic refresh of structure tree" ) );
    instantUpdate->setText( tr2i18n( "Instant update" ) );
    TQToolTip::add( instantUpdate, tr2i18n( "Update the structure tree after every keystroke" ) );
    showClosingTags->setText( tr2i18n( "Show closing tags" ) );
    showEmptyNodes->setText( tr2i18n( "Show empt&y nodes and groups" ) );
    TQToolTip::add( spinExpand, tr2i18n( "Set to 0 in order to expand the whole tree" ) );
    TextLabel1_5->setText( tr2i18n( "Refresh frequency (in seconds):" ) );
    TextLabel2_2->setText( tr2i18n( "Expand tree when reparse to level:" ) );
    GroupBox1->setTitle( tr2i18n( "Clicks on Structure Tree Items" ) );
    TQToolTip::add( GroupBox1, tr2i18n( "Update the structure tree after every keystroke" ) );
    comboDoubleClick->clear();
    comboDoubleClick->insertItem( tr2i18n( "Select Tag Area" ) );
    comboDoubleClick->insertItem( tr2i18n( "Nothing" ) );
    comboLBM->clear();
    comboLBM->insertItem( tr2i18n( "Find Tag" ) );
    comboLBM->insertItem( tr2i18n( "Find Tag & Open Tree" ) );
    TextLabel1->setText( tr2i18n( "Left button:" ) );
    comboRBM->clear();
    comboRBM->insertItem( tr2i18n( "Popup Menu" ) );
    TextLabel1_4->setText( tr2i18n( "Double click:" ) );
    TextLabel1_2->setText( tr2i18n( "Middle button:" ) );
    TextLabel1_3->setText( tr2i18n( "Right button:" ) );
    comboMBM->clear();
    comboMBM->insertItem( tr2i18n( "Find Tag & Open Tree" ) );
    comboMBM->insertItem( tr2i18n( "Find Tag" ) );
    comboMBM->insertItem( tr2i18n( "Go to End of Tag" ) );
    comboMBM->insertItem( tr2i18n( "Select Tag Area" ) );
    comboMBM->insertItem( tr2i18n( "Nothing" ) );
}

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

TQMetaObject *ParserOptionsUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ParserOptionsUI( "ParserOptionsUI", &ParserOptionsUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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