1 /* This file is part of the KDE project
3 Copyright (C) 2005 Dario Massarin <nekkar@libero.it>
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.
13 #include "core/jobqueue.h"
14 #include "core/scheduler.h"
18 Job::Job(JobQueue
* parent
, Scheduler
* scheduler
)
20 m_scheduler(scheduler
),
31 void Job::setStatus(Status jobStatus
)
33 if(jobStatus
== m_status
)
36 if(m_status
== Job::Delayed
)
38 //The previous status was Job::Delayed. We must stop all the timers
39 m_scheduler
->stopDelayTimer(this);
43 m_scheduler
->jobChangedEvent(this, m_status
);
46 void Job::setPolicy(Policy jobPolicy
)
48 if(jobPolicy
== m_policy
)
51 kDebug(5001) << "Job::setPolicy(" << jobPolicy
<< ")";
54 m_scheduler
->jobChangedEvent(this, m_policy
);