#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/usr/src/ports/kdebase3/kdebase3-3.5.10-11.x86_64/src/kdebase-3.5.10/kcontrol/konsole/kcmkonsoledialog.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "kcmkonsoledialog.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <knuminput.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "knuminput.h"
#include "schemaeditor.h"
#include "sessioneditor.h"
#include "kdialog.h"

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

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

    tab = new QWidget( TabWidget2, "tab" );
    tabLayout = new QGridLayout( tab, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "tabLayout"); 
    Spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabLayout->addItem( Spacer3, 2, 0 );

    GroupBox3 = new QGroupBox( tab, "GroupBox3" );
    GroupBox3->setColumnLayout(0, Qt::Vertical );
    GroupBox3->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox3->layout()->setMargin( KDialog::marginHint() );
    GroupBox3Layout = new QGridLayout( GroupBox3->layout() );
    GroupBox3Layout->setAlignment( Qt::AlignTop );

    TextLabel1_3 = new QLabel( GroupBox3, "TextLabel1_3" );

    GroupBox3Layout->addWidget( TextLabel1_3, 0, 0 );

    word_connectorLE = new QLineEdit( GroupBox3, "word_connectorLE" );
    word_connectorLE->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, word_connectorLE->sizePolicy().hasHeightForWidth() ) );

    GroupBox3Layout->addWidget( word_connectorLE, 1, 0 );

    tabLayout->addWidget( GroupBox3, 1, 0 );

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    GroupBox2Layout->addMultiCellWidget( xonXoffCB, 7, 7, 0, 2 );
    Spacer3_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    GroupBox2Layout->addItem( Spacer3_2, 11, 3 );

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

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

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

    GroupBox2Layout->addWidget( SilenceLabel, 11, 0 );

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

    GroupBox2Layout->addMultiCellWidget( silence_secondsSB, 11, 11, 1, 2 );

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

    GroupBox2Layout->addWidget( line_spacingSB, 10, 2 );

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

    GroupBox2Layout->addMultiCellWidget( TextLabel1_4, 10, 10, 0, 1 );
    Spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    GroupBox2Layout->addItem( Spacer2, 10, 3 );

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

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

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

    tab_2 = new QWidget( TabWidget2, "tab_2" );
    tabLayout_2 = new QVBoxLayout( tab_2, KDialog::marginHint(), KDialog::spacingHint(), "tabLayout_2"); 

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

    tab_3 = new QWidget( TabWidget2, "tab_3" );
    tabLayout_3 = new QVBoxLayout( tab_3, KDialog::marginHint(), KDialog::spacingHint(), "tabLayout_3"); 

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

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

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

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KCMKonsoleDialog::languageChange()
{
    GroupBox3->setTitle( tr2i18n( "Double Click" ) );
    TextLabel1_3->setText( tr2i18n( "Consider the following characters &part of a word when double clicking:" ) );
    GroupBox2->setTitle( tr2i18n( "Misc" ) );
    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( "Enable bidirectional text rendering" ) );
    SilenceLabel->setText( tr2i18n( "Seconds to detect s&ilence:" ) );
    TextLabel1_4->setText( tr2i18n( "&Line spacing:" ) );
    matchTabWinTitleCB->setText( tr2i18n( "Set tab title to match window title" ) );
    TabWidget2->changeTab( tab, tr2i18n( "&General" ) );
    TabWidget2->changeTab( tab_2, tr2i18n( "&Schema" ) );
    TabWidget2->changeTab( tab_3, tr2i18n( "S&ession" ) );
}

#include "kcmkonsoledialog.moc"
