kdeui Library API Documentation

KBugReport Class Reference

A dialog box for sending bug reports. More...

#include <kbugreport.h>

Inheritance diagram for KBugReport:

KDialogBase KDialog QDialog List of all members.

Public Member Functions

 KBugReport (QWidget *parent=0L, bool modal=true, const KAboutData *aboutData=0L)
virtual ~KBugReport ()

Protected Slots

virtual void slotConfigureEmail ()
virtual void slotSetFrom ()
virtual void slotUrlClicked (const QString &)
virtual void slotOk (void)
virtual void slotCancel ()
void appChanged (int)
void updateURL ()

Protected Member Functions

QString text () const
bool sendBugReport ()
virtual void virtual_hook (int id, void *data)

Protected Attributes

KProcessm_process
const KAboutDatam_aboutData
QMultiLineEditm_lineedit
QLineEditm_subject
QLabelm_from
QLabelm_version
QString m_strVersion
QHButtonGroupm_bgSeverity
QPushButtonm_configureEmail

Detailed Description

A dialog box for sending bug reports.

All the information needed by the dialog box (program name, version, bug-report address, etc.) comes from the KAboutData class. Make sure you create an instance of KAboutData and pass it to KCmdLineArgs.

Author:
David Faure <faure@kde.org>

Definition at line 42 of file kbugreport.h.


Constructor & Destructor Documentation

KBugReport::KBugReport QWidget parent = 0L,
bool  modal = true,
const KAboutData aboutData = 0L
 

Creates a bug-report dialog.

Note that you shouldn't have to do this manually, since KHelpMenu takes care of the menu item for "Report Bug..." and of creating a KBugReport dialog.

Definition at line 68 of file kbugreport.cpp.

References KGlobal::_activeInstance, KInstance::aboutData(), QWhatsThis::add(), QGridLayout::addMultiCellWidget(), QGridLayout::addWidget(), appChanged(), KAboutData::bugAddress(), KStdGuiItem::close(), QString::fromLatin1(), KGlobal::instance(), m_aboutData, m_bgSeverity, m_configureEmail, m_from, m_lineedit, m_process, m_strVersion, m_subject, m_version, KDialogBase::plainPage(), KAboutData::productName(), QLabel::setBuddy(), KDialogBase::setButtonCancel(), KDialogBase::setButtonOK(), QRadioButton::setChecked(), QGridLayout::setColStretch(), QLabel::setText(), KDialogBase::showButtonOK(), slotConfigureEmail(), slotOk(), slotSetFrom(), KDialog::spacingHint(), text(), updateURL(), and KAboutData::version().

KBugReport::~KBugReport  )  [virtual]
 

Destructor.

Definition at line 271 of file kbugreport.cpp.


Member Function Documentation

void KBugReport::slotConfigureEmail  )  [protected, virtual, slot]
 

"Configure email" has been clicked - this calls kcmshell System/email

Definition at line 309 of file kbugreport.cpp.

References endl(), QString::fromLatin1(), kdDebug(), m_configureEmail, m_process, slotSetFrom(), and KProcess::start().

Referenced by KBugReport().

void KBugReport::slotSetFrom  )  [protected, virtual, slot]
 

Sets the "From" field from the e-mail configuration Called at creation time, but also after "Configure email" is closed.

Definition at line 325 of file kbugreport.cpp.

References QString::fromLatin1(), QString::isEmpty(), m_configureEmail, m_from, m_process, KConfigBase::readEntry(), KConfigBase::setGroup(), and QLabel::setText().

Referenced by KBugReport(), and slotConfigureEmail().

void KBugReport::slotUrlClicked const QString  )  [protected, virtual, slot]
 

The URL-Label "http://bugs.kde.org/" was clicked.

Deprecated:
remove in KDE4.0

Definition at line 354 of file kbugreport.cpp.

References KDialogBase::slotCancel().

void KBugReport::slotOk void   )  [protected, virtual, slot]
 

OK has been clicked.

Reimplemented from KDialogBase.

Definition at line 366 of file kbugreport.cpp.

References QDialog::accept(), KMessageBox::error(), KMessageBox::information(), m_bgSeverity, m_lineedit, m_subject, KMessageBox::questionYesNo(), sendBugReport(), and QLineEdit::text().

Referenced by KBugReport().

void KBugReport::slotCancel  )  [protected, virtual, slot]
 

Cancel has been clicked.

Reimplemented from KDialogBase.

Definition at line 423 of file kbugreport.cpp.

References KStdGuiItem::cont(), KStdGuiItem::discard(), QLineEdit::edited(), QMultiLineEdit::edited(), m_lineedit, m_subject, KDialogBase::slotCancel(), and KMessageBox::warningYesNo().

void KBugReport::appChanged int   )  [protected, slot]
 

Application combo selection changed (and was activated).

Definition at line 288 of file kbugreport.cpp.

References endl(), QString::find(), kdDebug(), QString::left(), m_aboutData, m_strVersion, m_version, QLabel::setText(), updateURL(), and KAboutData::version().

Referenced by KBugReport().

void KBugReport::updateURL  )  [protected, slot]
 

Update the url to match the current os, compiler, selected app, etc.

Definition at line 276 of file kbugreport.cpp.

References KURL::addQueryItem(), and m_strVersion.

Referenced by appChanged(), and KBugReport().

QString KBugReport::text  )  const [protected]
 

A complete copy of the bug report.

Returns:
QString copy of the bug report.

Definition at line 437 of file kbugreport.cpp.

References KLocale::defaultLanguage(), endl(), QString::endsWith(), QString::fromLatin1(), kdDebug(), KGlobal::locale(), m_bgSeverity, m_lineedit, m_strVersion, QMultiLineEdit::numLines(), QString::replace(), and QMultiLineEdit::textLine().

Referenced by KBugReport(), and sendBugReport().

bool KBugReport::sendBugReport  )  [protected]
 

Attempt to e-mail the bug report.

Returns:
true on success

Definition at line 477 of file kbugreport.cpp.

References QString::ascii(), KAboutData::bugAddress(), KTempFile::close(), QFile::encodeName(), endl(), QTextStream::eof(), KStandardDirs::findExe(), QString::fromLatin1(), QString::isEmpty(), kdDebug(), kdError(), QString::length(), locate(), m_aboutData, m_subject, KTempFile::name(), QFile::open(), KProcess::quote(), QTextStream::readLine(), QTextStream::setEncoding(), text(), QLineEdit::text(), and KTempFile::unlink().

Referenced by slotOk().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdeui Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 8 06:22:46 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003