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

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

#include "codevieweroptionsbase.h"

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

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

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

    CodeViewerOptionsBaseLayout->addWidget( fontChooser, 0, 0 );

    colorGroupBox = new TQGroupBox( this, "colorGroupBox" );
    colorGroupBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, colorGroupBox->sizePolicy().hasHeightForWidth() ) );
    colorGroupBox->setColumnLayout(0, TQt::Vertical );
    colorGroupBox->layout()->setSpacing( 6 );
    colorGroupBox->layout()->setMargin( 11 );
    colorGroupBoxLayout = new TQGridLayout( colorGroupBox->layout() );
    colorGroupBoxLayout->setAlignment( TQt::AlignTop );

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

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

    colorLayout->addWidget( fontLabel, 0, 2 );

    selectColorButton = new KColorButton( colorGroupBox, "selectColorButton" );
    selectColorButton->setColor( TQColor( 255, 255, 127 ) );

    colorLayout->addWidget( selectColorButton, 0, 5 );

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

    colorLayout->addWidget( paperLabel, 0, 0 );

    paperColorButton = new KColorButton( colorGroupBox, "paperColorButton" );
    paperColorButton->setColor( TQColor( 255, 255, 255 ) );

    colorLayout->addWidget( paperColorButton, 0, 1 );

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

    colorLayout->addWidget( selectedLabel, 0, 4 );

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

    colorLayout->addWidget( fontColorButton, 0, 3 );

    colorGroupBoxLayout->addLayout( colorLayout, 0, 0 );

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

    nonEditBlockColorButton = new KColorButton( colorGroupBox, "nonEditBlockColorButton" );
    nonEditBlockColorButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, nonEditBlockColorButton->sizePolicy().hasHeightForWidth() ) );
    nonEditBlockColorButton->setColor( TQColor( 213, 213, 213 ) );

    layout4->addWidget( nonEditBlockColorButton, 1, 3 );

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

    m_hiddenBlockColorButton = new KColorButton( colorGroupBox, "m_hiddenBlockColorButton" );
    m_hiddenBlockColorButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_hiddenBlockColorButton->sizePolicy().hasHeightForWidth() ) );
    m_hiddenBlockColorButton->setColor( TQColor( 166, 254, 248 ) );

    layout3->addWidget( m_hiddenBlockColorButton, 0, 3 );

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

    layout3->addWidget( umlObjectColorButton, 0, 1 );

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

    layout3->addWidget( textLabel1, 0, 0 );

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

    layout3->addWidget( textLabel1_2, 0, 2 );

    layout4->addMultiCellLayout( layout3, 0, 0, 0, 3 );

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

    layout4->addWidget( textLabel2, 1, 2 );

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

    layout4->addWidget( editBlockColorButton, 1, 1 );

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

    layout4->addWidget( textLabel3, 1, 0 );

    colorGroupBoxLayout->addLayout( layout4, 1, 0 );

    CodeViewerOptionsBaseLayout->addWidget( colorGroupBox, 1, 0 );
    languageChange();
    resize( TQSize(486, 545).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CodeViewerOptionsBase::languageChange()
{
    colorGroupBox->setTitle( tr2i18n( "Colors" ) );
    fontLabel->setText( tr2i18n( "Font:" ) );
    selectColorButton->setText( TQString::null );
    paperLabel->setText( tr2i18n( "Paper:" ) );
    paperColorButton->setText( TQString::null );
    selectedLabel->setText( tr2i18n( "Selected:" ) );
    fontColorButton->setText( TQString::null );
    nonEditBlockColorButton->setText( TQString::null );
    m_hiddenBlockColorButton->setText( TQString::null );
    umlObjectColorButton->setText( TQString::null );
    textLabel1->setText( tr2i18n( "<p align=\"right\">UML object block:</p>" ) );
    textLabel1_2->setText( tr2i18n( "<p align=\"right\">Hidden block:</p>" ) );
    textLabel2->setText( tr2i18n( "<p align=\"right\">Uneditable text:</p>" ) );
    editBlockColorButton->setText( TQString::null );
    textLabel3->setText( tr2i18n( "<p align=\"right\">Editable text:</p>" ) );
}

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

TQMetaObject *CodeViewerOptionsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CodeViewerOptionsBase( "CodeViewerOptionsBase", &CodeViewerOptionsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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