X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ProfileInterpolateDlg.h;h=e73b9d6e1977e5263e0a2488a244f77eaae7c85b;hb=80b3ef265c1b8564a52097094156256956017ae1;hp=a20a92bbd4e306787744f59b1b36375e0bb8fb30;hpb=065b0e007bb1d8d2b4962cfea24d3d476522e028;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ProfileInterpolateDlg.h b/src/HYDROGUI/HYDROGUI_ProfileInterpolateDlg.h index a20a92bb..e73b9d6e 100644 --- a/src/HYDROGUI/HYDROGUI_ProfileInterpolateDlg.h +++ b/src/HYDROGUI/HYDROGUI_ProfileInterpolateDlg.h @@ -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 @@ -23,19 +19,20 @@ #ifndef HYDROGUI_PROFILEINTERPOLATEDLG_H #define HYDROGUI_PROFILEINTERPOLATEDLG_H -#include "HYDROGUI_InputPanel.h" +#include "HYDROGUI_ViewerDlg.h" + +#include "HYDROGUI_ObjComboBox.h" #include -class CurveCreator_Widget; -class CurveCreator_ICurve; -class OCCViewer_ViewManager; -class SUIT_ViewWindow; -class QGroupBox; +#include + +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 +40,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& ); - void setProfileName( const QString& theName ); - QString getProfileName() const; - - void setProfile( CurveCreator_ICurve* theProfile ); + QString interpolatorDescription() const; + void setInterpolatorDescription( const QString& ); - void reset(); + QString interpolatorParameters() const; + void setInterpolatorParameters( const QString& ); - QList getSelectedSections(); + QString river() const; + void setRiver( const QString& ); - void deleteSelected(); - bool deleteEnabled(); + QString profileStart() const; + void setProfileStart( const QString& ); -protected: - virtual bool eventFilter( QObject*, QEvent* ); + QString profileFinish() const; + void setProfileFinish( const QString& ); -protected slots: - void processStartedSubOperation( QWidget*, bool ); - void processFinishedSubOperation( QWidget* ); + int profileNumber() const; + void setProfileNumber( int ); - void onMouseMove( SUIT_ViewWindow*, QMouseEvent* ); + void reset(); + + 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: + void updateState(); + HYDROGUI_ObjComboBox* activeProfile() const; + private: - QLineEdit* myName; - CurveCreator_Widget* myEditorWidget; - QGroupBox* myAddElementBox; - OCCViewer_ViewManager* myViewManager; - QLabel* myCoordLabel; + typedef QSet RiverProfiles; + +private: + HYDROGUI_ObjComboBox* myRiver; + QComboBox* myIntrp; + QTextEdit* myDescr; + QLineEdit* myParams; + + HYDROGUI_ObjComboBox* myProfileStart; + HYDROGUI_ObjComboBox* myProfileFinish; + QSpinBox* myProfileNumber; + + RiverProfiles myRiverProfiles; }; #endif