khtml Library API Documentation

htmlpageinfo.cc

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