Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/yacs.git] / src / genericgui / FormContainer.hxx
1 // Copyright (C) 2006-2012  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 _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   void updateResource(const std::string &resource);
49
50 public:
51   static bool _checked;
52
53 public slots:
54   void on_tb_container_toggled(bool checked);
55   void on_ch_advance_stateChanged(int state);
56   void onModifyName(const QString &text);
57   void onModifyResource(const QString &text);
58   void onModifyPolicy(const QString &text);
59   void onModifyType(const QString &text);
60   void onModifyWorkDir(const QString &text);
61   void onModifyContName(const QString &text);
62   void onModifyOS(const QString &text);
63   void onModifyParLib(const QString &text);
64   void onModifyIsMPI(bool isMpi);
65   void onModifyMem(const QString &text);
66   void onModifyClock(const QString &text);
67   void onModifyNodes(const QString &text);
68   void onModifyProcs(const QString &text);
69   void onModifyCompos(const QString &text);
70   void onModifyProcPar(const QString &text);
71   void onModifyResourceName(const QString &text);
72   void onModifyHostName(const QString &text);
73   void onModifyProcRes(const QString &text);
74   void onModifyCompoList(const QString &text);
75   void onModifyResourceList(const QString &text);
76
77
78 protected:
79   bool _advanced;
80   YACS::ENGINE::Container *_container;
81   std::map<std::string, std::string> _properties;
82
83 private:
84 };
85
86 #endif