khtml Library API Documentation

htmlpageinfo.cc

00001 #include <kdialog.h> 00002 #include <klocale.h> 00003 /**************************************************************************** 00004 ** Form implementation generated from reading ui file './htmlpageinfo.ui' 00005 ** 00006 ** Created: Wed Sep 29 09:35:32 2004 00007 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $) 00008 ** 00009 ** WARNING! All changes made in this file will be lost! 00010 ****************************************************************************/ 00011 00012 #include "htmlpageinfo.h" 00013 00014 #include <qvariant.h> 00015 #include <kdialog.h> 00016 #include <qpushbutton.h> 00017 #include <qgroupbox.h> 00018 #include <qlabel.h> 00019 #include <kactivelabel.h> 00020 #include <qheader.h> 00021 #include <qlistview.h> 00022 #include <kpushbutton.h> 00023 #include <qlayout.h> 00024 #include <qtooltip.h> 00025 #include <qwhatsthis.h> 00026 00027 /* 00028 * Constructs a KHTMLInfoDlg as a child of 'parent', with the 00029 * name 'name' and widget flags set to 'f'. 00030 * 00031 * The dialog will by default be modeless, unless you set 'modal' to 00032 * TRUE to construct a modal dialog. 00033 */ 00034 KHTMLInfoDlg::KHTMLInfoDlg( QWidget* parent, const char* name, bool modal, WFlags fl ) 00035 : QDialog( parent, name, modal, fl ) 00036 { 00037 if ( !name ) 00038 setName( "HTMLPageInfo" ); 00039 setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) ); 00040 HTMLPageInfoLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "HTMLPageInfoLayout"); 00041 00042 groupBox2 = new QGroupBox( this, "groupBox2" ); 00043 groupBox2->setColumnLayout(0, Qt::Vertical ); 00044 groupBox2->layout()->setSpacing( KDialog::spacingHint() ); 00045 groupBox2->layout()->setMargin( KDialog::marginHint() ); 00046 groupBox2Layout = new QHBoxLayout( groupBox2->layout() ); 00047 groupBox2Layout->setAlignment( Qt::AlignTop ); 00048 00049 layout1 = new QGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout1"); 00050 00051 urlLabel = new QLabel( groupBox2, "urlLabel" ); 00052 urlLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, urlLabel->sizePolicy().hasHeightForWidth() ) ); 00053 00054 layout1->addWidget( urlLabel, 1, 0 ); 00055 00056 _title = new KActiveLabel( groupBox2, "_title" ); 00057 _title->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 1, 0, _title->sizePolicy().hasHeightForWidth() ) ); 00058 00059 layout1->addWidget( _title, 0, 1 ); 00060 00061 _url = new KActiveLabel( groupBox2, "_url" ); 00062 _url->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 1, 0, _url->sizePolicy().hasHeightForWidth() ) ); 00063 00064 layout1->addWidget( _url, 1, 1 ); 00065 00066 _lastModified = new QLabel( groupBox2, "_lastModified" ); 00067 _lastModified->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 1, 0, _lastModified->sizePolicy().hasHeightForWidth() ) ); 00068 00069 layout1->addWidget( _lastModified, 2, 1 ); 00070 00071 titleLabel = new QLabel( groupBox2, "titleLabel" ); 00072 titleLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, titleLabel->sizePolicy().hasHeightForWidth() ) ); 00073 00074 layout1->addWidget( titleLabel, 0, 0 ); 00075 00076 _lmLabel = new QLabel( groupBox2, "_lmLabel" ); 00077 _lmLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, _lmLabel->sizePolicy().hasHeightForWidth() ) ); 00078 00079 layout1->addWidget( _lmLabel, 2, 0 ); 00080 groupBox2Layout->addLayout( layout1 ); 00081 00082 HTMLPageInfoLayout->addMultiCellWidget( groupBox2, 0, 0, 0, 1 ); 00083 00084 groupBox1 = new QGroupBox( this, "groupBox1" ); 00085 groupBox1->setColumnLayout(0, Qt::Vertical ); 00086 groupBox1->layout()->setSpacing( KDialog::spacingHint() ); 00087 groupBox1->layout()->setMargin( KDialog::marginHint() ); 00088 groupBox1Layout = new QVBoxLayout( groupBox1->layout() ); 00089 groupBox1Layout->setAlignment( Qt::AlignTop ); 00090 00091 _headers = new QListView( groupBox1, "_headers" ); 00092 _headers->addColumn( tr2i18n( "Property" ) ); 00093 _headers->addColumn( tr2i18n( "Value" ) ); 00094 _headers->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 1, 1, _headers->sizePolicy().hasHeightForWidth() ) ); 00095 _headers->setSelectionMode( QListView::NoSelection ); 00096 _headers->setResizeMode( QListView::LastColumn ); 00097 groupBox1Layout->addWidget( _headers ); 00098 00099 HTMLPageInfoLayout->addMultiCellWidget( groupBox1, 1, 1, 0, 1 ); 00100 00101 _close = new KPushButton( this, "_close" ); 00102 _close->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, _close->sizePolicy().hasHeightForWidth() ) ); 00103 _close->setDefault( TRUE ); 00104 00105 HTMLPageInfoLayout->addWidget( _close, 2, 1 ); 00106 Spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00107 HTMLPageInfoLayout->addItem( Spacer3, 2, 0 ); 00108 languageChange(); 00109 resize( QSize(550, 519).expandedTo(minimumSizeHint()) ); 00110 clearWState( WState_Polished ); 00111 00112 // signals and slots connections 00113 connect( _close, SIGNAL( clicked() ), this, SLOT( close() ) ); 00114 00115 // tab order 00116 setTabOrder( _close, _url ); 00117 setTabOrder( _url, _headers ); 00118 00119 // buddies 00120 urlLabel->setBuddy( _url ); 00121 titleLabel->setBuddy( _title ); 00122 _lmLabel->setBuddy( _lastModified ); 00123 } 00124 00125 /* 00126 * Destroys the object and frees any allocated resources 00127 */ 00128 KHTMLInfoDlg::~KHTMLInfoDlg() 00129 { 00130 // no need to delete child widgets, Qt does it all for us 00131 } 00132 00133 /* 00134 * Sets the strings of the subwidgets using the current 00135 * language. 00136 */ 00137 void KHTMLInfoDlg::languageChange() 00138 { 00139 setCaption( tr2i18n( "Document Information" ) ); 00140 groupBox2->setTitle( tr2i18n( "General" ) ); 00141 urlLabel->setText( tr2i18n( "URL:" ) ); 00142 titleLabel->setText( tr2i18n( "Title:" ) ); 00143 _lmLabel->setText( tr2i18n( "Last modified:" ) ); 00144 groupBox1->setTitle( tr2i18n( "HTTP Headers" ) ); 00145 _headers->header()->setLabel( 0, tr2i18n( "Property" ) ); 00146 _headers->header()->setLabel( 1, tr2i18n( "Value" ) ); 00147 _close->setText( tr2i18n( "&Close" ) ); 00148 } 00149 00150 #include "htmlpageinfo.moc"
KDE Logo
This file is part of the documentation for khtml Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:42:26 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003