Salome HOME
Merge branch 'BR_LAND_COVER_MAP' into BR_quadtree
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ProfileInterpolateDlg.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_PROFILEINTERPOLATEDLG_H
20 #define HYDROGUI_PROFILEINTERPOLATEDLG_H
21
22 #include "HYDROGUI_ViewerDlg.h"
23
24 #include "HYDROGUI_ObjComboBox.h"
25
26 #include <AIS_InteractiveContext.hxx>
27
28 #include <QSet>
29
30 class QSpinBox;
31 class QLineEdit;
32 class QComboBox;
33 class QTextEdit;
34
35 class HYDROGUI_ProfileInterpolateDlg : public HYDROGUI_ViewerDlg, public HYDROGUI_ObjComboBoxFilter
36 {
37   Q_OBJECT
38
39 public:
40   HYDROGUI_ProfileInterpolateDlg( HYDROGUI_Module* theModule, const QString& theTitle );
41   virtual ~HYDROGUI_ProfileInterpolateDlg();
42
43   QString                interpolator() const;
44   void                   setInterpolator( const QString& );
45   void                   setInterpolators( const QStringList& );
46
47   QString                interpolatorDescription() const;
48   void                   setInterpolatorDescription( const QString& );
49
50   QString                interpolatorParameters() const;
51   void                   setInterpolatorParameters( const QString& );
52
53   QString                river() const;
54   void                   setRiver( const QString& );
55
56   QString                profileStart() const;
57   void                   setProfileStart( const QString& );
58
59   QString                profileFinish() const;
60   void                   setProfileFinish( const QString& );
61
62   int                    profileNumber() const;
63   void                   setProfileNumber( int );
64
65   void                   reset();
66
67   virtual bool           isActive( HYDROGUI_ObjComboBox* ) const;
68   virtual bool           isOk( const Handle(HYDROData_Entity)& ) const;
69
70 signals:
71   void                   riverChanged( const QString& );
72   void                   interpolatorChanged( const QString& );
73   void                   interpolatorParametersChanged( const QString& );
74
75   void                   profileNumberChanged( int );
76   void                   profileStartChanged( const QString& );
77   void                   profileFinishChanged( const QString& );
78
79 private slots:
80   void                   onParametersEditingFinished();
81   void                   onRiverChanged( const QString& );
82   void                   onInterpolatorIndexChanged( int );
83   void                   onProfileChanged( const QString& );
84
85 private:
86   void                   updateState();
87   HYDROGUI_ObjComboBox*  activeProfile() const;
88
89 private:
90   typedef QSet<QString> RiverProfiles;
91
92 private:
93   HYDROGUI_ObjComboBox*  myRiver;
94   QComboBox*             myIntrp;
95   QTextEdit*             myDescr;
96   QLineEdit*             myParams;
97
98   HYDROGUI_ObjComboBox*  myProfileStart;
99   HYDROGUI_ObjComboBox*  myProfileFinish;
100   QSpinBox*              myProfileNumber;
101
102   RiverProfiles          myRiverProfiles;
103 };
104
105 #endif