Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef STDMESHERSGUI_FIXEDPOINTSPARAMWGD_H
00024 #define STDMESHERSGUI_FIXEDPOINTSPARAMWGD_H
00025
00026
00027 #include <SMESHGUI.h>
00028 #include "SMESH_StdMeshersGUI.hxx"
00029
00030
00031 #include <QWidget>
00032 #include <QStringList>
00033
00034 class SMESHGUI;
00035 class SMESHGUI_SpinBox;
00036 class QPushButton;
00037 class QLineEdit;
00038 class QCheckBox;
00039 class QListWidget;
00040 class QListWidgetItem;
00041 class QTreeWidget;
00042 class QTreeWidgetItem;
00043
00044 class STDMESHERSGUI_EXPORT StdMeshersGUI_FixedPointsParamWdg : public QWidget
00045 {
00046 Q_OBJECT
00047
00048 class LineDelegate;
00049
00050 public:
00051 StdMeshersGUI_FixedPointsParamWdg( QWidget* parent = 0 );
00052 ~StdMeshersGUI_FixedPointsParamWdg();
00053
00054 bool eventFilter( QObject*, QEvent* );
00055
00056 SMESH::double_array_var GetListOfPoints();
00057 void SetListOfPoints( SMESH::double_array_var );
00058
00059 SMESH::long_array_var GetListOfSegments();
00060 void SetListOfSegments( SMESH::long_array_var );
00061
00062 QString GetValue() const { return myParamValue; }
00063
00064 private slots:
00065 void onAdd();
00066 void onRemove();
00067 void onCheckBoxChanged();
00068 void updateState();
00069
00070 private:
00071 void clear();
00072 void addPoint( double );
00073 void removePoints();
00074 double point( int ) const;
00075 void setNbSegments( int, int );
00076 int nbSegments( int ) const;
00077
00078 static QTreeWidgetItem* newTreeItem( double v1, double v2 );
00079 static QListWidgetItem* newListItem( double v1 );
00080 static QString treeItemText( double v1, double v2 );
00081
00082 private:
00083 QListWidget* myListWidget;
00084 QTreeWidget* myTreeWidget;
00085 SMESHGUI_SpinBox* mySpinBox;
00086 QPushButton* myAddButton;
00087 QPushButton* myRemoveButton;
00088 QCheckBox* mySameValues;
00089 QString myParamValue;
00090 };
00091
00092 #endif // STDMESHERSGUI_FIXEDPOINTSPARAMWGD_H