• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

kabc

  • sources
  • kde-4.12
  • kdepimlibs
  • kabc
errorhandler.cpp
1 /*
2  This file is part of libkabc.
3 
4  Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
5  Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #include "errorhandler.h"
24 
25 #include <kdebug.h>
26 #include <klocalizedstring.h>
27 #include <kmessagebox.h>
28 
29 #include <QApplication>
30 
31 using namespace KABC;
32 
33 ErrorHandler::~ErrorHandler()
34 {
35 }
36 
37 ConsoleErrorHandler::ConsoleErrorHandler()
38  : d( 0 )
39 {
40 }
41 
42 ConsoleErrorHandler::~ConsoleErrorHandler()
43 {
44 }
45 
46 void ConsoleErrorHandler::error( const QString &msg )
47 {
48  // no debug area is ok here
49  kError( 5700 ) << msg;
50 }
51 
52 class GuiErrorHandler::Private
53 {
54  public:
55  Private( QWidget *widget )
56  : mWidget( widget )
57  {
58  }
59 
60  QWidget *mWidget;
61 };
62 
63 GuiErrorHandler::GuiErrorHandler( QWidget *widget )
64  : d( new Private( widget ) )
65 {
66 }
67 
68 GuiErrorHandler::~GuiErrorHandler()
69 {
70  delete d;
71 }
72 
73 void GuiErrorHandler::error( const QString &msg )
74 {
75  if ( qApp ) {
76  KMessageBox::error( d->mWidget, msg );
77  }
78 }
KABC::ConsoleErrorHandler::error
virtual void error(const QString &msg)
Show error message.
Definition: errorhandler.cpp:46
KABC::ConsoleErrorHandler::ConsoleErrorHandler
ConsoleErrorHandler()
Create an error handler for console output.
Definition: errorhandler.cpp:37
KABC::GuiErrorHandler::error
virtual void error(const QString &msg)
Show error message.
Definition: errorhandler.cpp:73
KABC::GuiErrorHandler::GuiErrorHandler
GuiErrorHandler(QWidget *parent=0)
Create error handler.
Definition: errorhandler.cpp:63
KABC::GuiErrorHandler::~GuiErrorHandler
virtual ~GuiErrorHandler()
Destroys the handler instance.
Definition: errorhandler.cpp:68
KABC::ConsoleErrorHandler::~ConsoleErrorHandler
virtual ~ConsoleErrorHandler()
Destroys the handler instance.
Definition: errorhandler.cpp:42
KABC::ErrorHandler::~ErrorHandler
virtual ~ErrorHandler()
Destroys the handler instance.
Definition: errorhandler.cpp:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:01:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kabc

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal