kpropertiesdesktopadvbase.cpp

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