00001 #ifndef KDREPORTSERRORDETAILS_H
00002 #define KDREPORTSERRORDETAILS_H
00003
00004 #include "KDReportsGlobal.h"
00005 #include <QtAlgorithms>
00006
00007 namespace KDReports {
00008 class ErrorDetailsPrivate;
00009
00013 class KDREPORTS_EXPORT ErrorDetails
00014 {
00015 public:
00016 ErrorDetails();
00017 explicit ErrorDetails( const QString& message );
00018 ErrorDetails( const ErrorDetails& other );
00019
00020
00021 ~ErrorDetails();
00022 inline ErrorDetails& operator=( const ErrorDetails& other );
00023
00027 QString message() const;
00028
00029 void setLine( int line );
00030 void setColumn( int column );
00031
00035 void setDriverMessage( const QString& message );
00036
00037 int line() const;
00038 int column() const;
00039
00043 QString driverMessage() const;
00044
00045 bool hasError() const;
00046
00047 inline void swap( ErrorDetails & other );
00048 private:
00049 ErrorDetailsPrivate* d;
00050 };
00051
00052 void ErrorDetails::swap( ErrorDetails & other )
00053 {
00054 qSwap( d, other.d );
00055 }
00056
00057
00058 ErrorDetails& ErrorDetails::operator=( const ErrorDetails& other )
00059 {
00060 ErrorDetails copy( other );
00061 swap( copy );
00062 return *this;
00063 }
00064
00065 }
00066
00067 template <> inline void qSwap( KDReports::ErrorDetails & lhs, KDReports::ErrorDetails & rhs )
00068 {
00069 lhs.swap( rhs );
00070 }
00071
00072 #endif
00073