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

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

#include "opscolorsui.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <kcombobox.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <tdelistbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    ColorPalette = new TDEListBox( groupBox5, "ColorPalette" );
    groupBox5Layout->addWidget( ColorPalette );

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

    textLabel1_2 = new TQLabel( groupBox5, "textLabel1_2" );
    layout4->addWidget( textLabel1_2 );

    kcfg_BoxBGMode = new KComboBox( false, groupBox5, "kcfg_BoxBGMode" );
    layout4->addWidget( kcfg_BoxBGMode );
    groupBox5Layout->addLayout( layout4 );

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

    textLabel1 = new TQLabel( groupBox5, "textLabel1" );
    layout10->addWidget( textLabel1 );

    kcfg_StarColorMode = new KComboBox( false, groupBox5, "kcfg_StarColorMode" );
    layout10->addWidget( kcfg_StarColorMode );
    groupBox5Layout->addLayout( layout10 );

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

    textLabel2 = new TQLabel( groupBox5, "textLabel2" );
    layout11->addWidget( textLabel2 );

    kcfg_StarColorIntensity = new KIntSpinBox( groupBox5, "kcfg_StarColorIntensity" );
    kcfg_StarColorIntensity->setMaxValue( 10 );
    layout11->addWidget( kcfg_StarColorIntensity );
    groupBox5Layout->addLayout( layout11 );
    OpsColorsUILayout->addWidget( groupBox5 );

    groupBox6 = new TQGroupBox( this, "groupBox6" );
    groupBox6->setColumnLayout(0, TQt::Vertical );
    groupBox6->layout()->setSpacing( 6 );
    groupBox6->layout()->setMargin( 11 );
    groupBox6Layout = new TQVBoxLayout( groupBox6->layout() );
    groupBox6Layout->setAlignment( TQt::AlignTop );

    PresetBox = new TDEListBox( groupBox6, "PresetBox" );
    groupBox6Layout->addWidget( PresetBox );

    layout9 = new TQGridLayout( 0, 1, 1, 0, 6, "layout9"); 
    spacer18 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer18, 0, 2 );

    RemovePreset = new KPushButton( groupBox6, "RemovePreset" );

    layout9->addWidget( RemovePreset, 1, 1 );
    spacer16 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer16, 0, 0 );
    spacer17 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer17, 1, 0 );
    spacer19 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer19, 1, 2 );

    AddPreset = new KPushButton( groupBox6, "AddPreset" );

    layout9->addWidget( AddPreset, 0, 1 );
    groupBox6Layout->addLayout( layout9 );
    OpsColorsUILayout->addWidget( groupBox6 );
    languageChange();
    resize( TQSize(561, 445).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( ColorPalette, kcfg_StarColorMode );
    setTabOrder( kcfg_StarColorMode, kcfg_StarColorIntensity );
    setTabOrder( kcfg_StarColorIntensity, PresetBox );
    setTabOrder( PresetBox, AddPreset );
    setTabOrder( AddPreset, RemovePreset );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void OpsColorsUI::languageChange()
{
    setCaption( tr2i18n( "OpsColors" ) );
    groupBox5->setTitle( tr2i18n( "Current Colors" ) );
    TQToolTip::add( ColorPalette, tr2i18n( "Current color settings" ) );
    TQWhatsThis::add( ColorPalette, tr2i18n( "The list of all customizable colors in the program.  Next to each item is a square showing the color it is currently set to.  Click on any item to change its color." ) );
    textLabel1_2->setText( tr2i18n( "InfoBox BG mode:" ) );
    kcfg_BoxBGMode->clear();
    kcfg_BoxBGMode->insertItem( tr2i18n( "No Fill" ) );
    kcfg_BoxBGMode->insertItem( tr2i18n( "Transparent" ) );
    kcfg_BoxBGMode->insertItem( tr2i18n( "Opaque" ) );
    textLabel1->setText( tr2i18n( "Star color mode:" ) );
    TQToolTip::add( kcfg_StarColorMode, tr2i18n( "Set the star color mode" ) );
    TQWhatsThis::add( kcfg_StarColorMode, tr2i18n( "There are four ways to draw stars on the map.  By default, stars are circles with a white core and a rim which is tinted to reflect the star's actual color.  You may also choose to draw the stars as solid white, red, or black circles, to match the needs of your overall color scheme." ) );
    textLabel2->setText( tr2i18n( "Star color intensity:" ) );
    TQToolTip::add( kcfg_StarColorIntensity, tr2i18n( "Set the intensity of star colors" ) );
    TQWhatsThis::add( kcfg_StarColorIntensity, tr2i18n( "When using the realistic-color star mode, this option will set the saturation level of the star's colors.  A higher value means more intense colors." ) );
    groupBox6->setTitle( tr2i18n( "Preset Color Schemes" ) );
    TQToolTip::add( PresetBox, tr2i18n( "List of preset color schemes" ) );
    TQWhatsThis::add( PresetBox, tr2i18n( "List of all known color schemes.  Several are provided by default, and you may also define your own." ) );
    RemovePreset->setText( tr2i18n( "Remove Color Scheme" ) );
    TQToolTip::add( RemovePreset, tr2i18n( "Remove a preset color scheme" ) );
    TQWhatsThis::add( RemovePreset, tr2i18n( "Press this button to remove the highlighted color scheme.  This will only work on your custom color schemes." ) );
    AddPreset->setText( tr2i18n( "Save Current Colors..." ) );
    TQToolTip::add( AddPreset, tr2i18n( "Create a new preset color scheme using current settings" ) );
    TQWhatsThis::add( AddPreset, tr2i18n( "After changing the colors to a scheme that you like, press this button to create a new scheme using those colors.  Your scheme will appear here in the list of presets, and will also be available in the \"Settings\" menu of the main window." ) );
}

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

TQMetaObject *OpsColorsUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_OpsColorsUI( "OpsColorsUI", &OpsColorsUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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