kpropertiesdesktopadvbase.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './kpropertiesdesktopadvbase.ui'
00005 **
00006 ** Created by: The User Interface Compiler ($Id: qt/main.cpp   3.3.6   edited Aug 31 2005 $)
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "kpropertiesdesktopadvbase.h"
00012 
00013 #include <qvariant.h>
00014 #include <klineedit.h>
00015 #include <qpushbutton.h>
00016 #include <qbuttongroup.h>
00017 #include <qcheckbox.h>
00018 #include <qlabel.h>
00019 #include <qcombobox.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 
00024 /*
00025  *  Constructs a KPropertiesDesktopAdvBase as a child of 'parent', with the
00026  *  name 'name' and widget flags set to 'f'.
00027  */
00028 KPropertiesDesktopAdvBase::KPropertiesDesktopAdvBase( QWidget* parent, const char* name, WFlags fl )
00029     : QWidget( parent, name, fl )
00030 {
00031     if ( !name )
00032     setName( "widget11" );
00033     widget11Layout = new QVBoxLayout( this, 0, 6, "widget11Layout"); 
00034 
00035     buttonGroup2 = new QButtonGroup( this, "buttonGroup2" );
00036     buttonGroup2->setColumnLayout(0, Qt::Vertical );
00037     buttonGroup2->layout()->setSpacing( 6 );
00038     buttonGroup2->layout()->setMargin( 11 );
00039     buttonGroup2Layout = new QGridLayout( buttonGroup2->layout() );
00040     buttonGroup2Layout->setAlignment( Qt::AlignTop );
00041     spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
00042     buttonGroup2Layout->addMultiCell( spacer3, 1, 2, 0, 0 );
00043 
00044     terminalCheck = new QCheckBox( buttonGroup2, "terminalCheck" );
00045 
00046     buttonGroup2Layout->addMultiCellWidget( terminalCheck, 0, 0, 0, 2 );
00047 
00048     terminalEditLabel = new QLabel( buttonGroup2, "terminalEditLabel" );
00049 
00050     buttonGroup2Layout->addWidget( terminalEditLabel, 2, 1 );
00051 
00052     terminalCloseCheck = new QCheckBox( buttonGroup2, "terminalCloseCheck" );
00053 
00054     buttonGroup2Layout->addMultiCellWidget( terminalCloseCheck, 1, 1, 1, 2 );
00055 
00056     terminalEdit = new KLineEdit( buttonGroup2, "terminalEdit" );
00057 
00058     buttonGroup2Layout->addWidget( terminalEdit, 2, 2 );
00059     widget11Layout->addWidget( buttonGroup2 );
00060 
00061     buttonGroup2_2 = new QButtonGroup( this, "buttonGroup2_2" );
00062     buttonGroup2_2->setColumnLayout(0, Qt::Vertical );
00063     buttonGroup2_2->layout()->setSpacing( 6 );
00064     buttonGroup2_2->layout()->setMargin( 11 );
00065     buttonGroup2_2Layout = new QGridLayout( buttonGroup2_2->layout() );
00066     buttonGroup2_2Layout->setAlignment( Qt::AlignTop );
00067 
00068     suidCheck = new QCheckBox( buttonGroup2_2, "suidCheck" );
00069 
00070     buttonGroup2_2Layout->addMultiCellWidget( suidCheck, 0, 0, 0, 2 );
00071     spacer3_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
00072     buttonGroup2_2Layout->addItem( spacer3_2, 1, 0 );
00073 
00074     suidEditLabel = new QLabel( buttonGroup2_2, "suidEditLabel" );
00075 
00076     buttonGroup2_2Layout->addWidget( suidEditLabel, 1, 1 );
00077 
00078     suidEdit = new KLineEdit( buttonGroup2_2, "suidEdit" );
00079 
00080     buttonGroup2_2Layout->addWidget( suidEdit, 1, 2 );
00081     widget11Layout->addWidget( buttonGroup2_2 );
00082 
00083     buttonGroup4 = new QButtonGroup( this, "buttonGroup4" );
00084     buttonGroup4->setColumnLayout(0, Qt::Vertical );
00085     buttonGroup4->layout()->setSpacing( 6 );
00086     buttonGroup4->layout()->setMargin( 11 );
00087     buttonGroup4Layout = new QGridLayout( buttonGroup4->layout() );
00088     buttonGroup4Layout->setAlignment( Qt::AlignTop );
00089 
00090     startupInfoCheck = new QCheckBox( buttonGroup4, "startupInfoCheck" );
00091 
00092     buttonGroup4Layout->addMultiCellWidget( startupInfoCheck, 0, 0, 0, 2 );
00093 
00094     systrayCheck = new QCheckBox( buttonGroup4, "systrayCheck" );
00095 
00096     buttonGroup4Layout->addMultiCellWidget( systrayCheck, 1, 1, 0, 2 );
00097 
00098     textLabel12 = new QLabel( buttonGroup4, "textLabel12" );
00099 
00100     buttonGroup4Layout->addWidget( textLabel12, 2, 0 );
00101 
00102     dcopCombo = new QComboBox( FALSE, buttonGroup4, "dcopCombo" );
00103 
00104     buttonGroup4Layout->addWidget( dcopCombo, 2, 1 );
00105     spacer33 = new QSpacerItem( 50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00106     buttonGroup4Layout->addItem( spacer33, 2, 2 );
00107     widget11Layout->addWidget( buttonGroup4 );
00108     languageChange();
00109     resize( QSize(463, 294).expandedTo(minimumSizeHint()) );
00110     clearWState( WState_Polished );
00111 
00112     // signals and slots connections
00113     connect( terminalCheck, SIGNAL( toggled(bool) ), terminalCloseCheck, SLOT( setEnabled(bool) ) );
00114     connect( terminalCheck, SIGNAL( toggled(bool) ), terminalEdit, SLOT( setEnabled(bool) ) );
00115     connect( terminalCheck, SIGNAL( toggled(bool) ), terminalEditLabel, SLOT( setEnabled(bool) ) );
00116     connect( suidCheck, SIGNAL( toggled(bool) ), suidEdit, SLOT( setEnabled(bool) ) );
00117     connect( suidCheck, SIGNAL( toggled(bool) ), suidEditLabel, SLOT( setEnabled(bool) ) );
00118 
00119     // buddies
00120     terminalEditLabel->setBuddy( terminalEdit );
00121     suidEditLabel->setBuddy( suidEdit );
00122     textLabel12->setBuddy( dcopCombo );
00123 }
00124 
00125 /*
00126  *  Destroys the object and frees any allocated resources
00127  */
00128 KPropertiesDesktopAdvBase::~KPropertiesDesktopAdvBase()
00129 {
00130     // no need to delete child widgets, Qt does it all for us
00131 }
00132 
00133 /*
00134  *  Sets the strings of the subwidgets using the current
00135  *  language.
00136  */
00137 void KPropertiesDesktopAdvBase::languageChange()
00138 {
00139     buttonGroup2->setTitle( tr2i18n( "Terminal" ) );
00140     terminalCheck->setText( tr2i18n( "&Run in terminal" ) );
00141     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." ) );
00142     terminalEditLabel->setText( tr2i18n( "&Terminal options:" ) );
00143     terminalCloseCheck->setText( tr2i18n( "Do not &close when command exits" ) );
00144     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." ) );
00145     buttonGroup2_2->setTitle( tr2i18n( "User" ) );
00146     suidCheck->setText( tr2i18n( "Ru&n as a different user" ) );
00147     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." ) );
00148     suidEditLabel->setText( tr2i18n( "&Username:" ) );
00149     QWhatsThis::add( suidEditLabel, tr2i18n( "Enter the user name you want to run the application as." ) );
00150     QWhatsThis::add( suidEdit, tr2i18n( "Enter the user name you want to run the application as here." ) );
00151     buttonGroup4->setTitle( tr2i18n( "Startup" ) );
00152     startupInfoCheck->setText( tr2i18n( "Enable &launch feedback" ) );
00153     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." ) );
00154     systrayCheck->setText( tr2i18n( "&Place in system tray" ) );
00155     QWhatsThis::add( systrayCheck, tr2i18n( "Check this option if you want to have a system tray handle for your application." ) );
00156     textLabel12->setText( tr2i18n( "&DCOP registration:" ) );
00157     dcopCombo->clear();
00158     dcopCombo->insertItem( tr2i18n( "None" ) );
00159     dcopCombo->insertItem( tr2i18n( "Multiple Instances" ) );
00160     dcopCombo->insertItem( tr2i18n( "Single Instance" ) );
00161     dcopCombo->insertItem( tr2i18n( "Run Until Finished" ) );
00162 }
00163 
00164 #include "kpropertiesdesktopadvbase.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys