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

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

#include "bgadvanced_ui.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <kcolorbutton.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    m_groupProgram = new TQButtonGroup( this, "m_groupProgram" );
    m_groupProgram->setColumnLayout(0, TQt::Vertical );
    m_groupProgram->layout()->setSpacing( KDialog::spacingHint() );
    m_groupProgram->layout()->setMargin( 11 );
    m_groupProgramLayout = new TQGridLayout( m_groupProgram->layout() );
    m_groupProgramLayout->setAlignment( TQt::AlignTop );

    m_buttonAdd = new TQPushButton( m_groupProgram, "m_buttonAdd" );
    m_buttonAdd->setEnabled( false );

    m_groupProgramLayout->addWidget( m_buttonAdd, 1, 1 );

    m_buttonRemove = new TQPushButton( m_groupProgram, "m_buttonRemove" );
    m_buttonRemove->setEnabled( false );

    m_groupProgramLayout->addWidget( m_buttonRemove, 2, 1 );

    m_buttonModify = new TQPushButton( m_groupProgram, "m_buttonModify" );
    m_buttonModify->setEnabled( false );

    m_groupProgramLayout->addWidget( m_buttonModify, 3, 1 );
    spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    m_groupProgramLayout->addItem( spacer, 4, 1 );

    m_listPrograms = new TQListView( m_groupProgram, "m_listPrograms" );
    m_listPrograms->addColumn( tr2i18n( "Program" ) );
    m_listPrograms->addColumn( tr2i18n( "Comment" ) );
    m_listPrograms->addColumn( tr2i18n( "Refresh" ) );
    m_listPrograms->setEnabled( false );
    m_listPrograms->setMinimumSize( TQSize( 400, 0 ) );

    m_groupProgramLayout->addMultiCellWidget( m_listPrograms, 1, 4, 0, 0 );

    m_cbProgram = new TQCheckBox( m_groupProgram, "m_cbProgram" );

    m_groupProgramLayout->addMultiCellWidget( m_cbProgram, 0, 0, 0, 1 );
    BGAdvancedBaseLayout->addWidget( m_groupProgram );

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

    m_colorText = new KColorButton( m_groupIconText, "m_colorText" );
    m_colorText->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_colorText->sizePolicy().hasHeightForWidth() ) );

    m_groupIconTextLayout->addWidget( m_colorText, 0, 1 );

    textLabel6 = new TQLabel( m_groupIconText, "textLabel6" );

    m_groupIconTextLayout->addWidget( textLabel6, 0, 0 );
    spacer7 = new TQSpacerItem( 220, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    m_groupIconTextLayout->addMultiCell( spacer7, 0, 1, 2, 2 );

    m_colorTextBackground = new KColorButton( m_groupIconText, "m_colorTextBackground" );
    m_colorTextBackground->setEnabled( false );

    m_groupIconTextLayout->addWidget( m_colorTextBackground, 1, 1 );

    m_cbSolidTextBackground = new TQCheckBox( m_groupIconText, "m_cbSolidTextBackground" );

    m_groupIconTextLayout->addWidget( m_cbSolidTextBackground, 1, 0 );

    m_cbShadow = new TQCheckBox( m_groupIconText, "m_cbShadow" );

    m_groupIconTextLayout->addWidget( m_cbShadow, 2, 0 );

    textLabel6_2 = new TQLabel( m_groupIconText, "textLabel6_2" );

    m_groupIconTextLayout->addWidget( textLabel6_2, 3, 0 );

    m_spinTextLines = new TQSpinBox( m_groupIconText, "m_spinTextLines" );
    m_spinTextLines->setValue( 0 );

    m_groupIconTextLayout->addWidget( m_spinTextLines, 3, 1 );

    m_spinTextWidth = new TQSpinBox( m_groupIconText, "m_spinTextWidth" );
    m_spinTextWidth->setMaxValue( 99999 );
    m_spinTextWidth->setValue( 0 );

    m_groupIconTextLayout->addWidget( m_spinTextWidth, 4, 1 );

    textLabel6_2_2 = new TQLabel( m_groupIconText, "textLabel6_2_2" );

    m_groupIconTextLayout->addWidget( textLabel6_2_2, 4, 0 );
    BGAdvancedBaseLayout->addWidget( m_groupIconText );

    m_groupCache = new TQButtonGroup( this, "m_groupCache" );
    m_groupCache->setColumnLayout(0, TQt::Vertical );
    m_groupCache->layout()->setSpacing( KDialog::spacingHint() );
    m_groupCache->layout()->setMargin( 11 );
    m_groupCacheLayout = new TQHBoxLayout( m_groupCache->layout() );
    m_groupCacheLayout->setAlignment( TQt::AlignTop );

    m_lblCache = new TQLabel( m_groupCache, "m_lblCache" );
    m_groupCacheLayout->addWidget( m_lblCache );

    m_spinCache = new TQSpinBox( m_groupCache, "m_spinCache" );
    m_groupCacheLayout->addWidget( m_spinCache );
    spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    m_groupCacheLayout->addItem( spacer2 );
    BGAdvancedBaseLayout->addWidget( m_groupCache );
    spacer4 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    BGAdvancedBaseLayout->addItem( spacer4 );
    languageChange();
    resize( TQSize(511, 454).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_cbProgram, TQ_SIGNAL( toggled(bool) ), m_buttonAdd, TQ_SLOT( setEnabled(bool) ) );
    connect( m_cbProgram, TQ_SIGNAL( toggled(bool) ), m_buttonRemove, TQ_SLOT( setEnabled(bool) ) );
    connect( m_cbProgram, TQ_SIGNAL( toggled(bool) ), m_buttonModify, TQ_SLOT( setEnabled(bool) ) );
    connect( m_cbProgram, TQ_SIGNAL( toggled(bool) ), m_listPrograms, TQ_SLOT( setEnabled(bool) ) );
    connect( m_cbSolidTextBackground, TQ_SIGNAL( toggled(bool) ), m_colorTextBackground, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( m_cbProgram, m_listPrograms );
    setTabOrder( m_listPrograms, m_buttonAdd );
    setTabOrder( m_buttonAdd, m_buttonRemove );
    setTabOrder( m_buttonRemove, m_buttonModify );
    setTabOrder( m_buttonModify, m_colorText );
    setTabOrder( m_colorText, m_cbSolidTextBackground );
    setTabOrder( m_cbSolidTextBackground, m_colorTextBackground );
    setTabOrder( m_colorTextBackground, m_cbShadow );
    setTabOrder( m_cbShadow, m_spinCache );

    // buddies
    textLabel6->setBuddy( m_colorText );
    textLabel6_2->setBuddy( m_colorText );
    textLabel6_2_2->setBuddy( m_colorText );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void BGAdvancedBase::languageChange()
{
    m_groupProgram->setTitle( tr2i18n( "Background Program" ) );
    m_buttonAdd->setText( tr2i18n( "&Add..." ) );
    TQWhatsThis::add( m_buttonAdd, tr2i18n( "<qt>\n"
"<p>Click here if you want to add a program to the listbox. This button opens a dialog where you are asked to give details about the program you want to run. To successfully add a program, you must know if it is compatible, the name of the executable file and, if necessary, its options.</p>\n"
"<p>You usually can get the available options to a suitable program by typing in a terminal emulator the name of the executable file plus --help (foobar --help).</p>\n"
"</qt>" ) );
    m_buttonRemove->setText( tr2i18n( "&Remove" ) );
    TQWhatsThis::add( m_buttonRemove, tr2i18n( "Click here to remove programs from this list. Please note that it does not remove the program from your system, it only removes it from the available options in the background drawing programs list." ) );
    m_buttonModify->setText( tr2i18n( "&Modify..." ) );
    TQWhatsThis::add( m_buttonModify, tr2i18n( "<qt>\n"
"<p>Click here to modify the programs options. You usually can get the available options to a suitable program by typing in a terminal emulator the name of the executable file plus --help. (example: kwebdesktop --help).</p>\n"
"<p>One useful example is the program kwebdesktop. It draws a web page on the background of your desktop.  You can use this program by selecting it on the listbox on the right, but it will draw a predefined web page. To change the web page it renders, select the kwebdesktop program on the listbox, then click here. A dialog will appear, allowing you to change the web page by replacing the old address (URL) with a new one.</p>\n"
"</qt>" ) );
    m_listPrograms->header()->setLabel( 0, tr2i18n( "Program" ) );
    m_listPrograms->header()->setLabel( 1, tr2i18n( "Comment" ) );
    m_listPrograms->header()->setLabel( 2, tr2i18n( "Refresh" ) );
    TQWhatsThis::add( m_listPrograms, tr2i18n( "<qt>\n"
"<p>Select from this listbox the program you want to use to draw your desktop background.</p>\n"
"<p>The <b>Program</b> column shows the name of the program.<br>\n"
"The <b>Comment</b> column brings a short description.<br>\n"
"The <b>Refresh</b> column indicates the time interval between redraws of the desktop.</p>\n"
"<p>The <b>K Web Desktop</b> program (kwebdesktop) is worth noting: it draws a specified page of the web in your desktop. You can modify it, and the webpage it draws by selecting it here, then clicking on the <b>Modify</b> button.<br>\n"
"You can also add new compliant programs. To do that, click on the <b>Add</b> button.<br>\n"
"You can also remove programs from this list clicking on the <b>Remove</b> button. Please note that it does not remove the program from your system, it only removes it from the available options in this listbox.</p>\n"
"</qt>" ) );
    m_cbProgram->setText( tr2i18n( "Use the following program for drawing the background:" ) );
    TQWhatsThis::add( m_cbProgram, tr2i18n( "Check here if you want to allow a program to draw your desktop background. Below you can find the list of programs currently available for drawing the background. You may use one of the available programs, add new ones or modify the existing ones to fit your needs." ) );
    m_groupIconText->setTitle( tr2i18n( "Background Icon Text" ) );
    m_colorText->setText( TQString::null );
    TQWhatsThis::add( m_colorText, tr2i18n( "Click here to change the color of the desktop font." ) );
    textLabel6->setText( tr2i18n( "&Text color:" ) );
    TQWhatsThis::add( textLabel6, tr2i18n( "Click here to change the color of the desktop font." ) );
    m_colorTextBackground->setText( TQString::null );
    TQWhatsThis::add( m_colorTextBackground, tr2i18n( "Click here to select the solid background color. Choose a different color from the background text color to assure readability." ) );
    m_cbSolidTextBackground->setText( tr2i18n( "&Use solid color behind text:" ) );
    TQWhatsThis::add( m_cbSolidTextBackground, tr2i18n( "Check here if you want to use a solid background color. This is useful to ensure that the desktop text will be identifiable against all background colors and wallpapers, or in other words, that a background or wallpaper will not make a desktop text of a similar color difficult to read." ) );
    m_cbShadow->setText( tr2i18n( "&Enable shadow" ) );
    TQWhatsThis::add( m_cbShadow, tr2i18n( "Check here to enable a shadow outline around the desktop font. This also improves the readability of the desktop text against backgrounds of a similar color." ) );
    textLabel6_2->setText( tr2i18n( "&Lines for icon text:" ) );
    TQWhatsThis::add( textLabel6_2, tr2i18n( "Choose here the maximum number of text lines below an icon on the desktop. Longer text will be truncated at the end of the last line." ) );
    m_spinTextLines->setSuffix( TQString::null );
    TQWhatsThis::add( m_spinTextLines, tr2i18n( "Choose here the maximum number of text lines below an icon on the desktop. Longer text will be truncated at the end of the last line." ) );
    m_spinTextWidth->setSuffix( TQString::null );
    m_spinTextWidth->setSpecialValueText( tr2i18n( "Auto" ) );
    TQWhatsThis::add( m_spinTextWidth, tr2i18n( "Choose here the maximum width of text lines (in pixel) below an icon on the desktop. If set to 'Auto' a default width based on the current font is used." ) );
    textLabel6_2_2->setText( tr2i18n( "&Width for icon text:" ) );
    TQWhatsThis::add( textLabel6_2_2, tr2i18n( "Choose here the maximum width of text lines (in pixel) below an icon on the desktop. If set to 'Auto' a default width based on the current font is used." ) );
    m_groupCache->setTitle( tr2i18n( "Memory Usage" ) );
    m_lblCache->setText( tr2i18n( "Size of background cache:" ) );
    TQWhatsThis::add( m_lblCache, tr2i18n( "In this box you can enter how much memory TDE should use for caching the background(s). If you have different backgrounds for the different desktops caching can make switching desktops smoother at the expense of higher memory use." ) );
    m_spinCache->setSuffix( tr2i18n( " k" ) );
    TQWhatsThis::add( m_spinCache, tr2i18n( "In this box you can enter how much memory TDE should use for caching the background(s). If you have different backgrounds for the different desktops caching can make switching desktops smoother at the expense of higher memory use." ) );
}

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

TQMetaObject *BGAdvancedBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_BGAdvancedBase( "BGAdvancedBase", &BGAdvancedBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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