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

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

#include "configdlgbase.h"

#include <ntqvariant.h>
#include <kcolorbutton.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqlineedit.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqcheckbox.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

/*
 *  Constructs a ConfigDlgBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
ConfigDlgBase::ConfigDlgBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "configDlgBase" );
    configDlgBaseLayout = new TQVBoxLayout( this, 11, 6, "configDlgBaseLayout"); 

    tabWidget2 = new TQTabWidget( this, "tabWidget2" );

    tab = new TQWidget( tabWidget2, "tab" );
    tabLayout = new TQVBoxLayout( tab, 11, 6, "tabLayout"); 

    layout10 = new TQGridLayout( 0, 1, 1, 0, 6, "layout10"); 

    precisionEdit = new TQLineEdit( tab, "precisionEdit" );
    precisionEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 2, 0, precisionEdit->sizePolicy().hasHeightForWidth() ) );

    layout10->addMultiCellWidget( precisionEdit, 3, 3, 2, 3 );

    TextLabel2 = new TQLabel( tab, "TextLabel2" );

    layout10->addWidget( TextLabel2, 2, 1 );

    TextLabel4_3 = new TQLabel( tab, "TextLabel4_3" );

    layout10->addMultiCellWidget( TextLabel4_3, 3, 3, 0, 1 );

    TextLabel3 = new TQLabel( tab, "TextLabel3" );

    layout10->addMultiCellWidget( TextLabel3, 1, 1, 0, 2 );

    symbolLength = new TQLineEdit( tab, "symbolLength" );
    symbolLength->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)0, 0, 0, symbolLength->sizePolicy().hasHeightForWidth() ) );

    layout10->addWidget( symbolLength, 2, 3 );
    Spacer6_2_2_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout10->addItem( Spacer6_2_2_2, 2, 0 );

    maxListEdit = new TQLineEdit( tab, "maxListEdit" );

    layout10->addMultiCellWidget( maxListEdit, 0, 0, 2, 3 );

    symbolCount = new TQLineEdit( tab, "symbolCount" );
    symbolCount->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)0, 0, 0, symbolCount->sizePolicy().hasHeightForWidth() ) );

    layout10->addWidget( symbolCount, 2, 2 );

    TextLabel5 = new TQLabel( tab, "TextLabel5" );

    layout10->addMultiCellWidget( TextLabel5, 0, 0, 0, 1 );
    tabLayout->addLayout( layout10 );

    TextLabel1 = new TQLabel( tab, "TextLabel1" );
    TQFont TextLabel1_font(  TextLabel1->font() );
    TextLabel1_font.setBold( true );
    TextLabel1->setFont( TextLabel1_font ); 
    TextLabel1->setFrameShape( TQLabel::NoFrame );
    TextLabel1->setFrameShadow( TQLabel::Plain );
    tabLayout->addWidget( TextLabel1 );

    Layout9 = new TQGridLayout( 0, 1, 1, 0, 6, "Layout9"); 
    Spacer9 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    Layout9->addItem( Spacer9, 1, 1 );
    Spacer6 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    Layout9->addItem( Spacer6, 0, 0 );

    Layout9_2 = new TQGridLayout( 0, 1, 1, 0, 6, "Layout9_2"); 

    classCombo = new TQComboBox( false, tab, "classCombo" );
    classCombo->setMaximumSize( TQSize( 300, 32767 ) );
    classCombo->setEditable( true );

    Layout9_2->addWidget( classCombo, 1, 1 );

    fileCheck = new TQCheckBox( tab, "fileCheck" );

    Layout9_2->addWidget( fileCheck, 2, 2 );

    TextLabel4 = new TQLabel( tab, "TextLabel4" );

    Layout9_2->addWidget( TextLabel4, 0, 0 );

    TextLabel4_2_2 = new TQLabel( tab, "TextLabel4_2_2" );

    Layout9_2->addWidget( TextLabel4_2_2, 1, 0 );

    fileColor = new KColorButton( tab, "fileColor" );
    fileColor->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, fileColor->sizePolicy().hasHeightForWidth() ) );

    Layout9_2->addWidget( fileColor, 2, 3 );

    classCheck = new TQCheckBox( tab, "classCheck" );

    Layout9_2->addWidget( classCheck, 1, 2 );

    objectColor = new KColorButton( tab, "objectColor" );

    Layout9_2->addWidget( objectColor, 0, 3 );

    objectCheck = new TQCheckBox( tab, "objectCheck" );

    Layout9_2->addWidget( objectCheck, 0, 2 );

    TextLabel4_2 = new TQLabel( tab, "TextLabel4_2" );

    Layout9_2->addWidget( TextLabel4_2, 2, 0 );

    classColor = new KColorButton( tab, "classColor" );
    classColor->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, classColor->sizePolicy().hasHeightForWidth() ) );

    Layout9_2->addWidget( classColor, 1, 3 );

    fileCombo = new TQComboBox( false, tab, "fileCombo" );
    fileCombo->setMaximumSize( TQSize( 300, 32767 ) );
    fileCombo->setEditable( true );

    Layout9_2->addWidget( fileCombo, 2, 1 );

    objectCombo = new TQComboBox( false, tab, "objectCombo" );
    objectCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, objectCombo->sizePolicy().hasHeightForWidth() ) );
    objectCombo->setMaximumSize( TQSize( 300, 32767 ) );
    objectCombo->setEditable( true );

    Layout9_2->addWidget( objectCombo, 0, 1 );

    Layout9->addLayout( Layout9_2, 0, 1 );
    tabLayout->addLayout( Layout9 );
    tabWidget2->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabWidget2, "tab_2" );
    tabLayout_2 = new TQVBoxLayout( tab_2, 11, 6, "tabLayout_2"); 

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

    TextLabel4_3_2 = new TQLabel( tab_2, "TextLabel4_3_2" );
    layout8->addWidget( TextLabel4_3_2 );

    contextEdit = new TQLineEdit( tab_2, "contextEdit" );
    contextEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 2, 0, contextEdit->sizePolicy().hasHeightForWidth() ) );
    layout8->addWidget( contextEdit );
    tabLayout_2->addLayout( layout8 );

    TextLabel1_2 = new TQLabel( tab_2, "TextLabel1_2" );
    TQFont TextLabel1_2_font(  TextLabel1_2->font() );
    TextLabel1_2_font.setBold( true );
    TextLabel1_2->setFont( TextLabel1_2_font ); 
    tabLayout_2->addWidget( TextLabel1_2 );

    layout11 = new TQGridLayout( 0, 1, 1, 0, 6, "layout11"); 
    Spacer6_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout11->addItem( Spacer6_2, 0, 0 );

    dirList = new TQListView( tab_2, "dirList" );
    dirList->addColumn( tr2i18n( "Object / Related Source Base" ) );
    dirList->setRootIsDecorated( true );

    layout11->addWidget( dirList, 0, 1 );

    layout10_2 = new TQVBoxLayout( 0, 0, 6, "layout10_2"); 

    addDirButton = new TQPushButton( tab_2, "addDirButton" );
    layout10_2->addWidget( addDirButton );
    Spacer5 = new TQSpacerItem( 16, 49, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout10_2->addItem( Spacer5 );

    deleteDirButton = new TQPushButton( tab_2, "deleteDirButton" );
    layout10_2->addWidget( deleteDirButton );

    layout11->addLayout( layout10_2, 0, 2 );
    Spacer9_2 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    layout11->addItem( Spacer9_2, 1, 1 );
    tabLayout_2->addLayout( layout11 );
    tabWidget2->insertTab( tab_2, TQString::fromLatin1("") );
    configDlgBaseLayout->addWidget( tabWidget2 );

    Line1 = new TQFrame( this, "Line1" );
    Line1->setFrameShape( TQFrame::HLine );
    Line1->setFrameShadow( TQFrame::Sunken );
    Line1->setFrameShape( TQFrame::HLine );
    configDlgBaseLayout->addWidget( Line1 );

    Layout4 = new TQHBoxLayout( 0, 0, 6, "Layout4"); 
    Spacer2 = new TQSpacerItem( 210, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout4->addItem( Spacer2 );

    PushButton2 = new TQPushButton( this, "PushButton2" );
    PushButton2->setDefault( true );
    Layout4->addWidget( PushButton2 );

    PushButton1 = new TQPushButton( this, "PushButton1" );
    Layout4->addWidget( PushButton1 );
    configDlgBaseLayout->addLayout( Layout4 );
    languageChange();
    resize( TQSize(447, 378).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( PushButton2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( PushButton1, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( classCheck, TQ_SIGNAL( toggled(bool) ), classColor, TQ_SLOT( setDisabled(bool) ) );
    connect( fileCheck, TQ_SIGNAL( toggled(bool) ), fileColor, TQ_SLOT( setDisabled(bool) ) );
    connect( objectCheck, TQ_SIGNAL( toggled(bool) ), objectColor, TQ_SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( objectCombo, objectCheck );
    setTabOrder( objectCheck, classCombo );
    setTabOrder( classCombo, classCheck );
    setTabOrder( classCheck, classColor );
    setTabOrder( classColor, fileCombo );
    setTabOrder( fileCombo, fileCheck );
    setTabOrder( fileCheck, fileColor );
    setTabOrder( fileColor, maxListEdit );
    setTabOrder( maxListEdit, PushButton1 );
    setTabOrder( PushButton1, PushButton2 );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigDlgBase::languageChange()
{
    setCaption( tr2i18n( "Configuration" ) );
    TextLabel2->setText( tr2i18n( "Truncated when more/longer than:" ) );
    TextLabel4_3->setText( tr2i18n( "Precision of percentage values:" ) );
    TextLabel3->setText( tr2i18n( "Symbols in tooltips and context menus" ) );
    TextLabel5->setText( tr2i18n( "Maximum number of items in lists:" ) );
    TextLabel1->setText( tr2i18n( "Cost Item Colors" ) );
    fileCheck->setText( tr2i18n( "Automatic" ) );
    TextLabel4->setText( tr2i18n( "Object:" ) );
    TextLabel4_2_2->setText( tr2i18n( "Class:" ) );
    fileColor->setText( TQString::null );
    classCheck->setText( tr2i18n( "Automatic" ) );
    objectColor->setText( TQString::null );
    objectCheck->setText( tr2i18n( "Automatic" ) );
    TextLabel4_2->setText( tr2i18n( "File:" ) );
    classColor->setText( TQString::null );
    tabWidget2->changeTab( tab, tr2i18n( "General" ) );
    TextLabel4_3_2->setText( tr2i18n( "Context lines in annotations:" ) );
    TextLabel1_2->setText( tr2i18n( "Source Folders" ) );
    dirList->header()->setLabel( 0, tr2i18n( "Object / Related Source Base" ) );
    addDirButton->setText( tr2i18n( "Add..." ) );
    deleteDirButton->setText( tr2i18n( "Delete" ) );
    tabWidget2->changeTab( tab_2, tr2i18n( "Annotations" ) );
    PushButton2->setText( tr2i18n( "&OK" ) );
    PushButton1->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *ConfigDlgBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConfigDlgBase( "ConfigDlgBase", &ConfigDlgBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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