X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_StricklerTableDlg.h;h=0fa872b2d18fd1e27e35e48b70b5af70031a28bd;hb=d6e19029f8b41f295db878e9aecf451c2edda4af;hp=fef70326d6f887f42ab82dee11f99874eee8ddb7;hpb=e0ed73f9fe23d646ae3b99ee4446098f10f3cb55;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_StricklerTableDlg.h b/src/HYDROGUI/HYDROGUI_StricklerTableDlg.h index fef70326..0fa872b2 100644 --- a/src/HYDROGUI/HYDROGUI_StricklerTableDlg.h +++ b/src/HYDROGUI/HYDROGUI_StricklerTableDlg.h @@ -27,67 +27,68 @@ class QGroupBox; class QLineEdit; class QToolButton; class QTableWidget; +class QtxFilePath; class HYDROGUI_StricklerTableDlg : public HYDROGUI_InputPanel { - Q_OBJECT + Q_OBJECT public: - struct StricklerCoefficient - { - QString myType; - double myCoefficient; + struct StricklerCoefficient + { + QString myType; + double myCoefficient; - StricklerCoefficient( const QString& theType, - double theCoefficient ) - : myType( theType ), myCoefficient( theCoefficient ) {} - }; - typedef QList StricklerCoefficientList; + StricklerCoefficient( const QString& theType, + double theCoefficient ) + : myType( theType ), myCoefficient( theCoefficient ) {} + }; + typedef QList StricklerCoefficientList; + + enum { Edit, Import, Export }; public: - HYDROGUI_StricklerTableDlg( HYDROGUI_Module* theModule, const QString& theTitle ); - virtual ~HYDROGUI_StricklerTableDlg(); + HYDROGUI_StricklerTableDlg( HYDROGUI_Module* theModule, const QString& theTitle, int theType ); + virtual ~HYDROGUI_StricklerTableDlg(); + + void reset(); - void setIsEdit( const bool theIsEdit ); - void reset(); + QString getFileName() const; + void setFileName( const QString& theName ); - QString getFileName() const; - void setFileName( const QString& theName ); + void setTableName( const QString& theName ); + QString getTableName() const; - void setStricklerTableName( const QString& theName ); - QString getStricklerTableName() const; + bool isTableNameReadOnly() const; + void setTableNameReadOnly( bool ); - void setData(const StricklerCoefficientList& theData); + StricklerCoefficientList getData() const; + void setData(const StricklerCoefficientList& theData); protected: - void updateControls(); - void removeRows( const QList theRows ); + void updateControls(); + void removeRows( const QList theRows ); -protected slots: - void onBrowse(); +protected Q_SLOTS: + void onBrowse(); - void onAddCoefficient(); - void onRemoveCoefficient(); - void onClearCoefficients(); + void onAddCoefficient(); + void onRemoveCoefficient(); + void onClearCoefficients(); - void onSelectionChanged(); + void onSelectionChanged(); -signals: - void fileSelected( const QString& theFileName ); +Q_SIGNALS: + void fileSelected( const QString& theFileName ); private: - QGroupBox* myFileNameGroup; //!< The group for the source Strickler table file selection - QLineEdit* myFileName; //!< Source Strickler table file name input field - QToolButton* myBrowseBtn; - - QGroupBox* myNameGroup; //!< The group for the Strickler table name input field - QLineEdit* myName; //!< The Strickler table name input field - - QGroupBox* myTableGroup; //!< The group for the Strickler table table control and buttons - QTableWidget* myTable; //!< The table of Strickler coefficients - QToolButton* myAddBtn; //!< The add Strickler coefficient button - QToolButton* myRemoveBtn; //!< The remove Strickler coefficient button - QToolButton* myClearBtn; //!< The clear all Strickler coefficients button + int myType; + QLineEdit* myFileName; //!< Source Strickler table file name input field + QLineEdit* myName; //!< The Strickler table name input field + QTableWidget* myTable; //!< The table of Strickler coefficients + QToolButton* myAddBtn; //!< The add Strickler coefficient button + QToolButton* myRemoveBtn; //!< The remove Strickler coefficient button + QToolButton* myClearBtn; //!< The clear all Strickler coefficients button }; #endif