Salome HOME
Corrections to solve 0022648: [CEA 1217]:
[modules/yacs.git] / src / genericgui / FormContainer.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 _FORMCONTAINER_HXX_
21 #define _FORMCONTAINER_HXX_
22
23 #include "ui_FormContainer.h"
24
25 #include <QIcon>
26 #include <map>
27 #include <string>
28
29 namespace YACS
30 {
31   namespace ENGINE
32   {
33     class Container;
34   }
35 }
36
37 class FormContainer: public QWidget, public Ui::fm_container
38 {
39   Q_OBJECT
40
41 public:
42   FormContainer(QWidget *parent = 0);
43   virtual ~FormContainer();
44
45   void FillPanel(YACS::ENGINE::Container *container);
46   virtual void onModified();
47   virtual bool onApply();
48   virtual void onCancel();
49   void updateResource(const std::string &resource);
50
51 public:
52   static bool _checked;
53
54 public slots:
55   void on_tb_container_toggled(bool checked);
56   void on_ch_advance_stateChanged(int state);
57   void onModifyName(const QString &text);
58   void onModifyResource(const QString &text);
59   void onModifyPolicy(const QString &text);
60   void onModifyType(const QString &text);
61   void onModifyWorkDir(const QString &text);
62   void onModifyContName(const QString &text);
63   void onModifyOS(const QString &text);
64   void onModifyParLib(const QString &text);
65   void onModifyIsMPI(bool isMpi);
66   void onModifyMem(const QString &text);
67   void onModifyClock(const QString &text);
68   void onModifyNodes(const QString &text);
69   void onModifyProcs(const QString &text);
70   void onModifyCompos(const QString &text);
71   void onModifyProcPar(const QString &text);
72   void onModifyResourceName(const QString &text);
73   void onModifyHostName(const QString &text);
74   void onModifyProcRes(const QString &text);
75   void onModifyCompoList(const QString &text);
76   void onModifyResourceList(const QString &text);
77
78
79 protected:
80   bool _advanced;
81   YACS::ENGINE::Container *_container;
82   std::map<std::string, std::string> _properties;
83
84 private:
85 };
86
87 #endif