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

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

#include "taskvieweroptionsbase.h"

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

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

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

    kcfg_taskFont = new TDEFontChooser( this, "kcfg_taskFont" );
    kcfg_taskFont->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)3, 0, 0, kcfg_taskFont->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( kcfg_taskFont );

    colorGroupBox = new TQGroupBox( this, "colorGroupBox" );
    colorGroupBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, colorGroupBox->sizePolicy().hasHeightForWidth() ) );

    TQWidget* privateLayoutWidget = new TQWidget( colorGroupBox, "layout7" );
    privateLayoutWidget->setGeometry( TQRect( 10, 20, 230, 110 ) );
    layout7 = new TQGridLayout( privateLayoutWidget, 1, 1, 11, 6, "layout7"); 

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

    layout7->addWidget( kcfg_operationColor, 1, 1 );

    kcfg_fractionBarColor = new KColorButton( privateLayoutWidget, "kcfg_fractionBarColor" );
    kcfg_fractionBarColor->setColor( TQColor( 255, 0, 0 ) );

    layout7->addWidget( kcfg_fractionBarColor, 2, 1 );

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

    layout7->addWidget( fractionBarLabel, 2, 0 );

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

    layout7->addWidget( operationLabel, 1, 0 );

    kcfg_numberColor = new KColorButton( privateLayoutWidget, "kcfg_numberColor" );
    kcfg_numberColor->setColor( TQColor( 0, 255, 0 ) );

    layout7->addWidget( kcfg_numberColor, 0, 1 );

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

    layout7->addWidget( numberLabel, 0, 0 );
    layout2->addWidget( colorGroupBox );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQGridLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    kcfg_showSpecialRatioNotation = new TQCheckBox( groupBox2, "kcfg_showSpecialRatioNotation" );

    groupBox2Layout->addWidget( kcfg_showSpecialRatioNotation, 0, 0 );
    layout2->addWidget( groupBox2 );

    TaskViewerOptionsBaseLayout->addLayout( layout2, 0, 0 );
    languageChange();
    resize( TQSize(414, 550).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TaskViewerOptionsBase::languageChange()
{
    TQToolTip::add( kcfg_taskFont, tr2i18n( "Change the font of the numbers" ) );
    colorGroupBox->setTitle( tr2i18n( "Colors" ) );
    kcfg_operationColor->setText( TQString::null );
    TQToolTip::add( kcfg_operationColor, tr2i18n( "Change the color of the operation signs" ) );
    kcfg_fractionBarColor->setText( TQString::null );
    TQToolTip::add( kcfg_fractionBarColor, tr2i18n( "Change the color of the fraction bar" ) );
    fractionBarLabel->setText( tr2i18n( "Fraction bar:" ) );
    operationLabel->setText( tr2i18n( "Operation sign:" ) );
    kcfg_numberColor->setText( TQString::null );
    TQToolTip::add( kcfg_numberColor, tr2i18n( "Change the color of the numbers" ) );
    numberLabel->setText( tr2i18n( "Number:" ) );
    groupBox2->setTitle( tr2i18n( "General" ) );
    kcfg_showSpecialRatioNotation->setText( tr2i18n( "Show result also as a mixed number, like 1 2/3." ) );
    TQToolTip::add( kcfg_showSpecialRatioNotation, tr2i18n( "Here you can enable/disable showing the result in mixed-number notation." ) );
}

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

TQMetaObject *TaskViewerOptionsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TaskViewerOptionsBase( "TaskViewerOptionsBase", &TaskViewerOptionsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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