Disable clipboardsharing in view only mode.
[kdenetwork.git] / kget / core / transfergroupscheduler.h
bloba38fab3c71554edf02b89b9677c3981b2f9ba148
1 /* This file is part of the KDE project
3 Copyright (C) 2008 Lukas Appelhans <l.appelhans@gmx.de>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9 */
11 #ifndef TRANSFERGROUPSCHEDULER_H
12 #define TRANSFERGROUPSCHEDULER_H
14 #include "core/scheduler.h"
16 /**
17 * @brief TransferGroupScheduler class: what handle all the transfers in kget.
19 * This class handles all transfers of KGet, it is a modified Scheduler
23 class TransferGroupScheduler : public Scheduler
25 Q_OBJECT
27 public:
28 TransferGroupScheduler();
29 ~TransferGroupScheduler();
31 //JobQueue notifications
32 virtual void jobQueueChangedEvent(JobQueue * queue, JobQueue::Status status);
33 virtual void jobQueueMovedJobEvent(JobQueue * queue, Job * job);
34 virtual void jobQueueAddedJobEvent(JobQueue * queue, Job * job);
35 virtual void jobQueueRemovedJobEvent(JobQueue * queue, Job * job);
37 //Job notifications
38 virtual void jobChangedEvent(Job * job, Job::Status status);
39 virtual void jobChangedEvent(Job * job, Job::Policy status);
41 /**
42 * Calculates the whole SpeedLimits
44 void calculateSpeedLimits();
46 /**
47 * Calculates the DownloadLimits
49 void calculateDownloadLimit();
51 /**
52 * Calculates the DownloadLimits
54 void calculateUploadLimit();
56 /**
57 * Sets a download limit to the scheduler
58 * @param limit the download limit
60 void setDownloadLimit(int limit);
62 /**
63 * @return the transfergroupschedulers download limit
65 int downloadLimit() const {return m_downloadLimit;}
67 /**
68 * Sets a upload limit to the scheduler
69 * @param limit the upload limit
71 void setUploadLimit(int limit);
73 /**
74 * @return the transfergroupschedulers upload limit
76 int uploadLimit() const {return m_uploadLimit;}
78 private:
79 int m_downloadLimit;
80 int m_uploadLimit;
83 #endif