khtml Library API Documentation

kjserrordlg.cc

00001 #include <klocale.h>
00002 /****************************************************************************
00003 ** Form implementation generated from reading ui file './kjserrordlg.ui'
00004 **
00005 ** Created: Wed Feb 4 12:24:18 2004
00006 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.2.3   edited May 19 14:22 $)
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "kjserrordlg.h"
00012 
00013 #include <qvariant.h>
00014 #include <qpushbutton.h>
00015 #include <qframe.h>
00016 #include <qtextbrowser.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020 #include "./kjserrordlg.ui.h"
00021 
00022 /*
00023  *  Constructs a KJSErrorDlg as a child of 'parent', with the
00024  *  name 'name' and widget flags set to 'f'.
00025  *
00026  *  The dialog will by default be modeless, unless you set 'modal' to
00027  *  TRUE to construct a modal dialog.
00028  */
00029 KJSErrorDlg::KJSErrorDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
00030     : QDialog( parent, name, modal, fl )
00031 {
00032     if ( !name )
00033     setName( "KJSErrorDlg" );
00034     KJSErrorDlgLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "KJSErrorDlgLayout"); 
00035 
00036     _close = new QPushButton( this, "_close" );
00037 
00038     KJSErrorDlgLayout->addWidget( _close, 4, 2 );
00039 
00040     _clear = new QPushButton( this, "_clear" );
00041 
00042     KJSErrorDlgLayout->addWidget( _clear, 4, 1 );
00043 
00044     line1 = new QFrame( this, "line1" );
00045     line1->setFrameShape( QFrame::HLine );
00046     line1->setFrameShadow( QFrame::Sunken );
00047     line1->setFrameShape( QFrame::HLine );
00048 
00049     KJSErrorDlgLayout->addMultiCellWidget( line1, 2, 2, 0, 2 );
00050     QSpacerItem* spacer = new QSpacerItem( 311, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00051     KJSErrorDlgLayout->addMultiCell( spacer, 3, 4, 0, 0 );
00052 
00053     _errorText = new QTextBrowser( this, "_errorText" );
00054     _errorText->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 1, _errorText->sizePolicy().hasHeightForWidth() ) );
00055     _errorText->setTextFormat( QTextBrowser::RichText );
00056 
00057     KJSErrorDlgLayout->addMultiCellWidget( _errorText, 1, 1, 0, 2 );
00058 
00059     _url = new KActiveLabel( this, "_url" );
00060 
00061     KJSErrorDlgLayout->addMultiCellWidget( _url, 0, 0, 0, 2 );
00062     languageChange();
00063     resize( QSize(600, 484).expandedTo(minimumSizeHint()) );
00064     clearWState( WState_Polished );
00065 
00066     // signals and slots connections
00067     connect( _clear, SIGNAL( clicked() ), _errorText, SLOT( clear() ) );
00068     connect( _close, SIGNAL( clicked() ), this, SLOT( hide() ) );
00069 
00070     // tab order
00071     setTabOrder( _errorText, _close );
00072     setTabOrder( _close, _clear );
00073     init();
00074 }
00075 
00076 /*
00077  *  Destroys the object and frees any allocated resources
00078  */
00079 KJSErrorDlg::~KJSErrorDlg()
00080 {
00081     // no need to delete child widgets, Qt does it all for us
00082 }
00083 
00084 /*
00085  *  Sets the strings of the subwidgets using the current
00086  *  language.
00087  */
00088 void KJSErrorDlg::languageChange()
00089 {
00090     setCaption( tr2i18n( "JavaScript Errors" ) );
00091     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." ) );
00092     _close->setText( tr2i18n( "&Close" ) );
00093     _clear->setText( tr2i18n( "C&lear" ) );
00094     _url->setText( QString::null );
00095 }
00096 
00097 #include "kjserrordlg.moc"
KDE Logo
This file is part of the documentation for khtml Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:37:22 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003