00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "editcatalogdlgbase.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qlabel.h>
00017 #include <kurlrequester.h>
00018 #include <klineedit.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022
00023
00024
00025
00026
00027
00028
00029
00030 EditCatalogBase::EditCatalogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00031 : QDialog( parent, name, modal, fl )
00032 {
00033 if ( !name )
00034 setName( "EditCatalogBase" );
00035 setEnabled( TRUE );
00036 setSizeGripEnabled( TRUE );
00037 EditCatalogBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "EditCatalogBaseLayout");
00038
00039 Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
00040 Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00041 Layout1->addItem( Horizontal_Spacing2 );
00042
00043 buttonOk = new QPushButton( this, "buttonOk" );
00044 buttonOk->setAutoDefault( TRUE );
00045 buttonOk->setDefault( TRUE );
00046 Layout1->addWidget( buttonOk );
00047
00048 buttonCancel = new QPushButton( this, "buttonCancel" );
00049 buttonCancel->setAutoDefault( TRUE );
00050 Layout1->addWidget( buttonCancel );
00051
00052 EditCatalogBaseLayout->addLayout( Layout1, 1, 0 );
00053
00054 layout3 = new QGridLayout( 0, 1, 1, 0, 6, "layout3");
00055 spacer2 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00056 layout3->addItem( spacer2, 4, 0 );
00057
00058 textLabel1_2 = new QLabel( this, "textLabel1_2" );
00059
00060 layout3->addWidget( textLabel1_2, 0, 0 );
00061
00062 locationURL = new KURLRequester( this, "locationURL" );
00063
00064 layout3->addWidget( locationURL, 1, 0 );
00065
00066 titleLabel = new QLabel( this, "titleLabel" );
00067 titleLabel->setEnabled( FALSE );
00068
00069 layout3->addWidget( titleLabel, 2, 0 );
00070
00071 titleEdit = new KLineEdit( this, "titleEdit" );
00072 titleEdit->setEnabled( FALSE );
00073
00074 layout3->addWidget( titleEdit, 3, 0 );
00075
00076 EditCatalogBaseLayout->addLayout( layout3, 0, 0 );
00077 languageChange();
00078 resize( QSize(404, 163).expandedTo(minimumSizeHint()) );
00079 clearWState( WState_Polished );
00080
00081
00082 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00083 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00084 connect( locationURL, SIGNAL( textChanged(const QString&) ), this, SLOT( locationURLChanged(const QString&) ) );
00085
00086
00087 setTabOrder( locationURL, titleEdit );
00088 setTabOrder( titleEdit, buttonOk );
00089 setTabOrder( buttonOk, buttonCancel );
00090
00091
00092 textLabel1_2->setBuddy( locationURL );
00093 titleLabel->setBuddy( titleEdit );
00094 }
00095
00096
00097
00098
00099 EditCatalogBase::~EditCatalogBase()
00100 {
00101
00102 }
00103
00104
00105
00106
00107
00108 void EditCatalogBase::languageChange()
00109 {
00110 setCaption( tr2i18n( "Documentation Catalog Properties" ) );
00111 buttonOk->setText( tr2i18n( "&OK" ) );
00112 buttonOk->setAccel( QKeySequence( QString::null ) );
00113 buttonCancel->setText( tr2i18n( "&Cancel" ) );
00114 buttonCancel->setAccel( QKeySequence( QString::null ) );
00115 textLabel1_2->setText( tr2i18n( "&Location:" ) );
00116 titleLabel->setText( tr2i18n( "&Title:" ) );
00117 }
00118
00119 void EditCatalogBase::locationURLChanged(const QString&)
00120 {
00121 qWarning( "EditCatalogBase::locationURLChanged(const QString&): Not implemented yet" );
00122 }
00123
00124 #include "editcatalogdlgbase.moc"