1 // Copyright (C) 2009-2015 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, or (at your option) any later version.
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_JOBSMANAGER_QT_HXX_
21 #define _BL_JOBSMANAGER_QT_HXX_
25 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
29 #include "BL_Traces.hxx"
30 #include "BL_JobsManager.hxx"
31 #include "BL_CreateJobWizard.hxx"
32 #include "BL_JobsManager.hxx"
33 #include "BL_QModelManager.hxx"
39 class JobManagerEvent : public QEvent
42 JobManagerEvent(const std::string & action_i,
43 const std::string & event_name_i,
44 const std::string & job_name_i,
45 const std::string & data_i);
46 virtual ~JobManagerEvent();
50 std::string event_name;
56 class JobsManager_QT: public QDockWidget,
57 public BL::JobsManager,
63 JobsManager_QT(QWidget * parent, BL::GenericGui * main_gui, BL::SALOMEServices * salome_services);
64 virtual ~JobsManager_QT();
66 void delete_job(QString job_name);
69 void edit_clone_job(const std::string & name);
70 void restart_job(const std::string & name);
72 virtual void sendEvent(const std::string & action,
73 const std::string & event_name,
74 const std::string & job_name,
75 const std::string & data);
76 bool event(QEvent * e);
78 void write_normal_text(const QString & text);
79 void write_error_text(const QString & text);
81 void set_model_manager(BL::QModelManager * model_manager);
84 void create_job_with_wizard(BL::CreateJobWizard & wizard);
88 void no_auto_refresh();
89 void ten_seconds_refresh();
90 void thirty_seconds_refresh();
91 void one_minute_refresh();
92 void five_minutes_refresh();
93 void thirty_minutes_refresh();
94 void one_hour_refresh();
95 void load_jobs_button();
96 void save_jobs_button();
99 void new_job_added(const QString & name);
100 void job_state_changed(const QString & name);
103 QPushButton * _load_jobs;
104 QPushButton * _save_jobs;
105 QPushButton * _auto_refresh_jobs;
108 BL::GenericGui * _main_gui;
109 BL::QModelManager * _model_manager;