#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'htmlpageinfo.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "htmlpageinfo.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a TDEHTMLInfoDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
TDEHTMLInfoDlg::TDEHTMLInfoDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "HTMLPageInfo" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    HTMLPageInfoLayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "HTMLPageInfoLayout"); 

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( KDialog::spacingHint() );
    groupBox2->layout()->setMargin( KDialog::marginHint() );
    groupBox2Layout = new TQHBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    layout1 = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout1"); 

    urlLabel = new TQLabel( groupBox2, "urlLabel" );
    urlLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, urlLabel->sizePolicy().hasHeightForWidth() ) );

    layout1->addWidget( urlLabel, 1, 0 );

    _title = new KActiveLabel( groupBox2, "_title" );
    _title->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 1, 0, _title->sizePolicy().hasHeightForWidth() ) );

    layout1->addWidget( _title, 0, 1 );

    _url = new KActiveLabel( groupBox2, "_url" );
    _url->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 1, 0, _url->sizePolicy().hasHeightForWidth() ) );

    layout1->addWidget( _url, 1, 1 );

    _lastModified = new TQLabel( groupBox2, "_lastModified" );
    _lastModified->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 1, 0, _lastModified->sizePolicy().hasHeightForWidth() ) );

    layout1->addWidget( _lastModified, 2, 1 );

    titleLabel = new TQLabel( groupBox2, "titleLabel" );
    titleLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, titleLabel->sizePolicy().hasHeightForWidth() ) );

    layout1->addWidget( titleLabel, 0, 0 );

    _lmLabel = new TQLabel( groupBox2, "_lmLabel" );
    _lmLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, _lmLabel->sizePolicy().hasHeightForWidth() ) );

    layout1->addWidget( _lmLabel, 2, 0 );

    _eLabel = new TQLabel( groupBox2, "_eLabel" );
    _eLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, _eLabel->sizePolicy().hasHeightForWidth() ) );

    layout1->addWidget( _eLabel, 3, 0 );

    _encoding = new KActiveLabel( groupBox2, "_encoding" );
    _encoding->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 1, 0, _encoding->sizePolicy().hasHeightForWidth() ) );

    layout1->addWidget( _encoding, 3, 1 );
    groupBox2Layout->addLayout( layout1 );

    HTMLPageInfoLayout->addMultiCellWidget( groupBox2, 0, 0, 0, 1 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( KDialog::spacingHint() );
    groupBox1->layout()->setMargin( KDialog::marginHint() );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    _headers = new TQListView( groupBox1, "_headers" );
    _headers->addColumn( tr2i18n( "Property" ) );
    _headers->addColumn( tr2i18n( "Value" ) );
    _headers->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 1, 1, _headers->sizePolicy().hasHeightForWidth() ) );
    _headers->setSelectionMode( TQListView::NoSelection );
    _headers->setResizeMode( TQListView::LastColumn );
    groupBox1Layout->addWidget( _headers );

    HTMLPageInfoLayout->addMultiCellWidget( groupBox1, 1, 1, 0, 1 );

    _close = new KPushButton( this, "_close" );
    _close->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, _close->sizePolicy().hasHeightForWidth() ) );
    _close->setDefault( true );

    HTMLPageInfoLayout->addWidget( _close, 2, 1 );
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    HTMLPageInfoLayout->addItem( Spacer3, 2, 0 );
    languageChange();
    resize( TQSize(550, 519).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( _close, TQ_SIGNAL( clicked() ), this, TQ_SLOT( close() ) );

    // tab order
    setTabOrder( _close, _url );
    setTabOrder( _url, _headers );

    // buddies
    urlLabel->setBuddy( _url );
    titleLabel->setBuddy( _title );
    _lmLabel->setBuddy( _lastModified );
    _eLabel->setBuddy( _encoding );
}

/*
 *  Destroys the object and frees any allocated resources
 */
TDEHTMLInfoDlg::~TDEHTMLInfoDlg()
{
    // no need to delete child widgets, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TDEHTMLInfoDlg::languageChange()
{
    setCaption( tr2i18n( "Document Information" ) );
    groupBox2->setTitle( tr2i18n( "General" ) );
    urlLabel->setText( tr2i18n( "URL:" ) );
    titleLabel->setText( tr2i18n( "Title:" ) );
    _lmLabel->setText( tr2i18n( "Last modified:" ) );
    _eLabel->setText( tr2i18n( "Document encoding:" ) );
    groupBox1->setTitle( tr2i18n( "HTTP Headers" ) );
    _headers->header()->setLabel( 0, tr2i18n( "Property" ) );
    _headers->header()->setLabel( 1, tr2i18n( "Value" ) );
    _close->setText( tr2i18n( "&Close" ) );
}

/****************************************************************************
** TDEHTMLInfoDlg meta object code from reading C++ file 'htmlpageinfo.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "htmlpageinfo.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *TDEHTMLInfoDlg::className() const
{
    return "TDEHTMLInfoDlg";
}

TQMetaObject *TDEHTMLInfoDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TDEHTMLInfoDlg( "TDEHTMLInfoDlg", &TDEHTMLInfoDlg::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString TDEHTMLInfoDlg::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "TDEHTMLInfoDlg", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString TDEHTMLInfoDlg::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "TDEHTMLInfoDlg", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* TDEHTMLInfoDlg::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"TDEHTMLInfoDlg", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_TDEHTMLInfoDlg.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* TDEHTMLInfoDlg::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "TDEHTMLInfoDlg" ) )
	return this;
    return TQDialog::tqt_cast( clname );
}

bool TDEHTMLInfoDlg::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

bool TDEHTMLInfoDlg::tqt_emit( int _id, TQUObject* _o )
{
    return TQDialog::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool TDEHTMLInfoDlg::tqt_property( int id, int f, TQVariant* v)
{
    return TQDialog::tqt_property( id, f, v);
}

bool TDEHTMLInfoDlg::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
