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

#include "kpropertiesdesktopadvbase.h"

#include <qvariant.h>
#include <klineedit.h>
#include <qpushbutton.h>
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qcombobox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

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

    buttonGroup2 = new QButtonGroup( this, "buttonGroup2" );
    buttonGroup2->setColumnLayout(0, Qt::Vertical );
    buttonGroup2->layout()->setSpacing( 6 );
    buttonGroup2->layout()->setMargin( 11 );
    buttonGroup2Layout = new QGridLayout( buttonGroup2->layout() );
    buttonGroup2Layout->setAlignment( Qt::AlignTop );
    spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
    buttonGroup2Layout->addMultiCell( spacer3, 1, 2, 0, 0 );

    terminalCheck = new QCheckBox( buttonGroup2, "terminalCheck" );

    buttonGroup2Layout->addMultiCellWidget( terminalCheck, 0, 0, 0, 2 );

    terminalEditLabel = new QLabel( buttonGroup2, "terminalEditLabel" );

    buttonGroup2Layout->addWidget( terminalEditLabel, 2, 1 );

    terminalCloseCheck = new QCheckBox( buttonGroup2, "terminalCloseCheck" );

    buttonGroup2Layout->addMultiCellWidget( terminalCloseCheck, 1, 1, 1, 2 );

    terminalEdit = new KLineEdit( buttonGroup2, "terminalEdit" );

    buttonGroup2Layout->addWidget( terminalEdit, 2, 2 );
    widget11Layout->addWidget( buttonGroup2 );

    buttonGroup2_2 = new QButtonGroup( this, "buttonGroup2_2" );
    buttonGroup2_2->setColumnLayout(0, Qt::Vertical );
    buttonGroup2_2->layout()->setSpacing( 6 );
    buttonGroup2_2->layout()->setMargin( 11 );
    buttonGroup2_2Layout = new QGridLayout( buttonGroup2_2->layout() );
    buttonGroup2_2Layout->setAlignment( Qt::AlignTop );

    suidCheck = new QCheckBox( buttonGroup2_2, "suidCheck" );

    buttonGroup2_2Layout->addMultiCellWidget( suidCheck, 0, 0, 0, 2 );
    spacer3_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
    buttonGroup2_2Layout->addItem( spacer3_2, 1, 0 );

    suidEditLabel = new QLabel( buttonGroup2_2, "suidEditLabel" );

    buttonGroup2_2Layout->addWidget( suidEditLabel, 1, 1 );

    suidEdit = new KLineEdit( buttonGroup2_2, "suidEdit" );

    buttonGroup2_2Layout->addWidget( suidEdit, 1, 2 );
    widget11Layout->addWidget( buttonGroup2_2 );

    buttonGroup4 = new QButtonGroup( this, "buttonGroup4" );
    buttonGroup4->setColumnLayout(0, Qt::Vertical );
    buttonGroup4->layout()->setSpacing( 6 );
    buttonGroup4->layout()->setMargin( 11 );
    buttonGroup4Layout = new QGridLayout( buttonGroup4->layout() );
    buttonGroup4Layout->setAlignment( Qt::AlignTop );

    startupInfoCheck = new QCheckBox( buttonGroup4, "startupInfoCheck" );

    buttonGroup4Layout->addMultiCellWidget( startupInfoCheck, 0, 0, 0, 2 );

    systrayCheck = new QCheckBox( buttonGroup4, "systrayCheck" );

    buttonGroup4Layout->addMultiCellWidget( systrayCheck, 1, 1, 0, 2 );

    textLabel12 = new QLabel( buttonGroup4, "textLabel12" );

    buttonGroup4Layout->addWidget( textLabel12, 2, 0 );

    dcopCombo = new QComboBox( FALSE, buttonGroup4, "dcopCombo" );

    buttonGroup4Layout->addWidget( dcopCombo, 2, 1 );
    spacer33 = new QSpacerItem( 50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    buttonGroup4Layout->addItem( spacer33, 2, 2 );
    widget11Layout->addWidget( buttonGroup4 );
    languageChange();
    resize( QSize(463, 294).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( terminalCheck, SIGNAL( toggled(bool) ), terminalCloseCheck, SLOT( setEnabled(bool) ) );
    connect( terminalCheck, SIGNAL( toggled(bool) ), terminalEdit, SLOT( setEnabled(bool) ) );
    connect( terminalCheck, SIGNAL( toggled(bool) ), terminalEditLabel, SLOT( setEnabled(bool) ) );
    connect( suidCheck, SIGNAL( toggled(bool) ), suidEdit, SLOT( setEnabled(bool) ) );
    connect( suidCheck, SIGNAL( toggled(bool) ), suidEditLabel, SLOT( setEnabled(bool) ) );

    // buddies
    terminalEditLabel->setBuddy( terminalEdit );
    suidEditLabel->setBuddy( suidEdit );
    textLabel12->setBuddy( dcopCombo );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KPropertiesDesktopAdvBase::languageChange()
{
    buttonGroup2->setTitle( tr2i18n( "Terminal" ) );
    terminalCheck->setText( tr2i18n( "&Run in terminal" ) );
    QWhatsThis::add( terminalCheck, tr2i18n( "Check this option if the application you want to run is a text mode application or if you want the information that is provided by the terminal emulator window." ) );
    terminalEditLabel->setText( tr2i18n( "&Terminal options:" ) );
    terminalCloseCheck->setText( tr2i18n( "Do not &close when command exits" ) );
    QWhatsThis::add( terminalCloseCheck, tr2i18n( "Check this option if the text mode application offers relevant information on exit. Keeping the terminal emulator open allows you to retrieve this information." ) );
    buttonGroup2_2->setTitle( tr2i18n( "User" ) );
    suidCheck->setText( tr2i18n( "Ru&n as a different user" ) );
    QWhatsThis::add( suidCheck, tr2i18n( "Check this option if you want to run this application with a different user id. Every process has a different user id associated with it. This id code determines file access and other permissions. The password of the user is required to use this option." ) );
    suidEditLabel->setText( tr2i18n( "&Username:" ) );
    QWhatsThis::add( suidEditLabel, tr2i18n( "Enter the user name you want to run the application as." ) );
    QWhatsThis::add( suidEdit, tr2i18n( "Enter the user name you want to run the application as here." ) );
    buttonGroup4->setTitle( tr2i18n( "Startup" ) );
    startupInfoCheck->setText( tr2i18n( "Enable &launch feedback" ) );
    QWhatsThis::add( startupInfoCheck, tr2i18n( "Check this option if you want to make clear that your application has started. This visual feedback may appear as a busy cursor or in the taskbar." ) );
    systrayCheck->setText( tr2i18n( "&Place in system tray" ) );
    QWhatsThis::add( systrayCheck, tr2i18n( "Check this option if you want to have a system tray handle for your application." ) );
    textLabel12->setText( tr2i18n( "&DCOP registration:" ) );
    dcopCombo->clear();
    dcopCombo->insertItem( tr2i18n( "None" ) );
    dcopCombo->insertItem( tr2i18n( "Multiple Instances" ) );
    dcopCombo->insertItem( tr2i18n( "Single Instance" ) );
    dcopCombo->insertItem( tr2i18n( "Run Until Finished" ) );
}

#include "kpropertiesdesktopadvbase.moc"
