Salome HOME
583f54c4643e46ffe3dad86e12df1f382f361257
[modules/yacs.git] / src / genericgui / ListJobs_GUI.hxx
1 // Copyright (C) 2006-2014  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef LISTJOBS_GUI_H
21 #define LISTJOBS_GUI_H
22
23 #include <QtGui/QtGui>
24 #include "SALOME_NamingService.hxx"
25 #include "SALOME_Launcher.hh"
26
27 // Kind of column
28 // --------------
29
30 #define type_job   0
31 #define type_state 1
32 #define type_res   2
33 #define type_id    3
34
35 // Class for the dialog box
36 // ------------------------
37
38
39 namespace YACS
40 {
41
42   namespace ENGINE
43   {
44     class Proc;
45   }
46   namespace HMI
47   {
48     class GenericGui;
49
50     class BatchJobsListDialog: public QWidget {
51       Q_OBJECT
52
53     public:
54       BatchJobsListDialog(QString title,GenericGui* genericGui);
55       virtual ~BatchJobsListDialog();
56       
57     private:
58       QWidget* build_buttons();
59       void getSalomeLauncher();
60       void filterJobFile();
61       void filterDumpStateFile();
62
63     private slots:
64       void userOK();
65       void userCancel();
66       void userCell(QTableWidgetItem* cell);
67       void build_table();
68       void get_dump_file();
69
70     protected:
71       QTimer* _timer1, *_timer2;
72       QPushButton* _ok;
73       QTableWidget* _table;
74       QString _jobFile;
75       QString _dumpStateFile;
76       QString _filteredJobFile;
77       QString _filteredDumpStateFile;
78       QString _hostname;
79       long _id;
80       Engines::SalomeLauncher_var _salome_launcher;
81       GenericGui* _genericGui;
82       YACS::ENGINE::Proc* _proc;
83    };
84   }
85 }
86
87 #endif // LISTJOBS_GUI_H