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

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

#include "snippetsettingsbase.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a SnippetSettingsBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
SnippetSettingsBase::SnippetSettingsBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "SnippetSettingsBase" );
    SnippetSettingsBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "SnippetSettingsBaseLayout"); 

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

    cbToolTip = new TQCheckBox( groupBox1, "cbToolTip" );
    cbToolTip->setChecked( true );

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

    SnippetSettingsBaseLayout->addWidget( groupBox1, 0, 0 );
    spacer2 = new TQSpacerItem( 20, 70, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    SnippetSettingsBaseLayout->addItem( spacer2, 3, 0 );

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

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

    rbSingle = new TQRadioButton( btnGroup, "rbSingle" );
    rbSingle->setChecked( true );

    btnGroupLayout->addWidget( rbSingle, 0, 0 );

    rbAll = new TQRadioButton( btnGroup, "rbAll" );
    rbAll->setChecked( false );

    btnGroupLayout->addWidget( rbAll, 1, 0 );

    buttonGroup1Layout->addWidget( btnGroup, 1, 0 );

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

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

    leDelimiter = new KLineEdit( buttonGroup1, "leDelimiter" );
    leDelimiter->setMaximumSize( TQSize( 40, 32767 ) );
    leDelimiter->setMaxLength( 1 );
    layout1->addWidget( leDelimiter );
    spacer3 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout1->addItem( spacer3 );

    buttonGroup1Layout->addLayout( layout1, 0, 0 );

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

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

    rbOpenOnActiv = new TQRadioButton( btnGroupAutoOpen, "rbOpenOnActiv" );
    rbOpenOnActiv->setChecked( true );

    btnGroupAutoOpenLayout->addWidget( rbOpenOnActiv, 0, 0 );

    rbOpenOnSupported = new TQRadioButton( btnGroupAutoOpen, "rbOpenOnSupported" );
    rbOpenOnSupported->setChecked( false );

    btnGroupAutoOpenLayout->addWidget( rbOpenOnSupported, 1, 0 );

    SnippetSettingsBaseLayout->addWidget( btnGroupAutoOpen, 2, 0 );
    languageChange();
    resize( TQSize(574, 398).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SnippetSettingsBase::languageChange()
{
    setCaption( tr2i18n( "Snippet Settings" ) );
    groupBox1->setTitle( tr2i18n( "Tooltips" ) );
    cbToolTip->setText( tr2i18n( "Show snippet's text in &tooltip" ) );
    TQToolTip::add( cbToolTip, tr2i18n( "Decides if a tooltip should be shown containing text from the bookmarked line" ) );
    buttonGroup1->setTitle( tr2i18n( "Variables" ) );
    btnGroup->setTitle( tr2i18n( "Input Method for Variables" ) );
    rbSingle->setText( tr2i18n( "Single dialog for each variable within a snippet" ) );
    TQToolTip::add( rbSingle, tr2i18n( "An input dialog will be displayed for every variable within a snippet" ) );
    rbAll->setText( tr2i18n( "One dialog for all variables within a snippet" ) );
    TQToolTip::add( rbAll, tr2i18n( "A single dialog will be displayed where you can enter the values for all variables within a snippet" ) );
    textLabel1->setText( tr2i18n( "Delimiter:" ) );
    btnGroupAutoOpen->setTitle( tr2i18n( "Automatically Open Groups" ) );
    rbOpenOnActiv->setText( tr2i18n( "The group's language is the project's primary language" ) );
    TQToolTip::add( rbOpenOnActiv, tr2i18n( "<qt>If the group's language is the same as the project's primary language, the group will be automatically opened.</qt>" ) );
    rbOpenOnSupported->setText( tr2i18n( "The group's language is supported by the project" ) );
    TQToolTip::add( rbOpenOnSupported, tr2i18n( "<qt>Groups having a language which is supported by the current project will be opened automatically. <br>Even if the group's language is not the same as the project's primary language.</qt>" ) );
}

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

TQMetaObject *SnippetSettingsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SnippetSettingsBase( "SnippetSettingsBase", &SnippetSettingsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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