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 18 13:59:43 2006
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 <kactivelabel.h>
00016 #include <qheader.h>
00017 #include <qlistview.h>
00018 #include <kpushbutton.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     if ( !name )
00034     setName( "HTMLPageInfo" );
00035     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
00036     HTMLPageInfoLayout = new QGridLayout( this, 1, 1, 11, 6, "HTMLPageInfoLayout"); 
00037 
00038     TextLabel2 = new QLabel( this, "TextLabel2" );
00039     TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
00040 
00041     HTMLPageInfoLayout->addWidget( TextLabel2, 0, 0 );
00042 
00043     _url = new KActiveLabel( this, "_url" );
00044     _url->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, _url->sizePolicy().hasHeightForWidth() ) );
00045 
00046     HTMLPageInfoLayout->addMultiCellWidget( _url, 1, 1, 1, 3 );
00047 
00048     TextLabel1 = new QLabel( this, "TextLabel1" );
00049     TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
00050 
00051     HTMLPageInfoLayout->addWidget( TextLabel1, 1, 0 );
00052 
00053     _title = new QLabel( this, "_title" );
00054     _title->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, _title->sizePolicy().hasHeightForWidth() ) );
00055 
00056     HTMLPageInfoLayout->addMultiCellWidget( _title, 0, 0, 1, 3 );
00057 
00058     _headers = new QListView( this, "_headers" );
00059     _headers->addColumn( tr2i18n( "Property" ) );
00060     _headers->addColumn( tr2i18n( "Value" ) );
00061     _headers->setSelectionMode( QListView::NoSelection );
00062 
00063     HTMLPageInfoLayout->addMultiCellWidget( _headers, 4, 4, 0, 3 );
00064 
00065     TextLabel6 = new QLabel( this, "TextLabel6" );
00066     TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) );
00067 
00068     HTMLPageInfoLayout->addMultiCellWidget( TextLabel6, 3, 3, 0, 1 );
00069 
00070     _lastModified = new QLabel( this, "_lastModified" );
00071     _lastModified->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, _lastModified->sizePolicy().hasHeightForWidth() ) );
00072 
00073     HTMLPageInfoLayout->addMultiCellWidget( _lastModified, 2, 2, 2, 3 );
00074 
00075     TextLabel4 = new QLabel( this, "TextLabel4" );
00076     TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
00077 
00078     HTMLPageInfoLayout->addMultiCellWidget( TextLabel4, 2, 2, 0, 1 );
00079     QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00080     HTMLPageInfoLayout->addMultiCell( spacer, 5, 5, 0, 2 );
00081 
00082     _close = new KPushButton( this, "_close" );
00083     _close->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, _close->sizePolicy().hasHeightForWidth() ) );
00084 
00085     HTMLPageInfoLayout->addWidget( _close, 5, 3 );
00086     languageChange();
00087     resize( QSize(600, 519).expandedTo(minimumSizeHint()) );
00088     clearWState( WState_Polished );
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.3.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 18 14:08:36 2006 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001