KDEUI
kstatusbarjobtracker.h
Go to the documentation of this file.
00001 /* This file is part of the KDE project 00002 Copyright (C) 2000 Matej Koss <koss@miesto.sk> 00003 Copyright (C) 2007 Kevin Ottens <ervin@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library 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 GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 00019 */ 00020 00021 #ifndef KSTATUSBARJOBTRACKER_H 00022 #define KSTATUSBARJOBTRACKER_H 00023 00024 #include <kabstractwidgetjobtracker.h> 00025 00030 class KDEUI_EXPORT KStatusBarJobTracker : public KAbstractWidgetJobTracker 00031 { 00032 Q_OBJECT 00033 00034 public: 00035 enum StatusBarMode 00036 { 00037 NoInformation = 0x0000, 00038 LabelOnly = 0x0001, 00039 ProgressOnly = 0x0002 00040 }; 00041 00042 Q_DECLARE_FLAGS(StatusBarModes, StatusBarMode) 00043 00044 00050 explicit KStatusBarJobTracker(QWidget *parent = 0, bool button = true); 00051 00055 virtual ~KStatusBarJobTracker(); 00056 00062 virtual void registerJob(KJob *job); 00063 00069 virtual void unregisterJob(KJob *job); 00070 00076 virtual QWidget *widget(KJob *job); 00077 00084 void setStatusBarMode(StatusBarModes statusBarMode); 00085 00086 public Q_SLOTS: 00090 virtual void description(KJob *job, const QString &title, 00091 const QPair<QString, QString> &field1, 00092 const QPair<QString, QString> &field2); 00093 virtual void totalAmount(KJob *job, KJob::Unit unit, qulonglong amount); 00094 virtual void percent(KJob *job, unsigned long percent); 00095 virtual void speed(KJob *job, unsigned long value); 00096 virtual void slotClean(KJob *job); 00097 00098 private: 00099 class Private; 00100 Private *const d; 00101 }; 00102 00103 Q_DECLARE_OPERATORS_FOR_FLAGS(KStatusBarJobTracker::StatusBarModes) 00104 00105 #endif
KDE 4.6 API Reference