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

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

#include "kcmkonsoledialog.h"

#include <ntqvariant.h>
#include <schemaeditor.h>
#include <sessioneditor.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <knuminput.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "kdialog.h"
#include "schemaeditor.h"
#include "sessioneditor.h"

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

    TabWidget2 = new TQTabWidget( this, "TabWidget2" );
    TabWidget2->setMargin( 0 );

    tab = new TQWidget( TabWidget2, "tab" );
    tabLayout = new TQGridLayout( tab, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "tabLayout"); 
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( Spacer3, 2, 0 );

    GroupBox2 = new TQGroupBox( tab, "GroupBox2" );
    GroupBox2->setColumnLayout(0, TQt::Vertical );
    GroupBox2->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox2->layout()->setMargin( KDialog::marginHint() );
    GroupBox2Layout = new TQGridLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( TQt::AlignTop );

    terminalSizeHintCB = new TQCheckBox( GroupBox2, "terminalSizeHintCB" );

    GroupBox2Layout->addMultiCellWidget( terminalSizeHintCB, 0, 0, 0, 2 );

    frameCB = new TQCheckBox( GroupBox2, "frameCB" );

    GroupBox2Layout->addMultiCellWidget( frameCB, 1, 1, 0, 2 );

    warnCB = new TQCheckBox( GroupBox2, "warnCB" );

    GroupBox2Layout->addMultiCellWidget( warnCB, 2, 2, 0, 2 );

    blinkingCB = new TQCheckBox( GroupBox2, "blinkingCB" );

    GroupBox2Layout->addMultiCellWidget( blinkingCB, 3, 3, 0, 2 );

    ctrldragCB = new TQCheckBox( GroupBox2, "ctrldragCB" );

    GroupBox2Layout->addMultiCellWidget( ctrldragCB, 4, 4, 0, 2 );

    cutToBeginningOfLineCB = new TQCheckBox( GroupBox2, "cutToBeginningOfLineCB" );

    GroupBox2Layout->addMultiCellWidget( cutToBeginningOfLineCB, 5, 5, 0, 2 );

    allowResizeCB = new TQCheckBox( GroupBox2, "allowResizeCB" );

    GroupBox2Layout->addMultiCellWidget( allowResizeCB, 6, 6, 0, 2 );

    xonXoffCB = new TQCheckBox( GroupBox2, "xonXoffCB" );

    GroupBox2Layout->addMultiCellWidget( xonXoffCB, 7, 7, 0, 2 );

    bidiCB = new TQCheckBox( GroupBox2, "bidiCB" );

    GroupBox2Layout->addMultiCellWidget( bidiCB, 8, 8, 0, 2 );

    matchTabWinTitleCB = new TQCheckBox( GroupBox2, "matchTabWinTitleCB" );

    GroupBox2Layout->addMultiCellWidget( matchTabWinTitleCB, 9, 9, 0, 3 );

    tabsCycleWheelCB = new TQCheckBox( GroupBox2, "tabsCycleWheelCB" );

    GroupBox2Layout->addMultiCellWidget( tabsCycleWheelCB, 10, 10, 0, 2 );

    menuAcceleratorsCB = new TQCheckBox( GroupBox2, "menuAcceleratorsCB" );

    GroupBox2Layout->addMultiCellWidget( menuAcceleratorsCB, 11, 11, 0, 2 );

    metaAsAltModeCB = new TQCheckBox( GroupBox2, "metaAsAltModeCB" );

    GroupBox2Layout->addMultiCellWidget( metaAsAltModeCB, 12, 12, 0, 2 );

    realTransparency = new TQCheckBox( GroupBox2, "realTransparency" );

    GroupBox2Layout->addMultiCellWidget( realTransparency, 13, 13, 0, 2 );

    TextLabel1_4 = new TQLabel( GroupBox2, "TextLabel1_4" );
    TextLabel1_4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, TextLabel1_4->sizePolicy().hasHeightForWidth() ) );

    GroupBox2Layout->addMultiCellWidget( TextLabel1_4, 14, 14, 0, 1 );
    Spacer3_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox2Layout->addItem( Spacer3_2, 13, 3 );

    line_spacingSB = new KIntNumInput( GroupBox2, "line_spacingSB" );
    line_spacingSB->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, line_spacingSB->sizePolicy().hasHeightForWidth() ) );
    line_spacingSB->setMinValue( 0 );
    line_spacingSB->setMaxValue( 8 );

    GroupBox2Layout->addWidget( line_spacingSB, 14, 2 );
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox2Layout->addItem( Spacer2, 12, 3 );

    SilenceLabel = new TQLabel( GroupBox2, "SilenceLabel" );
    SilenceLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, SilenceLabel->sizePolicy().hasHeightForWidth() ) );

    GroupBox2Layout->addMultiCellWidget( SilenceLabel, 15, 15, 0, 1 );

    silence_secondsSB = new KIntNumInput( GroupBox2, "silence_secondsSB" );
    silence_secondsSB->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, silence_secondsSB->sizePolicy().hasHeightForWidth() ) );
    silence_secondsSB->setMinValue( 1 );

    GroupBox2Layout->addWidget( silence_secondsSB, 15, 2 );

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

    GroupBox2Layout->addMultiCellWidget( TextLabel1_3, 16, 16, 0, 2 );

    word_connectorLE = new TQLineEdit( GroupBox2, "word_connectorLE" );
    word_connectorLE->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, word_connectorLE->sizePolicy().hasHeightForWidth() ) );

    GroupBox2Layout->addMultiCellWidget( word_connectorLE, 17, 17, 0, 2 );

    tabLayout->addWidget( GroupBox2, 0, 0 );
    TabWidget2->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( TabWidget2, "tab_2" );
    tabLayout_2 = new TQVBoxLayout( tab_2, KDialog::marginHint(), KDialog::spacingHint(), "tabLayout_2"); 

    SchemaEditor1 = new SchemaEditor( tab_2, "SchemaEditor1" );
    tabLayout_2->addWidget( SchemaEditor1 );
    TabWidget2->insertTab( tab_2, TQString::fromLatin1("") );

    tab_3 = new TQWidget( TabWidget2, "tab_3" );
    tabLayout_3 = new TQVBoxLayout( tab_3, KDialog::marginHint(), KDialog::spacingHint(), "tabLayout_3"); 

    SessionEditor1 = new SessionEditor( tab_3, "SessionEditor1" );
    tabLayout_3->addWidget( SessionEditor1 );
    TabWidget2->insertTab( tab_3, TQString::fromLatin1("") );

    KCMKonsoleDialogLayout->addWidget( TabWidget2, 0, 0 );
    languageChange();
    resize( TQSize(507, 490).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    TextLabel1_4->setBuddy( line_spacingSB );
    SilenceLabel->setBuddy( silence_secondsSB );
    TextLabel1_3->setBuddy( word_connectorLE );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KCMKonsoleDialog::languageChange()
{
    terminalSizeHintCB->setText( tr2i18n( "Show terminal si&ze after resizing" ) );
    frameCB->setText( tr2i18n( "Show &frame" ) );
    warnCB->setText( tr2i18n( "&Confirm quit when closing more than one session" ) );
    blinkingCB->setText( tr2i18n( "&Blinking cursor" ) );
    ctrldragCB->setText( tr2i18n( "&Require Ctrl key for drag and drop" ) );
    cutToBeginningOfLineCB->setText( tr2i18n( "Triple click selects &only from the current word forward" ) );
    allowResizeCB->setText( tr2i18n( "Allow progr&ams to resize terminal window" ) );
    xonXoffCB->setText( tr2i18n( "&Use Ctrl+S/Ctrl+Q flow control" ) );
    bidiCB->setText( tr2i18n( "E&nable bidirectional text rendering" ) );
    matchTabWinTitleCB->setText( tr2i18n( "Set &tab title to match window title" ) );
    tabsCycleWheelCB->setText( tr2i18n( "Cycle tabs &with mouse wheel" ) );
    menuAcceleratorsCB->setText( tr2i18n( "Enable main &menu accelerator keys" ) );
    metaAsAltModeCB->setText( tr2i18n( "Handle Meta &key as Alt Key" ) );
    realTransparency->setText( tr2i18n( "Use &real transparency" ) );
    TextLabel1_4->setText( tr2i18n( "&Line spacing:" ) );
    SilenceLabel->setText( tr2i18n( "Seconds to detect s&ilence:" ) );
    TextLabel1_3->setText( tr2i18n( "Consider the following characters &part of a word when double clicking:" ) );
    TabWidget2->changeTab( tab, tr2i18n( "&General" ) );
    TabWidget2->changeTab( tab_2, tr2i18n( "&Schema" ) );
    TabWidget2->changeTab( tab_3, tr2i18n( "S&ession" ) );
}

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

TQMetaObject *KCMKonsoleDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KCMKonsoleDialog( "KCMKonsoleDialog", &KCMKonsoleDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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