home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kbugreport.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  3.1 KB  |  122 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 1999 David Faure <faure@kde.org>
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License as published by the Free Software Foundation; either
  7.    version 2 of the License, or (at your option) any later version.
  8.  
  9.    This library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.    Library General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Library General Public License
  15.    along with this library; see the file COPYING.LIB.  If not, write to
  16.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17.    Boston, MA 02110-1301, USA.
  18. */
  19. #ifndef _KBUGREPORT_H__
  20. #define _KBUGREPORT_H__
  21.  
  22. #include <kdialogbase.h>
  23.  
  24. class QMultiLineEdit;
  25. class QLineEdit;
  26. class QHButtonGroup;
  27. class KProcess;
  28. class KAboutData;
  29. class KBugReportPrivate;
  30.  
  31. /**
  32.  * @short A dialog box for sending bug reports.
  33.  *
  34.  * All the information needed by the dialog box
  35.  * (program name, version, bug-report address, etc.)
  36.  * comes from the KAboutData class.
  37.  * Make sure you create an instance of KAboutData and pass it
  38.  * to KCmdLineArgs.
  39.  *
  40.  * @author David Faure <faure@kde.org>
  41.  */
  42. class KDEUI_EXPORT KBugReport : public KDialogBase
  43. {
  44.   Q_OBJECT
  45. public:
  46.   /**
  47.    * Creates a bug-report dialog.
  48.    * Note that you shouldn't have to do this manually,
  49.    * since KHelpMenu takes care of the menu item
  50.    * for "Report Bug..." and of creating a KBugReport dialog.
  51.    */
  52.   KBugReport( QWidget * parent = 0L, bool modal=true, const KAboutData *aboutData = 0L );
  53.   /**
  54.    * Destructor
  55.    */
  56.   virtual ~KBugReport();
  57.  
  58. protected slots:
  59.   /**
  60.    * "Configure email" has been clicked - this calls kcmshell System/email
  61.    */
  62.   virtual void slotConfigureEmail();
  63.   /**
  64.    * Sets the "From" field from the e-mail configuration
  65.    * Called at creation time, but also after "Configure email" is closed.
  66.    */
  67.   virtual void slotSetFrom();
  68.   /**
  69.    * The URL-Label "http://bugs.kde.org/" was clicked.
  70.    * @deprecated remove in KDE4.0
  71.    */
  72.   virtual void slotUrlClicked(const QString &);
  73.   /**
  74.    * OK has been clicked
  75.    */
  76.   virtual void slotOk( void );
  77.   /**
  78.    * Cancel has been clicked
  79.    */
  80.   virtual void slotCancel();
  81.  
  82.   /**
  83.    * Application combo selection changed (and was activated)
  84.    */
  85.   void appChanged(int);
  86.   /**
  87.    * Update the url to match the current os, compiler, selected app, etc
  88.    */
  89.   void updateURL();
  90.  
  91. protected:
  92.   /**
  93.    * A complete copy of the bug report
  94.    * @return QString copy of the bug report.
  95.    */
  96.   QString text() const;
  97.   /**
  98.    * Attempt to e-mail the bug report.
  99.    * @return true on success
  100.    */
  101.   bool sendBugReport();
  102.  
  103.   KProcess * m_process;
  104.   const KAboutData * m_aboutData;
  105.  
  106.   QMultiLineEdit * m_lineedit;
  107.   QLineEdit * m_subject;
  108.   QLabel * m_from;
  109.   QLabel * m_version;
  110.   QString m_strVersion;
  111.   QHButtonGroup * m_bgSeverity;
  112.   QPushButton * m_configureEmail;
  113.  
  114. protected:
  115.   virtual void virtual_hook( int id, void* data );
  116. private:
  117.   KBugReportPrivate *d;
  118. };
  119.  
  120. #endif
  121.  
  122.