Salome HOME
Merge branch 'BR_H2018_3' into BR_2018_V8_5
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_StreamDlg.h
1 // Copyright (C) 2014-2015  EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
6 //
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10 // Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 #ifndef HYDROGUI_StreamDlg_H
20 #define HYDROGUI_StreamDlg_H
21
22 #include "HYDROGUI_InputPanel.h"
23 #include <HYDROData_Entity.h>
24
25 class HYDROGUI_OrderedListWidget;
26
27 class QComboBox;
28 class QGroupBox;
29 class QLineEdit;
30 class QListWidget;
31 class QPushButton;
32 class QDoubleSpinBox;
33 class QTextEdit;
34 class QRadioButton;
35 class QSpinBox;
36 class QLabel;
37
38 class HYDROGUI_StreamDlg : public HYDROGUI_InputPanel
39 {
40   Q_OBJECT
41
42 public:
43   HYDROGUI_StreamDlg( HYDROGUI_Module* theModule, const QString& theTitle );
44   virtual ~HYDROGUI_StreamDlg();
45
46   void                       reset();
47
48   void                       setObjectName( const QString& theName );
49   QString                    getObjectName() const;
50
51   void                       setAxisNames( const QStringList& theAxises );
52   void                       setLeftBankNames( const QStringList& theAxises );
53   void                       setRightBankNames( const QStringList& theAxises );
54
55   void                       setAxisName( const QString& thePolyline );
56   void                       setLeftBankName( const QString& theName );
57   void                       setRightBankName( const QString& theName );
58
59   QString                    getAxisName() const;
60   QString                    getLeftBankName() const;
61   QString                    getRightBankName() const;
62
63   void                       setProfiles( const QStringList& theProfiles );
64
65   void                       setDDZ( const double );
66   double                     getDDZ() const;
67
68   void                       setSpatialStep( const double );
69   double                     getSpatialStep() const;
70
71   void                       setNbProfilePoints( const int );
72   int                        getNbProfilePoints() const;  
73
74   void                       addWarning( const QString& theWarnMess );
75   void                       clearWarnings();
76
77   QList<Handle(HYDROData_Entity)> getProfiles();
78
79   void                       setBackgroundColorForProfileList (int theInd, QColor theColor);
80   void                       setBackgroundColorForProfileList (QString name, QColor theColor);
81   QColor                     getBackgroundColorForProfileList (int theInd) const;
82   void                       clearAllBackgroundColorsForProfileList ();
83
84   int                        getMode();
85   void                       setMode(int mode);
86
87
88 signals:
89   void                       AddProfiles();
90   void                       RemoveProfiles( const QStringList& );
91   void                       AxisChanged( const QString& );
92   void                       DDZValueChanged (double d);
93   void                       SSValueChanged (double d);
94
95   void                       LeftBankChanged( const QString& ) ;
96   void                       RightBankChanged( const QString& );
97   void                       ProfilePointsChanged (int);
98   void                       ModeChanged(bool);
99
100 private slots:
101   void                       onRemoveProfiles();
102   void                       onDDZValueChanged(double d);
103   void                       onSSValueChanged(double d);
104   void                       ModeChangedDlg(bool);
105
106
107
108 private:
109   QGroupBox*                  myObjectNameGroup;
110   QLineEdit*                  myObjectName;
111   QDoubleSpinBox*             myDDZ;
112   QDoubleSpinBox*             mySpatialStep;
113   QSpinBox*                   myProfilePoints;
114
115   QComboBox*                  myAxes;
116
117   QComboBox*                  myLeftBanks;
118   QComboBox*                  myRightBanks;
119
120   HYDROGUI_OrderedListWidget* myProfiles;
121   QPushButton*                myRemoveButton;
122   QPushButton*                myAddButton;
123   QTextEdit*                  myWarnText;
124   QRadioButton*               myModeButton;
125   QRadioButton*               myModeButton2;
126
127   QLabel*                     myDDZLabel;
128   QLabel*                     myLeftBanksLabel;
129   QLabel*                     myRightBanksLabel;
130   QLabel*                     myProfilePointsLabel;
131
132 };
133
134 #endif