#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/khtml/kjserrordlg.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "kjserrordlg.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qframe.h>
#include <qtextbrowser.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kactivelabel.h"
#include "/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/khtml/kjserrordlg.ui.h"

/*
 *  Constructs a KJSErrorDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
KJSErrorDlg::KJSErrorDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KJSErrorDlg" );
    KJSErrorDlgLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "KJSErrorDlgLayout"); 

    _close = new QPushButton( this, "_close" );

    KJSErrorDlgLayout->addWidget( _close, 4, 2 );

    _clear = new QPushButton( this, "_clear" );

    KJSErrorDlgLayout->addWidget( _clear, 4, 1 );

    line1 = new QFrame( this, "line1" );
    line1->setFrameShape( QFrame::HLine );
    line1->setFrameShadow( QFrame::Sunken );
    line1->setFrameShape( QFrame::HLine );

    KJSErrorDlgLayout->addMultiCellWidget( line1, 2, 2, 0, 2 );
    spacer1 = new QSpacerItem( 311, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    KJSErrorDlgLayout->addMultiCell( spacer1, 3, 4, 0, 0 );

    _errorText = new QTextBrowser( this, "_errorText" );
    _errorText->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 1, _errorText->sizePolicy().hasHeightForWidth() ) );
    _errorText->setTextFormat( QTextBrowser::RichText );

    KJSErrorDlgLayout->addMultiCellWidget( _errorText, 1, 1, 0, 2 );

    _url = new KSqueezedTextLabel( this, "_url" );

    KJSErrorDlgLayout->addMultiCellWidget( _url, 0, 0, 0, 2 );
    languageChange();
    resize( QSize(600, 484).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( _clear, SIGNAL( clicked() ), _errorText, SLOT( clear() ) );
    connect( _close, SIGNAL( clicked() ), this, SLOT( hide() ) );

    // tab order
    setTabOrder( _errorText, _close );
    setTabOrder( _close, _clear );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KJSErrorDlg::languageChange()
{
    setCaption( tr2i18n( "JavaScript Errors" ) );
    QWhatsThis::add( this, tr2i18n( "This dialog provides you with notification and details of scripting errors that occur on web pages.  In many cases it is due to an error in the web site as designed by its author.  In other cases it is the result of a programming error in Konqueror.  If you suspect the former, please contact the webmaster of the site in question.  Conversely if you suspect an error in Konqueror, please file a bug report at http://bugs.kde.org/.  A test case which illustrates the problem will be appreciated." ) );
    _close->setText( tr2i18n( "&Close" ) );
    _clear->setText( tr2i18n( "C&lear" ) );
    _url->setText( QString::null );
}

#include "kjserrordlg.moc"
