00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
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
00025
00026
00027
00028
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
00075 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00076 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00077
00078
00079 setTabOrder( nameEdit, locationEdit );
00080 setTabOrder( locationEdit, buttonOk );
00081 setTabOrder( buttonOk, buttonCancel );
00082
00083
00084 textLabel1->setBuddy( nameEdit );
00085 textLabel1_2->setBuddy( locationEdit );
00086 }
00087
00088
00089
00090
00091 EditBookmarkDlg::~EditBookmarkDlg()
00092 {
00093
00094 }
00095
00096
00097
00098
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"