• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kmobiletools

baseerror.h

Go to the documentation of this file.
00001 /***************************************************************************
00002    Copyright (C) 2007 by Matthias Lechner <matthias@lmme.de>
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 2 of the License, or
00007    (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the
00016    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018  ***************************************************************************/
00019 
00020 #ifndef KMOBILETOOLSBASEERROR_H
00021 #define KMOBILETOOLSBASEERROR_H
00022 
00023 #include <libkmobiletools/kmobiletools_export.h>
00024 
00025 #include <QtCore/QString>
00026 #include <QtCore/QVariant>
00027 #include <QtCore/QDateTime>
00028 #include <QtCore/QHash>
00029 
00030 #define ERROR_META_INFO __FILE__, __LINE__, QDateTime::currentDateTime(), __FUNCTION__
00031 
00032 namespace KMobileTools {
00033 
00034 // gcc 4.1.3 doesn't compile without using this typedef
00035 typedef QHash<QString,QVariant> DebugHash;
00036 
00037 class BaseErrorPrivate;
00038 
00042 class KMOBILETOOLS_EXPORT BaseError {
00043 public:
00044     enum Priority {
00045         Low = 0,
00046         Medium = 5,
00047         High = 10
00048     };
00049 
00050     BaseError( const QString& fileName,
00051                int lineNumber,
00052                const QDateTime& dateTime,
00053                const QString& methodName,
00054                const DebugHash& customDebugInformation = DebugHash() );
00055     virtual ~BaseError();
00056 
00057     bool operator==( const BaseError& error ) const;
00058     bool operator!=( const BaseError& error ) const;
00059 
00065     QString fileName() const;
00066 
00072     int lineNumber() const;
00073 
00079     QDateTime dateTime() const;
00080 
00086     QString methodName() const;
00087 
00093     Priority priority() const;
00094 
00100     QString description() const;
00101 
00109     virtual DebugHash customDebugInformation() const;
00110 
00111 protected:
00119     void setPriority( Priority priority );
00120 
00126     void setDescription( const QString& errorDescription );
00127 
00128 private:
00129     BaseErrorPrivate* const d;
00130 };
00131 
00132 }
00133 
00134 #endif

kmobiletools

Skip menu "kmobiletools"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal