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

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

#include "csscustom.h"

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

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

    GroupBox3 = new TQGroupBox( this, "GroupBox3" );
    GroupBox3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)3, 0, 0, GroupBox3->sizePolicy().hasHeightForWidth() ) );
    GroupBox3->setColumnLayout(0, TQt::Vertical );
    GroupBox3->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox3->layout()->setMargin( KDialog::marginHint() );
    GroupBox3Layout = new TQGridLayout( GroupBox3->layout() );
    GroupBox3Layout->setAlignment( TQt::AlignTop );

    basefontsize = new TQComboBox( false, GroupBox3, "basefontsize" );
    basefontsize->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, basefontsize->sizePolicy().hasHeightForWidth() ) );
    basefontsize->setEditable( true );

    GroupBox3Layout->addWidget( basefontsize, 0, 1 );

    txtFontsize = new TQLabel( GroupBox3, "txtFontsize" );

    GroupBox3Layout->addWidget( txtFontsize, 0, 0 );

    dontScale = new TQCheckBox( GroupBox3, "dontScale" );
    dontScale->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, dontScale->sizePolicy().hasHeightForWidth() ) );

    GroupBox3Layout->addMultiCellWidget( dontScale, 1, 1, 0, 1 );

    CSSCustomDialogLayout->addWidget( GroupBox3, 0, 1 );

    GroupBox3_2 = new TQGroupBox( this, "GroupBox3_2" );
    GroupBox3_2->setColumnLayout(0, TQt::Vertical );
    GroupBox3_2->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox3_2->layout()->setMargin( KDialog::marginHint() );
    GroupBox3_2Layout = new TQGridLayout( GroupBox3_2->layout() );
    GroupBox3_2Layout->setAlignment( TQt::AlignTop );

    hideImages = new TQCheckBox( GroupBox3_2, "hideImages" );

    GroupBox3_2Layout->addWidget( hideImages, 0, 0 );

    hideBackground = new TQCheckBox( GroupBox3_2, "hideBackground" );
    hideBackground->setChecked( true );

    GroupBox3_2Layout->addWidget( hideBackground, 1, 0 );

    CSSCustomDialogLayout->addMultiCellWidget( GroupBox3_2, 2, 2, 0, 1 );

    GroupBox7 = new TQGroupBox( this, "GroupBox7" );
    GroupBox7->setColumnLayout(0, TQt::Vertical );
    GroupBox7->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox7->layout()->setMargin( KDialog::marginHint() );
    GroupBox7Layout = new TQGridLayout( GroupBox7->layout() );
    GroupBox7Layout->setAlignment( TQt::AlignTop );

    txtBaseFontFamily = new TQLabel( GroupBox7, "txtBaseFontFamily" );

    GroupBox7Layout->addWidget( txtBaseFontFamily, 0, 0 );

    fontFamily = new TQComboBox( false, GroupBox7, "fontFamily" );
    fontFamily->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, fontFamily->sizePolicy().hasHeightForWidth() ) );

    GroupBox7Layout->addWidget( fontFamily, 0, 1 );
    Spacer7 = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox7Layout->addItem( Spacer7, 0, 2 );

    sameFamily = new TQCheckBox( GroupBox7, "sameFamily" );

    GroupBox7Layout->addMultiCellWidget( sameFamily, 1, 1, 0, 2 );

    CSSCustomDialogLayout->addWidget( GroupBox7, 0, 0 );
    Spacer5_2 = new TQSpacerItem( 20, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    CSSCustomDialogLayout->addItem( Spacer5_2, 4, 1 );

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

    preview = new TQPushButton( this, "preview" );
    Layout1->addWidget( preview );
    Spacer1_4 = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Spacer1_4 );

    CSSCustomDialogLayout->addMultiCellLayout( Layout1, 3, 3, 0, 1 );

    ButtonGroup2 = new TQButtonGroup( this, "ButtonGroup2" );
    ButtonGroup2->setExclusive( false );
    ButtonGroup2->setRadioButtonExclusive( true );
    ButtonGroup2->setColumnLayout(0, TQt::Vertical );
    ButtonGroup2->layout()->setSpacing( KDialog::spacingHint() );
    ButtonGroup2->layout()->setMargin( KDialog::marginHint() );
    ButtonGroup2Layout = new TQVBoxLayout( ButtonGroup2->layout() );
    ButtonGroup2Layout->setAlignment( TQt::AlignTop );

    blackOnWhite = new TQRadioButton( ButtonGroup2, "blackOnWhite" );
    blackOnWhite->setChecked( true );
    ButtonGroup2Layout->addWidget( blackOnWhite );

    whiteOnBlack = new TQRadioButton( ButtonGroup2, "whiteOnBlack" );
    ButtonGroup2Layout->addWidget( whiteOnBlack );

    customColor = new TQRadioButton( ButtonGroup2, "customColor" );
    ButtonGroup2Layout->addWidget( customColor );

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

    foregroundColor = new KColorButton( ButtonGroup2, "foregroundColor" );

    Layout2->addWidget( foregroundColor, 1, 2 );
    Spacer9 = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout2->addItem( Spacer9, 1, 3 );
    Spacer1 = new TQSpacerItem( 21, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    Layout2->addItem( Spacer1, 0, 0 );
    Spacer1_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    Layout2->addItem( Spacer1_2, 1, 0 );
    Spacer8 = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout2->addItem( Spacer8, 0, 3 );

    txtForeground = new TQLabel( ButtonGroup2, "txtForeground" );

    Layout2->addWidget( txtForeground, 1, 1 );

    backgroundColor = new KColorButton( ButtonGroup2, "backgroundColor" );

    Layout2->addWidget( backgroundColor, 0, 2 );

    txtBackground = new TQLabel( ButtonGroup2, "txtBackground" );

    Layout2->addWidget( txtBackground, 0, 1 );
    ButtonGroup2Layout->addLayout( Layout2 );

    sameColor = new TQCheckBox( ButtonGroup2, "sameColor" );
    ButtonGroup2Layout->addWidget( sameColor );

    CSSCustomDialogLayout->addMultiCellWidget( ButtonGroup2, 1, 1, 0, 1 );
    languageChange();
    resize( TQSize(584, 456).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( fontFamily, sameFamily );
    setTabOrder( sameFamily, basefontsize );
    setTabOrder( basefontsize, dontScale );
    setTabOrder( dontScale, blackOnWhite );
    setTabOrder( blackOnWhite, backgroundColor );
    setTabOrder( backgroundColor, foregroundColor );
    setTabOrder( foregroundColor, sameColor );
    setTabOrder( sameColor, hideImages );
    setTabOrder( hideImages, hideBackground );
    setTabOrder( hideBackground, preview );

    // buddies
    txtFontsize->setBuddy( basefontsize );
    txtBaseFontFamily->setBuddy( fontFamily );
    txtForeground->setBuddy( foregroundColor );
    txtBackground->setBuddy( backgroundColor );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CSSCustomDialog::languageChange()
{
    TQWhatsThis::add( this, tr2i18n( "<b>Stylesheets</b><p>See http://www.w3.org/Style/CSS for further information on cascading style sheets.</p>" ) );
    GroupBox3->setTitle( tr2i18n( "Font Size" ) );
    basefontsize->clear();
    basefontsize->insertItem( tr2i18n( "7" ) );
    basefontsize->insertItem( tr2i18n( "8" ) );
    basefontsize->insertItem( tr2i18n( "9" ) );
    basefontsize->insertItem( tr2i18n( "10" ) );
    basefontsize->insertItem( tr2i18n( "11" ) );
    basefontsize->insertItem( tr2i18n( "12" ) );
    basefontsize->insertItem( tr2i18n( "14" ) );
    basefontsize->insertItem( tr2i18n( "16" ) );
    basefontsize->insertItem( tr2i18n( "20" ) );
    basefontsize->insertItem( tr2i18n( "24" ) );
    basefontsize->insertItem( tr2i18n( "32" ) );
    basefontsize->insertItem( tr2i18n( "48" ) );
    basefontsize->insertItem( tr2i18n( "64" ) );
    txtFontsize->setText( tr2i18n( "Base font si&ze:" ) );
    dontScale->setText( tr2i18n( "&Use same size for all elements" ) );
    TQWhatsThis::add( dontScale, tr2i18n( "<b>Use same size for all elements</b><p>Select this option to override custom font sizes in favor of the base font size. All fonts will be displayed in the same size.</p>" ) );
    GroupBox3_2->setTitle( tr2i18n( "Images" ) );
    TQWhatsThis::add( GroupBox3_2, tr2i18n( "<b>Images</b><p>" ) );
    hideImages->setText( tr2i18n( "&Suppress images" ) );
    TQWhatsThis::add( hideImages, tr2i18n( "<b>Suppress images</b><p>Selecting this will prevent Konqueror from loading images.</p>" ) );
    hideBackground->setText( tr2i18n( "Suppress background images" ) );
    TQWhatsThis::add( hideBackground, tr2i18n( "<b>Suppress background images</b><p>Selecting this option will prevent Konqueror from loading background images.</p>" ) );
    GroupBox7->setTitle( tr2i18n( "Font Family" ) );
    TQWhatsThis::add( GroupBox7, tr2i18n( "<b>Font family</b><p>A font family is a group of fonts that resemble one another, with family members that are e.g. bold, italic, or any number of the above.</p>" ) );
    txtBaseFontFamily->setText( tr2i18n( "Base fa&mily:" ) );
    TQWhatsThis::add( fontFamily, tr2i18n( "<p>This is the currently selected font family</p>" ) );
    sameFamily->setText( tr2i18n( "Use same family for all text" ) );
    TQWhatsThis::add( sameFamily, tr2i18n( "<b>Use same family for all text</b><p>Select this option to override custom fonts everywhere in favor of the base font.</p>" ) );
    preview->setText( tr2i18n( "&Preview" ) );
    TQWhatsThis::add( preview, tr2i18n( "<b>Preview</b><p>Click on this button to see what your selections look like in action.</p>" ) );
    ButtonGroup2->setTitle( tr2i18n( "Colors" ) );
    blackOnWhite->setText( tr2i18n( "&Black on white" ) );
    TQWhatsThis::add( blackOnWhite, tr2i18n( "<b>Black on White</b><p>This is what you normally see.</p>" ) );
    whiteOnBlack->setText( tr2i18n( "&White on black" ) );
    TQWhatsThis::add( whiteOnBlack, tr2i18n( "<b>White on Black</b><p>This is your classic inverse color scheme.</p>" ) );
    customColor->setText( tr2i18n( "Cus&tom" ) );
    TQWhatsThis::add( customColor, tr2i18n( "<b>Custom</b><p>Select this option to define a custom color for the default font.</p>" ) );
    foregroundColor->setText( TQString::null );
    TQWhatsThis::add( foregroundColor, tr2i18n( "<b>Foreground color</b><p>The foreground color is the color that the text is drawn in.</p>" ) );
    txtForeground->setText( tr2i18n( "&Foreground:" ) );
    TQWhatsThis::add( txtForeground, tr2i18n( "<b>Foreground color</b><p>The foreground color is the color that the text is drawn in.</p>" ) );
    backgroundColor->setText( TQString::null );
    TQWhatsThis::add( backgroundColor, tr2i18n( "<b>Background</b><p>Behind this door lays the ability to choose a custom default background.</p>" ) );
    txtBackground->setText( tr2i18n( "Bac&kground:" ) );
    TQWhatsThis::add( txtBackground, tr2i18n( "<b>Background</b><p>This background color is the one displayed behind the text by default. A background image will override this.</p>" ) );
    sameColor->setText( tr2i18n( "Use same color for all text" ) );
    TQWhatsThis::add( sameColor, tr2i18n( "<b>Use same color for all text</b><p>Select this option to apply your chosen color to the default font as well as any custom fonts as specified in a stylesheet.</p>" ) );
}

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

TQMetaObject *CSSCustomDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CSSCustomDialog( "CSSCustomDialog", &CSSCustomDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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