KDevelop API Documentation

editbookmarkdlg.cpp

Go to the documentation of this file.
00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './editbookmarkdlg.ui'
00005 **
00006 ** Created: Tue Mar 22 23:50:14 2005
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "editbookmarkdlg.h"
00013 
00014 #include <qvariant.h>
00015 #include <kurlrequester.h>
00016 #include <qlabel.h>
00017 #include <qlineedit.h>
00018 #include <qpushbutton.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a EditBookmarkDlg 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 EditBookmarkDlg::EditBookmarkDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
00031     : QDialog( parent, name, modal, fl )
00032 {
00033     if ( !name )
00034     setName( "EditBookmarkDlg" );
00035     setSizeGripEnabled( TRUE );
00036     EditBookmarkDlgLayout = new QGridLayout( this, 1, 1, 11, 6, "EditBookmarkDlgLayout"); 
00037 
00038     locationEdit = new KURLRequester( this, "locationEdit" );
00039 
00040     EditBookmarkDlgLayout->addWidget( locationEdit, 1, 1 );
00041 
00042     textLabel1 = new QLabel( this, "textLabel1" );
00043 
00044     EditBookmarkDlgLayout->addWidget( textLabel1, 0, 0 );
00045 
00046     textLabel1_2 = new QLabel( this, "textLabel1_2" );
00047 
00048     EditBookmarkDlgLayout->addWidget( textLabel1_2, 1, 0 );
00049 
00050     nameEdit = new QLineEdit( this, "nameEdit" );
00051 
00052     EditBookmarkDlgLayout->addWidget( nameEdit, 0, 1 );
00053 
00054     Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 
00055     Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00056     Layout1->addItem( Horizontal_Spacing2 );
00057 
00058     buttonOk = new QPushButton( this, "buttonOk" );
00059     buttonOk->setAutoDefault( TRUE );
00060     buttonOk->setDefault( TRUE );
00061     Layout1->addWidget( buttonOk );
00062 
00063     buttonCancel = new QPushButton( this, "buttonCancel" );
00064     buttonCancel->setAutoDefault( TRUE );
00065     Layout1->addWidget( buttonCancel );
00066 
00067     EditBookmarkDlgLayout->addMultiCellLayout( Layout1, 3, 3, 0, 1 );
00068     spacer2 = new QSpacerItem( 20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
00069     EditBookmarkDlgLayout->addItem( spacer2, 2, 1 );
00070     languageChange();
00071     resize( QSize(323, 121).expandedTo(minimumSizeHint()) );
00072     clearWState( WState_Polished );
00073 
00074     // signals and slots connections
00075     connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00076     connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00077 
00078     // tab order
00079     setTabOrder( nameEdit, locationEdit );
00080     setTabOrder( locationEdit, buttonOk );
00081     setTabOrder( buttonOk, buttonCancel );
00082 
00083     // buddies
00084     textLabel1->setBuddy( nameEdit );
00085     textLabel1_2->setBuddy( locationEdit );
00086 }
00087 
00088 /*
00089  *  Destroys the object and frees any allocated resources
00090  */
00091 EditBookmarkDlg::~EditBookmarkDlg()
00092 {
00093     // no need to delete child widgets, Qt does it all for us
00094 }
00095 
00096 /*
00097  *  Sets the strings of the subwidgets using the current
00098  *  language.
00099  */
00100 void EditBookmarkDlg::languageChange()
00101 {
00102     textLabel1->setText( tr2i18n( "&Name:" ) );
00103     textLabel1_2->setText( tr2i18n( "&Location:" ) );
00104     buttonOk->setText( tr2i18n( "&OK" ) );
00105     buttonOk->setAccel( QKeySequence( QString::null ) );
00106     buttonCancel->setText( tr2i18n( "&Cancel" ) );
00107     buttonCancel->setAccel( QKeySequence( QString::null ) );
00108 }
00109 
00110 #include "editbookmarkdlg.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:55 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003