ARC Graphical Clients: /home/jonas/Development/arc-gui-clients/src/arcstat-ui/arcjobcontroller.h Source File

- Main Page
- Classes
- Files

- File List

# /home/jonas/Development/arc-gui-clients/src/arcstat-ui/arcjobcontroller.h

    00001 #ifndef ARCJOBCONTROLLER_H
    00002 #define ARCJOBCONTROLLER_H
    00003
    00004 #include <QTabWidget>
    00005 #include <QTableWidget>
    00006 #include <QStringList>
    00007 #include <QTextEdit>
    00008 #include <QFutureWatcher>
    00009 #include <QHash>
    00010 #include <QSet>
    00011 #include <QTableWidgetItem>
    00012
    00013 #include "arc-gui-config.h"
    00014
    00015 #include <arc/UserConfig.h>
    00016 #if ARC_VERSION_MAJOR >= 3
    00017 #include <arc/compute/Job.h>
    00018 #include <arc/compute/JobSupervisor.h>
    00019 #else
    00020 #include <arc/client/Job.h>
    00021 #include <arc/client/JobSupervisor.h>
    00022 #endif
    00023
    00024 #include "JmBase.h"
    00025
    00026 class ArcJobController : public QObject
    00027 {
    00028     Q_OBJECT
    00029 private:
    00030
    00031     QFutureWatcher<void> m_queryJobStatusWatcher;
    00032     QFutureWatcher<void> m_downloadJobsWatcher;
    00033     QFutureWatcher<void> m_killJobsWatcher;
    00034     QFutureWatcher<void> m_cleanJobsWatcher;
    00035     QFutureWatcher<void> m_resubmitJobsWatcher;
    00036     QFutureWatcher<void> m_queryAllJobListStatusWatcher;
    00037     QTableWidget* m_jobTable;
    00038     QTableWidget* m_jobListTable;
    00039
    00040     Arc::JobSupervisor* m_jobSupervisor;
    00041     std::list<Arc::Job> m_arcJobList;
    00042     Arc::UserConfig m_userConfig;
    00043     std::list<std::string> m_selectedJobIds;
    00044     std::list<Arc::Job> m_selectedJobList;
    00045
    00046     QList<JmJobList*> m_jmJobLists;
    00047     JmJobList* m_currentJmJobList;
    00048     QSet<int> m_jobSelectionIndex;
    00049     int m_currentJobListIndex;
    00050
    00051     QString m_downloadDir;
    00052     Arc::LogStream logDest;
    00053     void updateJobList();
    00054     void updateJobTable();
    00055
    00056 public:
    00057     ArcJobController();
    00058     virtual ~ArcJobController();
    00059
    00060     void setup();
    00061
    00062     void setJobTable(QTableWidget* tableWidget);
    00063     void setJobListTable(QTableWidget* tableWidget);
    00064     void setStatusOutput(QTextEdit* statusOutput);
    00065
    00066     void setDownloadDir(const QString& downloadDir);
    00067     void setCurrentJobList(int idx);
    00068
    00069     void newJobList(const QString& jobListName);
    00070     void openJobList(const QString& jobListName);
    00071     void removeSelectedJobList();
    00072     void queryJobStatus(JmJobList* jobList);
    00073     void queryJobStatus();
    00074     void queryAllJobListStatus();
    00075     void cleanJobs();
    00076     void killJobs();
    00077     void getJobs();
    00078     void resubmitJobs();
    00079     void selectAllJobs();
    00080     void clearSelection();
    00081
    00082     void openSessionDir();
    00083
    00084     void saveState();
    00085     void loadState();
    00086
    00087     void startQueryJobStatus();
    00088     void startQueryAllJobListStatus();
    00089     void startDownloadJobs();
    00090     void startKillJobs();
    00091     void startCleanJobs();
    00092     void startResubmitJobs();
    00093
    00094 private Q_SLOTS:
    00095     void queryJobStatusFinished();
    00096     void queryAllJobListStatusFinished();
    00097     void downloadJobsFinished();
    00098     void killJobsFinished();
    00099     void cleanJobsFinished();
    00100     void resubmitJobsFinished();
    00101     void jobTableSelectionChanged();
    00102     void jobListSelectionChanged();
    00103
    00104 Q_SIGNALS:
    00105     void onQueryJobStatusDone();
    00106     void onDownloadJobsDone();
    00107     void onKillJobsDone();
    00108     void onCleanJobsDone();
    00109     void onResubmitJobsDone();
    00110     void onQueryAllJobListStatusDone();
    00111 };
    00112
    00113 #endif // ARCJOBCONTROLLER_H

All Classes Functions Variables