1 // Copyright (C) 2009-2012 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _BL_GENERICGUI_HXX_
21 #define _BL_GENERICGUI_HXX_
25 #include "BL_GenericGuiDefines.hxx"
27 #include "BL_Traces.hxx"
29 #include "BL_SALOMEServices.hxx"
31 #include "BL_MainWindows_Wrap.hxx"
33 #include "BL_QModelManager.hxx"
34 #include "BL_JobsManager_QT.hxx"
35 #include "BL_JobsTable.hxx"
36 #include "BL_JobTab.hxx"
37 #include "BL_Buttons.hxx"
38 #include "BL_Summary.hxx"
39 #include "JM_ResourceCatalog.hxx"
43 class BL_GenericGui_EXPORT GenericGui: public QObject
48 GenericGui(BL::MainWindows_Wrap * wrapper);
49 virtual ~GenericGui();
51 void createDockWidgets();
52 void createCentralWidget();
54 void showDockWidgets(bool isVisible);
58 void delete_job_internal();
60 void deleteDockWidget();
61 void delete_job_external(const QString & name);
63 void reset_job_selection();
68 void edit_clone_job();
74 void get_results_job();
75 void job_selected(const QModelIndex & index);
76 void job_activated(const QModelIndex & index);
77 void job_state_changed(const QString & name);
78 void updateButtonsStates();
79 void updateButtonsStatesSingleSelection();
82 BL::JobTab * _job_tab;
83 BL::JobsTable * _jobs_table;
86 BL::MainWindows_Wrap * _wrapper;
88 BL::SALOMEServices * _salome_services;
90 QMainWindow * _dock_parent;
91 QMainWindow * _tab_parent;
92 QDockWidget * _dw_summary;
93 QDockWidget * _dw_resource_catalog;
95 BL::Buttons * _buttons;
96 BL::Summary * _summary;
98 QAction * _create_job_action;
99 QAction * _edit_clone_job_action;
100 QAction * _start_job_action;
101 QAction * _restart_job_action;
102 QAction * _delete_job_action;
103 QAction * _stop_job_action;
104 QAction * _get_results_job_action;
105 QAction * _refresh_job_action;
107 BL::JobsManager_QT * _jobs_manager;
108 BL::QModelManager * _model_manager;
109 QStandardItemModel * _model;
110 JM::ResourceCatalog * _resource_catalog;
112 QString _job_name_selected;