1 // Copyright (C) 2016-2019 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
19 // Author : Anthony Geay (EDF R&D)
21 #ifndef __YDFXGUIHOSTPARAMETRIZER_HXX__
22 #define __YDFXGUIHOSTPARAMETRIZER_HXX__
24 #include "ydfxwidgetsExport.hxx"
32 class QDialogButtonBox;
34 class YACSEvalYFXWrap;
35 class YDFXGUIBatchInfo;
37 class YDFXGUIHostParametrizer : public QWidget
41 YDFXWIDGETS_EXPORT YDFXGUIHostParametrizer(QWidget *parent, YACSEvalYFXWrap *efx);
42 YDFXWIDGETS_EXPORT QDialogButtonBox *getDialogButtonBox() { return _buttonBox; }
43 YDFXWIDGETS_EXPORT void loadFromSettings(const QSettings& settings);
44 YDFXWIDGETS_EXPORT void learnSettings(QSettings& settings) const;
45 YDFXWIDGETS_EXPORT void applyToEFX();
46 YDFXWIDGETS_EXPORT QString getNameOfHost();
48 YDFXWIDGETS_EXPORT void changeMachine(const QString& newMachineSelected);
49 YDFXWIDGETS_EXPORT void clusterAdvParamStatusChanged(bool newStatus);
51 void readyForRunSignal(bool);
52 void interactivityChanged(bool);
54 YDFXWIDGETS_EXPORT static const char MACHINE[];
56 QComboBox *_hostSelector;
57 YDFXGUIBatchInfo *_clusterAdvInfo;
58 QDialogButtonBox *_buttonBox;
59 YACSEvalYFXWrap *_efx;
63 class YDFXGUIDurationValidator : public QValidator
66 YDFXWIDGETS_EXPORT YDFXGUIDurationValidator(QObject *parent):QValidator(parent) { }
67 YDFXWIDGETS_EXPORT QValidator::State validate(QString & input, int & pos) const;
70 class YACSEvalParamsForCluster;
72 class YDFXGUIBatchInfo : public QWidget
76 YDFXWIDGETS_EXPORT YDFXGUIBatchInfo(QWidget *parent, YACSEvalYFXWrap *efx);
77 YDFXWIDGETS_EXPORT void showEvent(QShowEvent *event);
78 YDFXWIDGETS_EXPORT bool isOK() const;
79 YDFXWIDGETS_EXPORT void loadFromSettings(const QSettings& settings);
80 YDFXWIDGETS_EXPORT void learnSettings(QSettings& settings) const;
81 YDFXWIDGETS_EXPORT void applyToParams(YACSEvalParamsForCluster& ps) const;
82 YDFXWIDGETS_EXPORT QString getNameOfHost();
84 YDFXWIDGETS_EXPORT void somethingChanged();
86 YDFXWIDGETS_EXPORT static const char NBPROCS[];
87 YDFXWIDGETS_EXPORT static const char REMOTEDIR[];
88 YDFXWIDGETS_EXPORT static const char LOCALDIR[];
89 YDFXWIDGETS_EXPORT static const char WCKEY[];
90 YDFXWIDGETS_EXPORT static const char MAXDUR[];
92 void statusOfEntryChanged(bool newStatus);
94 static QString NormalizeDuration(const QString& txt);
96 YACSEvalYFXWrap *_efx;
98 QLineEdit *_remoteDir;
101 QLineEdit *_maxDuration;