khtml Library API Documentation

htmlpageinfo.cc

00001 #include <klocale.h>
00002 /****************************************************************************
00003 ** Form implementation generated from reading ui file './htmlpageinfo.ui'
00004 **
00005 ** Created: Wed Oct 8 12:13:21 2003
00006 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.1.1   edited Nov 21 17:40 $)
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "htmlpageinfo.h"
00012 
00013 #include <qvariant.h>
00014 #include <kactivelabel.h>
00015 #include <kpushbutton.h>
00016 #include <qheader.h>
00017 #include <qlabel.h>
00018 #include <qlistview.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /* 
00024  *  Constructs a KHTMLInfoDlg 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 KHTMLInfoDlg::KHTMLInfoDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
00031     : QDialog( parent, name, modal, fl )
00032 
00033 {
00034     if ( !name )
00035     setName( "HTMLPageInfo" );
00036     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
00037     HTMLPageInfoLayout = new QGridLayout( this, 1, 1, 11, 6, "HTMLPageInfoLayout"); 
00038 
00039     TextLabel2 = new QLabel( this, "TextLabel2" );
00040     TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
00041 
00042     HTMLPageInfoLayout->addWidget( TextLabel2, 0, 0 );
00043 
00044     _url = new KActiveLabel( this, "_url" );
00045     _url->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, _url->sizePolicy().hasHeightForWidth() ) );
00046 
00047     HTMLPageInfoLayout->addMultiCellWidget( _url, 1, 1, 1, 3 );
00048 
00049     TextLabel1 = new QLabel( this, "TextLabel1" );
00050     TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
00051 
00052     HTMLPageInfoLayout->addWidget( TextLabel1, 1, 0 );
00053 
00054     _title = new QLabel( this, "_title" );
00055     _title->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, _title->sizePolicy().hasHeightForWidth() ) );
00056 
00057     HTMLPageInfoLayout->addMultiCellWidget( _title, 0, 0, 1, 3 );
00058 
00059     _headers = new QListView( this, "_headers" );
00060     _headers->addColumn( tr2i18n( "Property" ) );
00061     _headers->addColumn( tr2i18n( "Value" ) );
00062     _headers->setSelectionMode( QListView::NoSelection );
00063 
00064     HTMLPageInfoLayout->addMultiCellWidget( _headers, 4, 4, 0, 3 );
00065 
00066     TextLabel6 = new QLabel( this, "TextLabel6" );
00067     TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) );
00068 
00069     HTMLPageInfoLayout->addMultiCellWidget( TextLabel6, 3, 3, 0, 1 );
00070 
00071     _lastModified = new QLabel( this, "_lastModified" );
00072     _lastModified->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, _lastModified->sizePolicy().hasHeightForWidth() ) );
00073 
00074     HTMLPageInfoLayout->addMultiCellWidget( _lastModified, 2, 2, 2, 3 );
00075 
00076     TextLabel4 = new QLabel( this, "TextLabel4" );
00077     TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
00078 
00079     HTMLPageInfoLayout->addMultiCellWidget( TextLabel4, 2, 2, 0, 1 );
00080     QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00081     HTMLPageInfoLayout->addMultiCell( spacer, 5, 5, 0, 2 );
00082 
00083     _close = new KPushButton( this, "_close" );
00084     _close->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, _close->sizePolicy().hasHeightForWidth() ) );
00085 
00086     HTMLPageInfoLayout->addWidget( _close, 5, 3 );
00087     languageChange();
00088     resize( QSize(600, 519).expandedTo(minimumSizeHint()) );
00089 
00090     // signals and slots connections
00091     connect( _close, SIGNAL( clicked() ), this, SLOT( close() ) );
00092 
00093     // buddies
00094     TextLabel2->setBuddy( _title );
00095     TextLabel1->setBuddy( _url );
00096     TextLabel6->setBuddy( _headers );
00097     TextLabel4->setBuddy( _lastModified );
00098 }
00099 
00100 /*
00101  *  Destroys the object and frees any allocated resources
00102  */
00103 KHTMLInfoDlg::~KHTMLInfoDlg()
00104 {
00105     // no need to delete child widgets, Qt does it all for us
00106 }
00107 
00108 /*
00109  *  Sets the strings of the subwidgets using the current
00110  *  language.
00111  */
00112 void KHTMLInfoDlg::languageChange()
00113 {
00114     setCaption( tr2i18n( "Page Information" ) );
00115     TextLabel2->setText( tr2i18n( "Title:" ) );
00116     TextLabel1->setText( tr2i18n( "URL:" ) );
00117     _headers->header()->setLabel( 0, tr2i18n( "Property" ) );
00118     _headers->header()->setLabel( 1, tr2i18n( "Value" ) );
00119     TextLabel6->setText( tr2i18n( "HTTP headers:" ) );
00120     TextLabel4->setText( tr2i18n( "Last modified:" ) );
00121     _close->setText( tr2i18n( "&Close" ) );
00122 }
00123 
00124 #include "htmlpageinfo.moc"
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:38 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001