summaryrefslogtreecommitdiff
path: root/cad/plugins/NanoVision-1/src/JobManagement/GROMACS_JobMonitor.h
blob: 2205f59a4f2487d0563fa03772e4e772a6332662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright 2008 Nanorex, Inc.  See LICENSE file for details.

#ifndef GROMACS_JOBMONITOR_H
#define GROMACS_JOBMONITOR_H

#include <string>
using namespace std;

#include <QObject>
#include <QString>
#include <QCoreApplication>

#include "Nanorex/Utility/NXLogger.h"
using namespace Nanorex;

#include "JobMonitor.h"


/* CLASS: GROMACS_JobMonitor */
class GROMACS_JobMonitor : public JobMonitor {

	Q_OBJECT

	public:
		GROMACS_JobMonitor(const QString& initString);
		~GROMACS_JobMonitor();
		
		void run();
		static void CheckJobActive(const QString& pid, bool& stillRunning,
								   bool& monitorError);
		
	signals:
		void startedMonitoring(const QString& processType, const QString id,
							   const QString title);
		void jobFinished(const QString& id);
		void jobAborted(const QString& id);
	
	public slots:
		void abortJob();
		
	private:
		bool aborted;
		QMutex jobControlMutex;
};

#endif