KHtml

kjserrordlg.cpp
1 #include "kjserrordlg.h"
2 
3 #include <QPushButton>
4 
5 KJSErrorDlg::KJSErrorDlg(QWidget *parent)
6  : QDialog(parent)
7 {
8  setupUi(this);
9  QPushButton *clear = _buttonBox->addButton(i18n("C&lear"), QDialogButtonBox::ActionRole);
10  clear->setIcon(QIcon::fromTheme("edit-clear-locationbar-ltr"));
11  connect(clear, SIGNAL(clicked()), this, SLOT(clear()));
12  connect(_buttonBox, SIGNAL(rejected()), this, SLOT(hide()));
13  init();
14 }
15 
16 void KJSErrorDlg::addError(const QString &error)
17 {
18  _errorText->append(error);
19 }
20 
21 void KJSErrorDlg::setURL(const QString &url)
22 {
23  _url->setText(url);
24 }
25 
26 void KJSErrorDlg::clear()
27 {
28  _errorText->clear();
29  init();
30 }
31 
32 void KJSErrorDlg::init()
33 {
34  _errorText->setAcceptRichText(false);
35 }
void setIcon(const QIcon &icon)
QCA_EXPORT void init()
QString i18n(const char *text, const TYPE &arg...)
QIcon fromTheme(const QString &name)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 26 2021 22:48:06 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.