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

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

#include "terminalemulatorconfig_ui.h"

#include <ntqvariant.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlineedit.h>
#include <ntqtoolbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "kdialog.h"

/*
 *  Constructs a TerminalEmulatorConfig_UI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
TerminalEmulatorConfig_UI::TerminalEmulatorConfig_UI( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "TerminalEmulatorConfig_UI" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    TerminalEmulatorConfig_UILayout = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "TerminalEmulatorConfig_UILayout"); 

    ButtonGroup1 = new TQButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setFrameShape( TQButtonGroup::NoFrame );
    ButtonGroup1->setLineWidth( 0 );
    ButtonGroup1->setColumnLayout(0, TQt::Vertical );
    ButtonGroup1->layout()->setSpacing( KDialog::spacingHint() );
    ButtonGroup1->layout()->setMargin( 0 );
    ButtonGroup1Layout = new TQGridLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( TQt::AlignTop );
    Spacer4 = new TQSpacerItem( 0, 87, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ButtonGroup1Layout->addItem( Spacer4, 3, 1 );

    otherCB = new TQRadioButton( ButtonGroup1, "otherCB" );

    ButtonGroup1Layout->addMultiCellWidget( otherCB, 1, 1, 0, 1 );
    Spacer15 = new TQSpacerItem( 31, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    ButtonGroup1Layout->addItem( Spacer15, 2, 0 );

    terminalCB = new TQRadioButton( ButtonGroup1, "terminalCB" );

    ButtonGroup1Layout->addMultiCellWidget( terminalCB, 0, 0, 0, 1 );

    Layout4 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout4"); 

    terminalLE = new TQLineEdit( ButtonGroup1, "terminalLE" );
    terminalLE->setEnabled( false );
    terminalLE->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 1, 0, terminalLE->sizePolicy().hasHeightForWidth() ) );
    terminalLE->setMinimumSize( TQSize( 0, 0 ) );
    Layout4->addWidget( terminalLE );

    btnSelectTerminal = new TQToolButton( ButtonGroup1, "btnSelectTerminal" );
    btnSelectTerminal->setEnabled( false );
    btnSelectTerminal->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, btnSelectTerminal->sizePolicy().hasHeightForWidth() ) );
    Layout4->addWidget( btnSelectTerminal );

    ButtonGroup1Layout->addLayout( Layout4, 2, 1 );
    TerminalEmulatorConfig_UILayout->addWidget( ButtonGroup1 );
    languageChange();
    resize( TQSize(263, 188).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( otherCB, TQ_SIGNAL( toggled(bool) ), terminalLE, TQ_SLOT( setEnabled(bool) ) );
    connect( otherCB, TQ_SIGNAL( toggled(bool) ), btnSelectTerminal, TQ_SLOT( setEnabled(bool) ) );
    connect( btnSelectTerminal, TQ_SIGNAL( clicked() ), this, TQ_SLOT( selectTerminalApp() ) );

    // tab order
    setTabOrder( terminalCB, otherCB );
    setTabOrder( otherCB, terminalLE );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TerminalEmulatorConfig_UI::languageChange()
{
    ButtonGroup1->setTitle( TQString::null );
    otherCB->setText( tr2i18n( "Use a different &terminal program:" ) );
    terminalCB->setText( tr2i18n( "&Use Konsole as terminal application" ) );
    TQWhatsThis::add( terminalLE, tr2i18n( "Press this button to select your favorite terminal client. Please note that the file you select has to have the executable attribute set in order to be accepted.<br> Also note that some programs that utilize Terminal Emulator will not work if you add command line arguments (Example: konsole -ls)." ) );
    btnSelectTerminal->setText( tr2i18n( "..." ) );
    TQWhatsThis::add( btnSelectTerminal, tr2i18n( "Click here to browse for terminal program." ) );
}

void TerminalEmulatorConfig_UI::selectTerminalApp()
{
    tqWarning( "TerminalEmulatorConfig_UI::selectTerminalApp(): Not implemented yet" );
}

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

TQMetaObject *TerminalEmulatorConfig_UI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TerminalEmulatorConfig_UI( "TerminalEmulatorConfig_UI", &TerminalEmulatorConfig_UI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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