NCL Composer  0.1.5
 All Classes Functions Variables Pages
RunRemoteGingaVM.h
1 /* Copyright (c) 2011-2012 Telemidia/PUC-Rio.
2  * All rights reserved. This program and the accompanying materials
3  * are made available under the terms of the Eclipse Public License v1.0
4  * which accompanies this distribution, and is available at
5  * http://www.eclipse.org/legal/epl-v10.html
6  *
7  * Contributors:
8  * Telemidia/PUC-Rio - initial API and implementation
9  */
10 #ifndef RUNREMOTEGINGAVM_H
11 #define RUNREMOTEGINGAVM_H
12 
13 #include <QThread>
14 #include <QProgressBar>
15 #include <core/model/Project.h>
16 
17 #include "SimpleSSHClient.h"
18 
19 class RunRemoteGingaVMAction : public QObject
20 {
21  Q_OBJECT
22 
23 private:
24  Project *project;
25 
32  QStringList filesToSendToGingaVM(Project *project, QString nclLocalPath);
33 
34  bool sendFilesToGingaVM(SimpleSSHClient &sshclient, QString baseLocalPath,
35  QString baseRemotePath, QStringList filesToSend);
36 
37  bool fixSrcsFromNCLFile(const QString &nclLocalPath);
38 
39  bool mustStop;
40 
41 signals:
42  void finished();
43  void copyFinished();
44 
45  void startTask();
46  void taskDescription(QString);
47  void taskMaximumValue(int);
48  void taskValue(int);
49 
50 public slots:
51  void runCurrentProject();
52  void stopExecution();
53 
54 public:
55  void setCurrentProject(Project* project);
56 };
57 
58 class StopRemoteGingaVMAction : public QObject
59 {
60  Q_OBJECT
61 
62 public slots:
63  void stopRunningApplication();
64 
65 };
66 #endif // RUNREMOTEGINGAVM_H