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

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

#include "dlgaccessibility.h"

#include <ntqvariant.h>
#include <kcolorbutton.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqslider.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    kcfg_HighlightImages = new TQCheckBox( this, "kcfg_HighlightImages" );
    DlgAccessibilityLayout->addWidget( kcfg_HighlightImages );

    kcfg_HighlightLinks = new TQCheckBox( this, "kcfg_HighlightLinks" );
    DlgAccessibilityLayout->addWidget( kcfg_HighlightLinks );

    kcfg_ChangeColors = new TQGroupBox( this, "kcfg_ChangeColors" );
    kcfg_ChangeColors->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, kcfg_ChangeColors->sizePolicy().hasHeightForWidth() ) );
    kcfg_ChangeColors->setCheckable( true );
    kcfg_ChangeColors->setChecked( false );
    kcfg_ChangeColors->setColumnLayout(0, TQt::Vertical );
    kcfg_ChangeColors->layout()->setSpacing( 5 );
    kcfg_ChangeColors->layout()->setMargin( 11 );
    kcfg_ChangeColorsLayout = new TQVBoxLayout( kcfg_ChangeColors->layout() );
    kcfg_ChangeColorsLayout->setAlignment( TQt::AlignTop );

    warn = new TQLabel( kcfg_ChangeColors, "warn" );
    warn->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, warn->sizePolicy().hasHeightForWidth() ) );
    warn->setPaletteForegroundColor( TQColor( 80, 0, 0 ) );
    warn->setTextFormat( TQLabel::PlainText );
    kcfg_ChangeColorsLayout->addWidget( warn );

    kcfg_RenderMode = new TQButtonGroup( kcfg_ChangeColors, "kcfg_RenderMode" );
    kcfg_RenderMode->setEnabled( false );
    kcfg_RenderMode->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, kcfg_RenderMode->sizePolicy().hasHeightForWidth() ) );
    kcfg_RenderMode->setFrameShape( TQButtonGroup::NoFrame );
    kcfg_RenderMode->setLineWidth( 0 );
    kcfg_RenderMode->setColumnLayout(0, TQt::Vertical );
    kcfg_RenderMode->layout()->setSpacing( 5 );
    kcfg_RenderMode->layout()->setMargin( 0 );
    kcfg_RenderModeLayout = new TQVBoxLayout( kcfg_RenderMode->layout() );
    kcfg_RenderModeLayout->setAlignment( TQt::AlignTop );

    radioInverted = new TQRadioButton( kcfg_RenderMode, "radioInverted" );
    radioInverted->setChecked( true );
    kcfg_RenderModeLayout->addWidget( radioInverted );

    radioNormal = new TQRadioButton( kcfg_RenderMode, "radioNormal" );
    kcfg_RenderModeLayout->addWidget( radioNormal );

    layout5 = new TQHBoxLayout( 0, 0, 5, "layout5"); 
    spacer14_3 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout5->addItem( spacer14_3 );

    textLabel1 = new TQLabel( kcfg_RenderMode, "textLabel1" );
    textLabel1->setEnabled( false );
    layout5->addWidget( textLabel1 );

    kcfg_PaperColor = new KColorButton( kcfg_RenderMode, "kcfg_PaperColor" );
    kcfg_PaperColor->setEnabled( false );
    layout5->addWidget( kcfg_PaperColor );
    spacer7_2 = new TQSpacerItem( 30, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer7_2 );
    kcfg_RenderModeLayout->addLayout( layout5 );

    radioRecolor = new TQRadioButton( kcfg_RenderMode, "radioRecolor" );
    kcfg_RenderModeLayout->addWidget( radioRecolor );

    layout2 = new TQGridLayout( 0, 1, 1, 0, 5, "layout2"); 
    spacer12_2 = new TQSpacerItem( 48, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer12_2, 1, 3 );

    kcfg_RecolorBackground = new KColorButton( kcfg_RenderMode, "kcfg_RecolorBackground" );
    kcfg_RecolorBackground->setEnabled( false );

    layout2->addWidget( kcfg_RecolorBackground, 1, 2 );
    spacer14_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout2->addItem( spacer14_2, 1, 0 );

    kcfg_RecolorForeground = new KColorButton( kcfg_RenderMode, "kcfg_RecolorForeground" );
    kcfg_RecolorForeground->setEnabled( false );

    layout2->addWidget( kcfg_RecolorForeground, 0, 2 );
    spacer12 = new TQSpacerItem( 48, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer12, 0, 3 );

    textLabel3_2 = new TQLabel( kcfg_RenderMode, "textLabel3_2" );
    textLabel3_2->setEnabled( false );

    layout2->addWidget( textLabel3_2, 1, 1 );
    spacer14 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout2->addItem( spacer14, 0, 0 );

    textLabel3 = new TQLabel( kcfg_RenderMode, "textLabel3" );
    textLabel3->setEnabled( false );

    layout2->addWidget( textLabel3, 0, 1 );
    kcfg_RenderModeLayout->addLayout( layout2 );

    radioContrast = new TQRadioButton( kcfg_RenderMode, "radioContrast" );
    kcfg_RenderModeLayout->addWidget( radioContrast );

    layout5_2 = new TQGridLayout( 0, 1, 1, 0, 5, "layout5_2"); 

    textLabel2_2 = new TQLabel( kcfg_RenderMode, "textLabel2_2" );
    textLabel2_2->setEnabled( false );

    layout5_2->addWidget( textLabel2_2, 1, 1 );
    spacer10_2 = new TQSpacerItem( 48, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5_2->addItem( spacer10_2, 1, 3 );
    spacer11_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout5_2->addItem( spacer11_2, 1, 0 );
    spacer11 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout5_2->addItem( spacer11, 0, 0 );
    spacer10 = new TQSpacerItem( 48, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5_2->addItem( spacer10, 0, 3 );

    kcfg_BWContrast = new TQSlider( kcfg_RenderMode, "kcfg_BWContrast" );
    kcfg_BWContrast->setEnabled( false );
    kcfg_BWContrast->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, kcfg_BWContrast->sizePolicy().hasHeightForWidth() ) );
    kcfg_BWContrast->setPageStep( 1 );
    kcfg_BWContrast->setOrientation( TQSlider::Horizontal );

    layout5_2->addWidget( kcfg_BWContrast, 1, 2 );

    kcfg_BWThreshold = new TQSlider( kcfg_RenderMode, "kcfg_BWThreshold" );
    kcfg_BWThreshold->setEnabled( false );
    kcfg_BWThreshold->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, kcfg_BWThreshold->sizePolicy().hasHeightForWidth() ) );
    kcfg_BWThreshold->setPageStep( 16 );
    kcfg_BWThreshold->setOrientation( TQSlider::Horizontal );

    layout5_2->addWidget( kcfg_BWThreshold, 0, 2 );

    textLabel2 = new TQLabel( kcfg_RenderMode, "textLabel2" );
    textLabel2->setEnabled( false );

    layout5_2->addWidget( textLabel2, 0, 1 );
    kcfg_RenderModeLayout->addLayout( layout5_2 );
    kcfg_ChangeColorsLayout->addWidget( kcfg_RenderMode );
    DlgAccessibilityLayout->addWidget( kcfg_ChangeColors );
    languageChange();
    resize( TQSize(376, 364).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( radioRecolor, TQ_SIGNAL( toggled(bool) ), textLabel3, TQ_SLOT( setEnabled(bool) ) );
    connect( radioRecolor, TQ_SIGNAL( toggled(bool) ), kcfg_RecolorForeground, TQ_SLOT( setEnabled(bool) ) );
    connect( radioRecolor, TQ_SIGNAL( toggled(bool) ), textLabel3_2, TQ_SLOT( setEnabled(bool) ) );
    connect( radioRecolor, TQ_SIGNAL( toggled(bool) ), kcfg_RecolorBackground, TQ_SLOT( setEnabled(bool) ) );
    connect( radioContrast, TQ_SIGNAL( toggled(bool) ), textLabel2, TQ_SLOT( setEnabled(bool) ) );
    connect( radioContrast, TQ_SIGNAL( toggled(bool) ), kcfg_BWThreshold, TQ_SLOT( setEnabled(bool) ) );
    connect( radioNormal, TQ_SIGNAL( toggled(bool) ), textLabel1, TQ_SLOT( setEnabled(bool) ) );
    connect( radioNormal, TQ_SIGNAL( toggled(bool) ), kcfg_PaperColor, TQ_SLOT( setEnabled(bool) ) );
    connect( radioContrast, TQ_SIGNAL( toggled(bool) ), textLabel2_2, TQ_SLOT( setEnabled(bool) ) );
    connect( radioContrast, TQ_SIGNAL( toggled(bool) ), kcfg_BWContrast, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_ChangeColors, TQ_SIGNAL( toggled(bool) ), kcfg_RenderMode, TQ_SLOT( setEnabled(bool) ) );

    // buddies
    textLabel1->setBuddy( kcfg_PaperColor );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DlgAccessibility::languageChange()
{
    kcfg_HighlightImages->setText( tr2i18n( "Draw border around &Images" ) );
    kcfg_HighlightLinks->setText( tr2i18n( "Draw border around &Links" ) );
    kcfg_ChangeColors->setTitle( tr2i18n( "Change &Colors" ) );
    warn->setText( tr2i18n( "Warning: these options can badly affect drawing speed." ) );
    kcfg_RenderMode->setTitle( TQString::null );
    radioInverted->setText( tr2i18n( "&Invert colors" ) );
    radioNormal->setText( tr2i18n( "Change &paper color" ) );
    textLabel1->setText( tr2i18n( "Paper color:" ) );
    kcfg_PaperColor->setText( TQString::null );
    radioRecolor->setText( tr2i18n( "&Change dark and light colors" ) );
    kcfg_RecolorBackground->setText( TQString::null );
    kcfg_RecolorForeground->setText( TQString::null );
    textLabel3_2->setText( tr2i18n( "Light color:" ) );
    textLabel3->setText( tr2i18n( "Dark color:" ) );
    radioContrast->setText( tr2i18n( "Convert to &black and white" ) );
    textLabel2_2->setText( tr2i18n( "Contrast:" ) );
    textLabel2->setText( tr2i18n( "Threshold:" ) );
}

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

TQMetaObject *DlgAccessibility::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DlgAccessibility( "DlgAccessibility", &DlgAccessibility::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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