Plasma
jobaction.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "jobaction.h"
00020 #include "kuiserverengine.h"
00021
00022 #include <kdebug.h>
00023
00024 void JobAction::start()
00025 {
00026 kDebug() << "Trying to perform the action" << operationName();
00027
00028 if (!m_jobView) {
00029 setErrorText(i18nc("%1 is the subject (can be anything) upon which the job is performed",
00030 "The JobView for %1 can't be found", destination()));
00031 setError(-1);
00032 emitResult();
00033 return;
00034 }
00035
00036
00037 if (operationName() == "resume") {
00038 emit m_jobView->resumeRequested();
00039 } else if (operationName() == "suspend") {
00040 emit m_jobView->suspendRequested();
00041 } else if (operationName() == "stop") {
00042 emit m_jobView->cancelRequested();
00043 }
00044
00045 emitResult();
00046 }
00047
00048 #include "jobaction.moc"
00049