Salome HOME
Checkbox 'Resource can launch batch jobs' is checked by default (EDF issue #2771)
[modules/jobmanager.git] / src / genericgui / JM_ResourceCatalog.hxx
1 // Copyright (C) 2009-2013  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.
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 _JM_RESOURCECATALOG_HXX_
21 #define _JM_RESOURCECATALOG_HXX_
22
23 #include <QtGui>
24
25 #include "BL_SALOMEServices.hxx"
26
27 #include <string>
28 #include <list>
29
30 namespace JM 
31 {
32   class ResourceCatalog: public QWidget
33   {
34     Q_OBJECT
35
36     public:
37       ResourceCatalog(QWidget *parent, BL::SALOMEServices * salome_services, bool batch_only);
38       virtual ~ResourceCatalog();
39
40       void get_infos();
41
42       QListWidget * getQListWidget();
43
44     public slots:
45       void refresh_resource_list();
46       void item_choosed(QListWidgetItem * item);
47       void buttons_management();
48       void show_button();
49       void edit_button();
50       void add_button();
51       void remove_button();
52
53     protected:
54       QWidget* _parent;
55       BL::SALOMEServices * _salome_services;
56
57       QPushButton * _refresh_button;
58       QPushButton * _show_button;
59       QPushButton * _edit_button;
60       QPushButton * _add_button;
61       QPushButton * _remove_button;
62       QListWidget * _resource_files_list;
63       bool _batch_only;
64   };
65 }
66
67 #endif
68
69