DCQ: New Architecture

This commit is contained in:
dcq 2003-11-17 16:30:37 +00:00
parent d8cfb81717
commit 08ce9c6c99
2 changed files with 360 additions and 703 deletions

File diff suppressed because it is too large Load Diff

View File

@ -29,52 +29,35 @@
#ifndef GEOMETRYGUI_SUPPRESSHOLE_H #ifndef GEOMETRYGUI_SUPPRESSHOLE_H
#define GEOMETRYGUI_SUPPRESSHOLE_H #define GEOMETRYGUI_SUPPRESSHOLE_H
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel1Check_QTD.h"
#include "DlgRef_1Sel3Check_QTD.h"
#include "RepairGUI.h" #include "RepairGUI.h"
#include <qvariant.h>
#include <qdialog.h>
#include <AIS_InteractiveContext.hxx>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QButtonGroup;
class QCheckBox;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class RepairGUI;
//================================================================================= //=================================================================================
// class : RepairGUI_SuppressHoleDlg // class : RepairGUI_SuppressHoleDlg
// purpose : // purpose :
//================================================================================= //=================================================================================
class RepairGUI_SuppressHoleDlg : public QDialog class RepairGUI_SuppressHoleDlg : public GEOMBase_Skeleton
{ {
Q_OBJECT Q_OBJECT
public: public:
RepairGUI_SuppressHoleDlg( QWidget* parent = 0, RepairGUI_SuppressHoleDlg(QWidget* parent = 0, const char* name = 0, RepairGUI* theRepairGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0);
const char* name = 0,
RepairGUI* theRepairGUI = 0,
SALOME_Selection* Sel = 0,
Handle (AIS_InteractiveContext) ic = 0,
bool modal = FALSE,
WFlags fl = 0 );
~RepairGUI_SuppressHoleDlg(); ~RepairGUI_SuppressHoleDlg();
private : private :
RepairGUI* myRepairGUI; void Init(Handle(AIS_InteractiveContext) ic);
void Init( SALOME_Selection* Sel, Handle (AIS_InteractiveContext) ic ) ; void enterEvent(QEvent* e);
void closeEvent( QCloseEvent* e ) ; void closeEvent(QCloseEvent* e);
void enterEvent ( QEvent * ) ; /* Mouse enter the QWidget (to reactivate it) */
void ResetStateOfDialog() ; void ResetStateOfDialog();
void ResetPartial() ; void ResetPartial();
RepairGUI* myRepairGUI;
int myConstructorId; /* Current constructor id = radio button id */
/* Define a list of indices of sub shapes selected in a local context */ /* Define a list of indices of sub shapes selected in a local context */
bool GetIndexSubShapeSelected(const TopoDS_Shape& ShapeTopo, const int SubShapeType, bool GetIndexSubShapeSelected(const TopoDS_Shape& ShapeTopo, const int SubShapeType,
@ -82,87 +65,48 @@ private :
Standard_Integer& aLocalContextId, bool& myUseLocalContext); Standard_Integer& aLocalContextId, bool& myUseLocalContext);
/* Return the face selected by user from the main shape and index in a ListOfSub */ /* Return the face selected by user from the main shape and index in a ListOfSub */
TopoDS_Shape FaceFromList( const TopoDS_Shape& aShape, TopoDS_Shape FaceFromList(const TopoDS_Shape& aShape,
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfSub ) ; const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfSub);
Handle (AIS_InteractiveContext) myIC ; /* Interactive context */ /* Interactive and local context management see also : bool myUseLocalContext() */
Standard_Integer myLocalContextId ; /* identify a local context used by this method */ Handle(AIS_InteractiveContext) myIC; /* Interactive context */
bool myUseLocalContext ; /* true when this method as opened a local context */ Standard_Integer myLocalContextId; /* identify a local context used by this method */
bool myUseLocalContext; /* true when this method as opened a local context */
GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */ TopoDS_Shape myShape; /* Main shape selected */
GEOMBase* myGeomBase ; /* Current GeomGUI object */ TopoDS_Shape myFace; /* Face selected */
GEOMContext* myGeomGUI ; /* Current GeomGUI object */
SALOME_Selection* mySelection ; /* User shape selection */
TopoDS_Shape myShape ; /* Main shape selected */ char* myShapeIOR;
TopoDS_Shape myFace ; /* Face selected */ bool myOkShape;
char* myShapeIOR ; bool myOkSelectFace; /* true = sub mode GEOM::FACE selection done */
bool myOkShape ; bool myOkSelectWire; /* true = sub mode GEOM::WIRE selection done (first wire) */
bool myOkSelectFace ; /* true = sub mode GEOM::FACE selection done */ /* After selection contains index of face into myShape, wire into myFace, end face into myShape*/
bool myOkSelectWire ; /* true = sub mode GEOM::WIRE selection done (first wire) */ GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdFace;
GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdWire;
GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdFace ; /* After selection contains index of face into myShape */ GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdEndFace;
GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdWire ; /* After selection contains index of wire into myFace */
GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdEndFace ; /* After selection contains index of end face into myShape */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
int myConstructorId ; /* Current constructor id = radio button id */
QButtonGroup* GroupConstructors;
QRadioButton* Constructor1;
QGroupBox* GroupButtons;
QPushButton* buttonOk;
QPushButton* buttonApply;
QPushButton* buttonClose;
QGroupBox* GroupC1;
QLabel* TextLabelC1A1;
QPushButton* SelectButtonC1A1;
QLineEdit* LineEditC1A1;
QCheckBox* CheckBox1;
QCheckBox* CheckBox2;
QCheckBox* CheckBox3;
/* Second constructor */
QRadioButton* Constructor2;
QGroupBox* GroupC2;
QLabel* TextLabelC2A1;
QPushButton* SelectButtonC2A1;
QLineEdit* LineEditC2A1;
QCheckBox* CheckBoxC2_1;
DlgRef_1Sel3Check_QTD* Group1;
DlgRef_1Sel1Check_QTD* Group2;
private slots: private slots:
void ConstructorsClicked(int constructorId);
void ClickOnOk(); void ClickOnOk();
void ClickOnApply() ; void ClickOnApply();
void ClickOnClose(); void ClickOnCancel();
void ActivateThisDialog();
void LineEditReturnPressed() ; void DeactivateActiveDialog();
void SetEditCurrentArgument() ; void LineEditReturnPressed();
void SelectionIntoArgument() ; void SelectionIntoArgument();
void DeactivateActiveDialog() ; void SetEditCurrentArgument();
void ActivateThisDialog() ; void ConstructorsClicked(int constructorId);
void ActivateUserFaceSelection() ; void ActivateUserFaceSelection();
void ActivateUserWireSelection() ; void ActivateUserWireSelection();
void ActivateUserEndFaceSelection() ; void ActivateUserEndFaceSelection();
/* For the second constructor */ /* For the second constructor */
void ActivateUserWiresOnFaceShellSelection() ; void ActivateUserWiresOnFaceShellSelection() ;
protected:
QGridLayout* RepairGUI_SuppressHoleLayout;
QGridLayout* GroupConstructorsLayout;
QHBoxLayout* GroupButtonsLayout;
QGridLayout* GroupC1Layout;
QHBoxLayout* Layout2;
QGridLayout* GroupC2Layout;
QHBoxLayout* Layout3;
}; };
#endif // GEOMETRYGUI_SUPPRESSHOLE_H #endif // GEOMETRYGUI_SUPPRESSHOLE_H