kget
dbusmodelobserver.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 00003 Copyright (C) 2007 by Javier Goday <jgoday@gmail.com> 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 */ 00010 00011 #ifndef DBUS_MODEL_OBSERVER_H 00012 #define DBUS_MODEL_OBSERVER_H 00013 00014 #include "dbustransfergroupobserver.h" 00015 #include "core/observer.h" 00016 00017 #include <QObject> 00018 #include <QVariant> 00019 #include <QList> 00020 00021 class DBusModelObserver : public QObject, public ModelObserver 00022 { 00023 Q_OBJECT 00024 public: 00025 DBusModelObserver(QObject *parent = 0); 00026 00027 void addedTransferGroupEvent(TransferGroupHandler *group); 00028 void removedTransferGroupEvent(TransferGroupHandler *group); 00029 00030 QVariantMap transfers() const; 00031 int transfersSpeed() const; 00032 00033 private slots: 00034 void addTransferHandler(TransferHandler *handler); 00035 void deleteTransferHandler(TransferHandler *handler); 00036 void slotTransferGroupChanged(TransferGroupHandler *handler); 00037 00038 private: 00039 QStringList getAttributesFromTransfer(TransferHandler *handler); 00040 00041 QVariantMap m_transfers; 00042 DBusTransferGroupObserver m_transferGroupObserver; 00043 QList<TransferGroupHandler *> m_transferGroupHandlers; 00044 int m_speed; 00045 }; 00046 00047 00048 #endif
KDE 4.0 API Reference