certmanager/lib

adddirectoryservicedialog.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './adddirectoryservicedialog.ui'
00005 **
00006 ** Created: Thu Mar 29 05:49:13 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 "adddirectoryservicedialog.h"
00013 
00014 #include <qvariant.h>
00015 #include <qlabel.h>
00016 #include <qlineedit.h>
00017 #include <qpushbutton.h>
00018 #include <qframe.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a AddDirectoryServiceDialog as a child of 'parent', with the
00025  *  name 'name' and widget flags set to 'f'.
00026  *
00027  *  The dialog will by default be modeless, unless you set 'modal' to
00028  *  TRUE to construct a modal dialog.
00029  */
00030 AddDirectoryServiceDialog::AddDirectoryServiceDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
00031     : QDialog( parent, name, modal, fl )
00032 {
00033     if ( !name )
00034     setName( "AddDirectoryServiceDialog" );
00035     AddDirectoryServiceDialogLayout = new QGridLayout( this, 1, 1, 11, 6, "AddDirectoryServiceDialogLayout"); 
00036 
00037     serverNameLA = new QLabel( this, "serverNameLA" );
00038 
00039     AddDirectoryServiceDialogLayout->addWidget( serverNameLA, 0, 0 );
00040 
00041     descriptionED = new QLineEdit( this, "descriptionED" );
00042 
00043     AddDirectoryServiceDialogLayout->addMultiCellWidget( descriptionED, 2, 2, 1, 3 );
00044 
00045     portED = new QLineEdit( this, "portED" );
00046 
00047     AddDirectoryServiceDialogLayout->addMultiCellWidget( portED, 1, 1, 1, 3 );
00048 
00049     serverNameED = new QLineEdit( this, "serverNameED" );
00050 
00051     AddDirectoryServiceDialogLayout->addMultiCellWidget( serverNameED, 0, 0, 1, 3 );
00052 
00053     usernameLA = new QLabel( this, "usernameLA" );
00054 
00055     AddDirectoryServiceDialogLayout->addWidget( usernameLA, 3, 0 );
00056     spacer23 = new QSpacerItem( 20, 60, QSizePolicy::Minimum, QSizePolicy::Expanding );
00057     AddDirectoryServiceDialogLayout->addItem( spacer23, 5, 3 );
00058 
00059     passwordLA = new QLabel( this, "passwordLA" );
00060 
00061     AddDirectoryServiceDialogLayout->addWidget( passwordLA, 4, 0 );
00062 
00063     PushButton3 = new QPushButton( this, "PushButton3" );
00064     PushButton3->setDefault( TRUE );
00065 
00066     AddDirectoryServiceDialogLayout->addWidget( PushButton3, 8, 2 );
00067 
00068     PushButton4 = new QPushButton( this, "PushButton4" );
00069 
00070     AddDirectoryServiceDialogLayout->addWidget( PushButton4, 8, 3 );
00071 
00072     line1 = new QFrame( this, "line1" );
00073     line1->setFrameShape( QFrame::HLine );
00074     line1->setFrameShadow( QFrame::Sunken );
00075     line1->setFrameShape( QFrame::HLine );
00076 
00077     AddDirectoryServiceDialogLayout->addMultiCellWidget( line1, 6, 6, 0, 3 );
00078     spacer21 = new QSpacerItem( 260, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00079     AddDirectoryServiceDialogLayout->addMultiCell( spacer21, 7, 8, 0, 1 );
00080 
00081     usernameED = new QLineEdit( this, "usernameED" );
00082 
00083     AddDirectoryServiceDialogLayout->addMultiCellWidget( usernameED, 3, 3, 1, 3 );
00084 
00085     passwordED = new QLineEdit( this, "passwordED" );
00086     passwordED->setEchoMode( QLineEdit::Password );
00087 
00088     AddDirectoryServiceDialogLayout->addMultiCellWidget( passwordED, 4, 4, 1, 3 );
00089 
00090     descriptionLA = new QLabel( this, "descriptionLA" );
00091 
00092     AddDirectoryServiceDialogLayout->addWidget( descriptionLA, 2, 0 );
00093 
00094     portLA = new QLabel( this, "portLA" );
00095 
00096     AddDirectoryServiceDialogLayout->addWidget( portLA, 1, 0 );
00097     languageChange();
00098     resize( QSize(389, 257).expandedTo(minimumSizeHint()) );
00099     clearWState( WState_Polished );
00100 
00101     // signals and slots connections
00102     connect( PushButton3, SIGNAL( clicked() ), this, SLOT( accept() ) );
00103     connect( PushButton4, SIGNAL( clicked() ), this, SLOT( reject() ) );
00104 
00105     // tab order
00106     setTabOrder( serverNameED, portED );
00107     setTabOrder( portED, descriptionED );
00108     setTabOrder( descriptionED, usernameED );
00109     setTabOrder( usernameED, passwordED );
00110     setTabOrder( passwordED, PushButton3 );
00111     setTabOrder( PushButton3, PushButton4 );
00112 
00113     // buddies
00114     serverNameLA->setBuddy( serverNameED );
00115     usernameLA->setBuddy( usernameED );
00116     passwordLA->setBuddy( passwordED );
00117     descriptionLA->setBuddy( descriptionED );
00118     portLA->setBuddy( portED );
00119 }
00120 
00121 /*
00122  *  Destroys the object and frees any allocated resources
00123  */
00124 AddDirectoryServiceDialog::~AddDirectoryServiceDialog()
00125 {
00126     // no need to delete child widgets, Qt does it all for us
00127 }
00128 
00129 /*
00130  *  Sets the strings of the subwidgets using the current
00131  *  language.
00132  */
00133 void AddDirectoryServiceDialog::languageChange()
00134 {
00135     setCaption( tr2i18n( "Add or Change Directory Service" ) );
00136     serverNameLA->setText( tr2i18n( "&Server name:" ) );
00137     portED->setText( tr2i18n( "389" ) );
00138     usernameLA->setText( tr2i18n( "&User name (optional):" ) );
00139     passwordLA->setText( tr2i18n( "Pass&word (optional):" ) );
00140     PushButton3->setText( tr2i18n( "&OK" ) );
00141     PushButton4->setText( tr2i18n( "&Cancel" ) );
00142     descriptionLA->setText( tr2i18n( "&Base DN:" ) );
00143     portLA->setText( tr2i18n( "&Port:" ) );
00144 }
00145 
00146 #include "adddirectoryservicedialog.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys