]> SALOME platform Git repositories - modules/jobmanager.git/blob - src/genericgui/BL_Summary.hxx
Salome HOME
Update copyrights
[modules/jobmanager.git] / src / genericgui / BL_Summary.hxx
1 // Copyright (C) 2009-2019  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 _BL_SUMMARY_HXX_
21 #define _BL_SUMMARY_HXX_
22
23 #include "BL_JobsManager_QT.hxx"
24
25 #include <QWidget>
26
27 class QLabel;
28 class QModelIndex;
29 class QStandardItem;
30 class QStandardItemModel;
31
32 namespace BL 
33 {
34   class Summary: public QWidget
35   {
36     Q_OBJECT
37
38     public:
39       Summary(QWidget *parent, BL::JobsManager_QT * jobs_manager);
40       virtual ~Summary();
41
42       void setModel(QStandardItemModel * model);
43
44       void updateJobs();
45
46     public slots:
47       void rowsInserted(const QModelIndex & parent, int start, int end);
48       void rowsRemoved(const QModelIndex & parent, int start, int end);
49       void itemChanged(QStandardItem * item);
50
51     protected:
52       QWidget* _parent;
53       QStandardItemModel * _model;
54
55       BL::JobsManager_QT * _jobs_manager;
56       QLabel * _total_line;
57       QLabel * _created_line;
58       QLabel * _queued_line;
59       QLabel * _running_line;
60       QLabel * _finished_line;
61   };
62 }
63
64 #endif
65