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

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

#include "ksettingscolorsdecl.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <kcolorbutton.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

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

    groupBox3 = new TQGroupBox( tab, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQGridLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    textLabel3 = new TQLabel( groupBox3, "textLabel3" );

    groupBox3Layout->addWidget( textLabel3, 0, 0 );

    textLabel1_3 = new TQLabel( groupBox3, "textLabel1_3" );

    groupBox3Layout->addWidget( textLabel1_3, 1, 0 );

    textLabel4 = new TQLabel( groupBox3, "textLabel4" );

    groupBox3Layout->addWidget( textLabel4, 2, 0 );

    kcfg_listMissingConversionRate = new KColorButton( groupBox3, "kcfg_listMissingConversionRate" );
    kcfg_listMissingConversionRate->setColor( TQColor( 0, 0, 255 ) );

    groupBox3Layout->addWidget( kcfg_listMissingConversionRate, 2, 1 );

    kcfg_listNegativeValueColor = new KColorButton( groupBox3, "kcfg_listNegativeValueColor" );
    kcfg_listNegativeValueColor->setColor( TQColor( 255, 0, 0 ) );

    groupBox3Layout->addWidget( kcfg_listNegativeValueColor, 3, 1 );

    textLabel5 = new TQLabel( groupBox3, "textLabel5" );

    groupBox3Layout->addWidget( textLabel5, 3, 0 );

    kcfg_listErronousTransactionColor = new KColorButton( groupBox3, "kcfg_listErronousTransactionColor" );
    kcfg_listErronousTransactionColor->setColor( TQColor( 255, 0, 0 ) );

    groupBox3Layout->addWidget( kcfg_listErronousTransactionColor, 1, 1 );

    kcfg_listGridColor = new KColorButton( groupBox3, "kcfg_listGridColor" );
    kcfg_listGridColor->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, kcfg_listGridColor->sizePolicy().hasHeightForWidth() ) );
    kcfg_listGridColor->setColor( TQColor( 154, 154, 154 ) );

    groupBox3Layout->addWidget( kcfg_listGridColor, 0, 1 );
    tabLayout->addWidget( groupBox3 );
    spacer3 = new TQSpacerItem( 21, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer3 );
    tabWidget2->insertTab( tab, TQString::fromLatin1("") );

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

    kcfg_useSystemColors = new TQCheckBox( tab_2, "kcfg_useSystemColors" );
    tabLayout_2->addWidget( kcfg_useSystemColors );

    m_individualColorFrame = new TQGroupBox( tab_2, "m_individualColorFrame" );
    m_individualColorFrame->setColumnLayout(0, TQt::Vertical );
    m_individualColorFrame->layout()->setSpacing( 6 );
    m_individualColorFrame->layout()->setMargin( 11 );
    m_individualColorFrameLayout = new TQGridLayout( m_individualColorFrame->layout() );
    m_individualColorFrameLayout->setAlignment( TQt::AlignTop );

    textLabel2 = new TQLabel( m_individualColorFrame, "textLabel2" );

    m_individualColorFrameLayout->addWidget( textLabel2, 0, 0 );

    textLabel1 = new TQLabel( m_individualColorFrame, "textLabel1" );

    m_individualColorFrameLayout->addWidget( textLabel1, 1, 0 );

    kcfg_listColor = new KColorButton( m_individualColorFrame, "kcfg_listColor" );
    kcfg_listColor->setColor( TQColor( 240, 240, 240 ) );

    m_individualColorFrameLayout->addWidget( kcfg_listColor, 1, 1 );

    kcfg_listBGColor = new KColorButton( m_individualColorFrame, "kcfg_listBGColor" );
    kcfg_listBGColor->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, kcfg_listBGColor->sizePolicy().hasHeightForWidth() ) );
    kcfg_listBGColor->setColor( TQColor( 255, 255, 255 ) );

    m_individualColorFrameLayout->addWidget( kcfg_listBGColor, 0, 1 );
    tabLayout_2->addWidget( m_individualColorFrame );

    groupBox5 = new TQGroupBox( tab_2, "groupBox5" );
    groupBox5->setColumnLayout(0, TQt::Vertical );
    groupBox5->layout()->setSpacing( 6 );
    groupBox5->layout()->setMargin( 11 );
    groupBox5Layout = new TQGridLayout( groupBox5->layout() );
    groupBox5Layout->setAlignment( TQt::AlignTop );

    textLabel1_5 = new TQLabel( groupBox5, "textLabel1_5" );

    groupBox5Layout->addWidget( textLabel1_5, 0, 0 );

    kcfg_groupMarkerColor = new KColorButton( groupBox5, "kcfg_groupMarkerColor" );
    kcfg_groupMarkerColor->setColor( TQColor( 255, 170, 0 ) );

    groupBox5Layout->addWidget( kcfg_groupMarkerColor, 0, 1 );

    textLabel1_2 = new TQLabel( groupBox5, "textLabel1_2" );

    groupBox5Layout->addWidget( textLabel1_2, 1, 0 );

    kcfg_requiredFieldColor = new KColorButton( groupBox5, "kcfg_requiredFieldColor" );
    kcfg_requiredFieldColor->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, kcfg_requiredFieldColor->sizePolicy().hasHeightForWidth() ) );
    kcfg_requiredFieldColor->setColor( TQColor( 255, 255, 221 ) );

    groupBox5Layout->addWidget( kcfg_requiredFieldColor, 1, 1 );

    textLabel1_4 = new TQLabel( groupBox5, "textLabel1_4" );

    groupBox5Layout->addWidget( textLabel1_4, 2, 0 );

    kcfg_importedTransactionColor = new KColorButton( groupBox5, "kcfg_importedTransactionColor" );
    kcfg_importedTransactionColor->setColor( TQColor( 255, 255, 0 ) );

    groupBox5Layout->addWidget( kcfg_importedTransactionColor, 2, 1 );

    textLabel2_2 = new TQLabel( groupBox5, "textLabel2_2" );

    groupBox5Layout->addWidget( textLabel2_2, 3, 0 );

    kcfg_matchedTransactionColor = new KColorButton( groupBox5, "kcfg_matchedTransactionColor" );
    kcfg_matchedTransactionColor->setPaletteBackgroundColor( TQColor( 255, 255, 221 ) );
    kcfg_matchedTransactionColor->setColor( TQColor( 152, 251, 152 ) );

    groupBox5Layout->addWidget( kcfg_matchedTransactionColor, 3, 1 );
    tabLayout_2->addWidget( groupBox5 );
    spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer2 );
    tabWidget2->insertTab( tab_2, TQString::fromLatin1("") );
    KSettingsColorsDeclLayout->addWidget( tabWidget2 );
    languageChange();
    resize( TQSize(453, 402).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_useSystemColors, TQ_SIGNAL( toggled(bool) ), m_individualColorFrame, TQ_SLOT( setDisabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KSettingsColorsDecl::languageChange()
{
    setCaption( tr2i18n( "Color settings" ) );
    groupBox3->setTitle( tr2i18n( "Text colors" ) );
    textLabel3->setText( tr2i18n( "Grid color" ) );
    textLabel1_3->setText( tr2i18n( "Erronous transaction" ) );
    textLabel4->setText( tr2i18n( "Value with missing conversion rate" ) );
    kcfg_listMissingConversionRate->setText( TQString::null );
    kcfg_listNegativeValueColor->setText( TQString::null );
    textLabel5->setText( tr2i18n( "Negative value" ) );
    kcfg_listErronousTransactionColor->setText( TQString::null );
    kcfg_listGridColor->setText( TQString::null );
    tabWidget2->changeTab( tab, tr2i18n( "Foreground" ) );
    kcfg_useSystemColors->setText( tr2i18n( "Use system colors" ) );
    m_individualColorFrame->setTitle( tr2i18n( "List background colors" ) );
    textLabel2->setText( tr2i18n( "Normal" ) );
    textLabel1->setText( tr2i18n( "Alternate" ) );
    kcfg_listColor->setText( TQString::null );
    kcfg_listBGColor->setText( TQString::null );
    groupBox5->setTitle( tr2i18n( "Special background colors" ) );
    textLabel1_5->setText( tr2i18n( "Ledger group separator" ) );
    kcfg_groupMarkerColor->setText( TQString::null );
    textLabel1_2->setText( tr2i18n( "Required field" ) );
    kcfg_requiredFieldColor->setText( TQString::null );
    textLabel1_4->setText( tr2i18n( "Imported transaction" ) );
    kcfg_importedTransactionColor->setText( TQString::null );
    textLabel2_2->setText( tr2i18n( "Matched transaction" ) );
    kcfg_matchedTransactionColor->setText( TQString::null );
    tabWidget2->changeTab( tab_2, tr2i18n( "Background" ) );
}

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

TQMetaObject *KSettingsColorsDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KSettingsColorsDecl( "KSettingsColorsDecl", &KSettingsColorsDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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