#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/usr/src/ports/kdebase3/kdebase3-3.5.10-11.i686/src/kdebase-3.5.10/kcontrol/performance/konqueror_ui.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "konqueror_ui.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kdialog.h"

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

    reuse_group = new QButtonGroup( this, "reuse_group" );
    reuse_group->setColumnLayout(0, Qt::Vertical );
    reuse_group->layout()->setSpacing( KDialog::spacingHint() );
    reuse_group->layout()->setMargin( KDialog::marginHint() );
    reuse_groupLayout = new QVBoxLayout( reuse_group->layout() );
    reuse_groupLayout->setAlignment( Qt::AlignTop );

    rb_never_reuse = new QRadioButton( reuse_group, "rb_never_reuse" );
    reuse_groupLayout->addWidget( rb_never_reuse );

    rb_file_browsing_reuse = new QRadioButton( reuse_group, "rb_file_browsing_reuse" );
    reuse_groupLayout->addWidget( rb_file_browsing_reuse );

    rb_always_reuse = new QRadioButton( reuse_group, "rb_always_reuse" );
    reuse_groupLayout->addWidget( rb_always_reuse );
    Konqueror_uiLayout->addWidget( reuse_group );

    groupBox1 = new QGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, Qt::Vertical );
    groupBox1->layout()->setSpacing( KDialog::spacingHint() );
    groupBox1->layout()->setMargin( KDialog::marginHint() );
    groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( Qt::AlignTop );

    layout2 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout2"); 

    lb_preload_count = new QLabel( groupBox1, "lb_preload_count" );
    layout2->addWidget( lb_preload_count );

    sb_preload_count = new QSpinBox( groupBox1, "sb_preload_count" );
    layout2->addWidget( sb_preload_count );
    spacer2 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout2->addItem( spacer2 );
    groupBox1Layout->addLayout( layout2 );

    cb_preload_on_startup = new QCheckBox( groupBox1, "cb_preload_on_startup" );
    groupBox1Layout->addWidget( cb_preload_on_startup );

    cb_always_have_preloaded = new QCheckBox( groupBox1, "cb_always_have_preloaded" );
    groupBox1Layout->addWidget( cb_always_have_preloaded );
    Konqueror_uiLayout->addWidget( groupBox1 );
    spacer1 = new QSpacerItem( 20, 160, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Konqueror_uiLayout->addItem( spacer1 );
    languageChange();
    resize( QSize(600, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    lb_preload_count->setBuddy( sb_preload_count );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KCMPerformance::Konqueror_ui::languageChange()
{
    reuse_group->setTitle( tr2i18n( "Minimize Memory Usage" ) );
    rb_never_reuse->setText( tr2i18n( "&Never" ) );
    rb_file_browsing_reuse->setText( tr2i18n( "For &file browsing only (recommended)" ) );
    rb_always_reuse->setText( tr2i18n( "Alwa&ys (use with care)" ) );
    groupBox1->setTitle( tr2i18n( "Preloading" ) );
    lb_preload_count->setText( tr2i18n( "Maximum number of instances kept &preloaded:" ) );
    cb_preload_on_startup->setText( tr2i18n( "Preload an instance after KDE startup" ) );
    cb_always_have_preloaded->setText( tr2i18n( "Always try to have at least one preloaded instance" ) );
}

#include "konqueror_ui.moc"
