Salome HOME
lost icon for dummy3d
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ProfileInterpolateDlg.h
index a20a92bbd4e306787744f59b1b36375e0bb8fb30..12d52ff92f11a939835f625130dc8b40c74cb196 100644 (file)
@@ -1,12 +1,8 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  EDF-R&D
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #ifndef HYDROGUI_PROFILEINTERPOLATEDLG_H
 #define HYDROGUI_PROFILEINTERPOLATEDLG_H
 
-#include "HYDROGUI_InputPanel.h"
+#include "HYDROGUI_ViewerDlg.h"
+#include "HYDROGUI_ObjComboBox.h"
+#include <QSet>
 
-#include <AIS_InteractiveContext.hxx>
-
-class CurveCreator_Widget;
-class CurveCreator_ICurve;
-class OCCViewer_ViewManager;
-class SUIT_ViewWindow;
-class QGroupBox;
+class QSpinBox;
 class QLineEdit;
-class QLabel;
+class QComboBox;
+class QTextEdit;
 
-class HYDROGUI_ProfileInterpolateDlg : public HYDROGUI_InputPanel
+class HYDROGUI_ProfileInterpolateDlg : public HYDROGUI_ViewerDlg, public HYDROGUI_ObjComboBoxFilter
 {
   Q_OBJECT
 
@@ -43,41 +36,66 @@ public:
   HYDROGUI_ProfileInterpolateDlg( HYDROGUI_Module* theModule, const QString& theTitle );
   virtual ~HYDROGUI_ProfileInterpolateDlg();
 
-  Handle(AIS_InteractiveContext) getAISContext();
+  QString                interpolator() const;
+  void                   setInterpolator( const QString& );
+  void                   setInterpolators( const QStringList& );
+
+  QString                interpolatorDescription() const;
+  void                   setInterpolatorDescription( const QString& );
 
-  void  setProfileName( const QString& theName );
-  QString getProfileName() const;
-       
-  void  setProfile( CurveCreator_ICurve* theProfile );
+  QString                interpolatorParameters() const;
+  void                   setInterpolatorParameters( const QString& );
 
-  void  reset();
+  QString                river() const;
+  void                   setRiver( const QString& );
 
-  QList<int> getSelectedSections();
+  QString                profileStart() const;
+  void                   setProfileStart( const QString& );
 
-  void  deleteSelected();
-  bool  deleteEnabled();
+  QString                profileFinish() const;
+  void                   setProfileFinish( const QString& );
 
-protected:
-  virtual bool eventFilter( QObject*, QEvent* );
+  int                    profileNumber() const;
+  void                   setProfileNumber( int );
 
-protected slots:
-  void processStartedSubOperation( QWidget*, bool );
-  void processFinishedSubOperation( QWidget* );
+  void                   reset();
 
-  void onMouseMove( SUIT_ViewWindow*, QMouseEvent* );
+  virtual bool           isActive( HYDROGUI_ObjComboBox* ) const;
+  virtual bool           isOk( const Handle(HYDROData_Entity)& ) const;
 
 signals:
-  void                  createPreview( QString );
-  void                  selectionChanged();
-  void                  widgetCreated(QWidget*);
-  void                  subOperationStarted(QWidget*);
-  void                  subOperationFinished(QWidget*);
+  void                   riverChanged( const QString& );
+  void                   interpolatorChanged( const QString& );
+  void                   interpolatorParametersChanged( const QString& );
+
+  void                   profileNumberChanged( int );
+  void                   profileStartChanged( const QString& );
+  void                   profileFinishChanged( const QString& );
+
+private slots:
+  void                   onParametersEditingFinished();
+  void                   onRiverChanged( const QString& );
+  void                   onInterpolatorIndexChanged( int );
+  void                   onProfileChanged( const QString& );
+
 private:
-  QLineEdit*             myName;
-  CurveCreator_Widget*   myEditorWidget;
-  QGroupBox*             myAddElementBox;
-  OCCViewer_ViewManager* myViewManager;
-  QLabel*                myCoordLabel;
+  void                   updateState();
+  HYDROGUI_ObjComboBox*  activeProfile() const;
+
+private:
+  typedef QSet<QString> RiverProfiles;
+
+private:
+  HYDROGUI_ObjComboBox*  myRiver;
+  QComboBox*             myIntrp;
+  QTextEdit*             myDescr;
+  QLineEdit*             myParams;
+
+  HYDROGUI_ObjComboBox*  myProfileStart;
+  HYDROGUI_ObjComboBox*  myProfileFinish;
+  QSpinBox*              myProfileNumber;
+
+  RiverProfiles          myRiverProfiles;
 };
 
 #endif