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
00024
00025
00026
00027 #ifndef OPERATIONGUI_CHAMFERDLG_H
00028 #define OPERATIONGUI_CHAMFERDLG_H
00029
00030 #include <GEOMBase_Skeleton.h>
00031
00032 #include <TColStd_IndexedMapOfInteger.hxx>
00033
00034 #include <QMap>
00035
00036 class SalomeApp_DoubleSpinBox;
00037 class QGroupBox;
00038 class QPushButton;
00039 class QLineEdit;
00040 class QGridLayout;
00041 class QRadioButton;
00042
00043
00044
00045
00046
00047 class OperationGUI_ChamferDlg : public GEOMBase_Skeleton
00048 {
00049 Q_OBJECT
00050
00051 enum { MainObj1, MainObj2, Face1, Face2, MainObj3, Faces, MainObj4, Edges};
00052 enum { SpinBox1,
00053 SpinBox21, SpinBox22, SpinBox23, SpinBox24,
00054 SpinBox31, SpinBox32, SpinBox33, SpinBox34,
00055 SpinBox41, SpinBox42, SpinBox43, SpinBox44 };
00056 enum { RadioButton21, RadioButton22,
00057 RadioButton31, RadioButton32,
00058 RadioButton41, RadioButton42 };
00059
00060 public:
00061 OperationGUI_ChamferDlg( GeometryGUI*, QWidget* );
00062 virtual ~OperationGUI_ChamferDlg();
00063
00064 protected:
00065
00066 virtual GEOM::GEOM_IOperations_ptr createOperation();
00067 virtual bool isValid( QString& );
00068 virtual bool execute( ObjectList& );
00069
00070 private slots:
00071 void ClickOnOk();
00072 bool ClickOnApply();
00073 void ActivateThisDialog();
00074 void LineEditReturnPressed();
00075 void RadioButtonPressed();
00076 void SelectionIntoArgument();
00077 void SetEditCurrentArgument();
00078 void ValueChangedInSpinBox( double );
00079 void ConstructorsClicked( int );
00080
00081 private:
00082 void Init();
00083 void enterEvent( QEvent* );
00084 void createSelWg( const QString&, QPixmap&, QWidget*,
00085 QGridLayout*, const int );
00086 void createRadioWg( const QString&, const QString&, QWidget*,
00087 QGridLayout*, const int, const int, const int );
00088 void activateSelection();
00089 void enableWidgets();
00090
00091 private:
00092 int myConstructorId;
00093
00094 GEOM::GEOM_Object_var myShape;
00095 QMap< int, int > myFace;
00096 TColStd_IndexedMapOfInteger myFaces;
00097 TColStd_IndexedMapOfInteger myEdges;
00098
00099
00100 bool myInitial;
00101
00102 QGroupBox* myGrp1;
00103 QGroupBox* myGrp2;
00104 QGroupBox* myGrp3;
00105 QGroupBox* myGrp4;
00106
00107 QMap< int, QPushButton* > mySelBtn;
00108 QMap< int, QLineEdit* > mySelName;
00109 QMap< int, SalomeApp_DoubleSpinBox* > mySpinBox;
00110 QMap< int, QRadioButton* > myRadioButton;
00111 };
00112
00113 #endif // OPERATIONGUI_CHAMFERDLG_H