KDECore
kjobuidelegate.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2000 Stephan Kulow <coolo@kde.org> 00003 David Faure <faure@kde.org> 00004 Copyright (C) 2006 Kevin Ottens <ervin@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KJOBUIDELEGATE_H 00023 #define KJOBUIDELEGATE_H 00024 00025 #include <kdecore_export.h> 00026 #include <QtCore/QObject> 00027 00028 class KJob; 00029 00039 class KDECORE_EXPORT KJobUiDelegate : public QObject 00040 { 00041 Q_OBJECT 00042 00043 public: 00047 KJobUiDelegate(); 00048 00052 virtual ~KJobUiDelegate(); 00053 00054 private: 00060 bool setJob( KJob *job ); 00061 00062 protected: 00069 KJob *job(); 00070 00071 friend class KJob; 00072 00073 public: 00080 virtual void showErrorMessage(); 00081 00094 void setAutoErrorHandlingEnabled( bool enable ); 00095 00102 bool isAutoErrorHandlingEnabled() const; 00103 00116 void setAutoWarningHandlingEnabled( bool enable ); 00117 00124 bool isAutoWarningHandlingEnabled() const; 00125 00126 protected Q_SLOTS: 00127 virtual void slotWarning(KJob *job, const QString &plain, const QString &rich); 00128 00129 private: 00130 void connectJob(KJob *job); 00131 00132 Q_PRIVATE_SLOT(d, void _k_result(KJob*)) 00133 00134 class Private; 00135 Private * const d; 00136 }; 00137 00138 #endif // KJOBUIDELEGATE_H
KDE 4.6 API Reference