#ifndef HYDROGUI_PROFILEINTERPOLATEDLG_H
#define HYDROGUI_PROFILEINTERPOLATEDLG_H
-#include "HYDROGUI_InputPanel.h"
+#include "HYDROGUI_ViewerDlg.h"
+
+#include "HYDROGUI_ObjComboBox.h"
#include <AIS_InteractiveContext.hxx>
-class CurveCreator_Widget;
-class CurveCreator_ICurve;
-class OCCViewer_ViewManager;
-class SUIT_ViewWindow;
-class QGroupBox;
+#include <QSet>
+
+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
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