Version: 6.3.1
Public Member Functions | Protected Member Functions | Private Types | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes

EntityGUI_SketcherDlg Class Reference

#include <EntityGUI_SketcherDlg.h>

Inheritance diagram for EntityGUI_SketcherDlg:
Inheritance graph

Public Member Functions

 EntityGUI_SketcherDlg (GeometryGUI *, QWidget *=0, bool=false, Qt::WindowFlags=0, const double=2.)
 ~EntityGUI_SketcherDlg ()
bool eventFilter (QObject *object, QEvent *event)

Protected Member Functions

void initSpinBox (SalomeApp_DoubleSpinBox *, double, double, double=0.1, const char *quantity="length_precision")
virtual GEOM::GEOM_IOperations_ptr createOperation ()
virtual bool isValid (QString &)
virtual bool execute (ObjectList &)
void closeEvent (QCloseEvent *)
void keyPressEvent (QKeyEvent *)

Private Types

enum  SketchState { FIRST_POINT, NEXT_POINT }
enum  SketchType {
  PT_ABS, PT_RELATIVE, PT_SEL, PT_ABS_RADIUS,
  PT_REL_RADIUS, PT_SEL_RADIUS, PT_ABS_CENTER, PT_REL_CENTER,
  PT_SEL_CENTER, DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y,
  DIR_PER_LENGTH, DIR_PER_X, DIR_PER_Y, DIR_TAN_LENGTH,
  DIR_TAN_X, DIR_TAN_Y, DIR_DXDY_LENGTH, DIR_DXDY_X,
  DIR_DXDY_Y
}

Private Slots

void ClickOnEnd ()
void ClickOnCancel ()
bool ClickOnApply ()
void ClickOnUndo ()
void ClickOnRedo ()
void ClickOnHelp ()
void LineEditReturnPressed ()
void SelectionIntoArgument ()
void SetEditCurrentArgument ()
void DeactivateActiveDialog ()
void ActivateThisDialog ()
void TypeClicked (int)
void DestClicked (int)
void PointClicked (int)
void Point2Clicked (int)
void Dir1Clicked (int)
void Dir2Clicked (int)
void CheckBoxClicked (int)
void ValueChangedInSpinBox (double)
void SetDoubleSpinBoxStep (double)
void FindLocalCS ()
gp_Ax3 GetActiveLocalCS ()
void ActivateLocalCS ()

Private Member Functions

void Init ()
void enterEvent (QEvent *)
void InitClick ()
void setEnabledUndo (bool)
void setEnabledRedo (bool)
QString GetNewCommand (QString &)
virtual void displayPreview (GEOM::GEOM_Object_ptr, const bool=false, const bool=false, const bool=true, const double=-1, const int=-1, const int=-1)
bool createShapes (GEOM::GEOM_Object_ptr, TopoDS_Shape &, TopoDS_Shape &)
void display (const ObjectList &, const bool=true)
void display (GEOM::GEOM_Object_ptr, const bool=true)
void erase (const ObjectList &, const bool=true)
void erase (GEOM::GEOM_Object_ptr, const bool=true)
void redisplay (const ObjectList &, const bool=true, const bool=true)
void redisplay (GEOM::GEOM_Object_ptr, const bool=true, const bool=true)
virtual void displayPreview (const bool display, const bool activate=false, const bool update=true, const bool toRemoveFromEngine=true, const double lineWidth=-1, const int displayMode=-1, const int color=-1)
void displayPreview (const SALOME_Prs *prs, const bool append=false, const bool=true)
void erasePreview (const bool=true)
void localSelection (const ObjectList &, const int)
void localSelection (GEOM::GEOM_Object_ptr, const int)
void activate (const int)
void globalSelection (const int=GEOM_ALLOBJECTS, const bool=false)
void globalSelection (const TColStd_MapOfInteger &, const bool=false)
void globalSelection (const TColStd_MapOfInteger &, const QList< int > &, const bool=false)
void updateViewer ()
void prepareSelection (const ObjectList &, const int)
void prepareSelection (GEOM::GEOM_Object_ptr, const int)
QString addInStudy (GEOM::GEOM_Object_ptr, const char *theName)
bool openCommand ()
bool abortCommand ()
bool commitCommand (const char *=0)
bool hasCommand () const
void updateObjBrowser () const
int getStudyId () const
SalomeApp_Study * getStudy () const
bool checkViewWindow ()
bool onAccept (const bool publish=true, const bool useTransaction=true)
void showError ()
void showError (const QString &msg)
GEOM::GEOM_IOperations_ptr getOperation ()
void setPrefix (const QString &prefix)
QString getPrefix (GEOM::GEOM_Object_ptr=GEOM::GEOM_Object::_nil()) const
bool selectObjects (ObjectList &objects)
virtual void restoreSubShapes (SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject)
virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr theObj)
virtual QString getNewObjectName () const
virtual bool extractPrefix () const
virtual void addSubshapesToStudy ()
GEOM::GEOM_Object_ptr findObjectInFather (GEOM::GEOM_Object_ptr theFather, const QString &theName)
GEOM::GEOM_Object_ptr findObjectInFather (GEOM::GEOM_Object_ptr theFather, int theIndex)
GEOM::GeomObjPtr getSelected (TopAbs_ShapeEnum type)
GEOM::GeomObjPtr getSelected (const QList< TopAbs_ShapeEnum > &types)
QList< GEOM::GeomObjPtrgetSelected (TopAbs_ShapeEnum type, int count, bool strict=true)
QList< GEOM::GeomObjPtrgetSelected (const QList< TopAbs_ShapeEnum > &types, int count, bool strict=true)
void SetIsPreview (const bool thePreview)
bool IsPreview ()
GEOM_DisplayergetDisplayer ()
SUIT_Desktop * getDesktop () const
virtual void setIsApplyAndClose (const bool theFlag)
virtual bool isApplyAndClose () const
virtual void setIsOptimizedBrowsing (const bool theFlag)
virtual bool isOptimizedBrowsing () const

Static Private Member Functions

static GEOM::GEOM_Gen_ptr getGeomEngine ()

Private Attributes

int myConstructorId
int myConstructorDirId
int myConstructorPntId
int mySketchType
int mySketchState
bool myIsAllAdded
bool myIsApply
QLineEdit * myEditCurrentArgument
QStringList myCommand
QStringList myUndoCommand
QStringList myParameters
QStringList myUndoParameters
Standard_Real myX
Standard_Real myY
Standard_Real myDX
Standard_Real myDY
Standard_Real myXc
Standard_Real myYc
Standard_Real myDXc
Standard_Real myDYc
Standard_Real myLength
Standard_Real myAngle
Standard_Real myRadius
Standard_Real myLastX1
Standard_Real myLastY1
Standard_Real myLastX2
Standard_Real myLastY2
QString myXStr
QString myYStr
QString myDXStr
QString myDYStr
QString myXcStr
QString myYcStr
QString myDXcStr
QString myDYcStr
QString myLengthStr
QString myAngleStr
QString myRadiusStr
QString myLastX1Str
QString myLastY1Str
QString myLastX2Str
QString myLastY2Str
EntityGUI_SkeletonMainWidget
EntityGUI_PointGroupPt
EntityGUI_PointGroupPt2
EntityGUI_Dir1GroupD1
EntityGUI_Dir2GroupD2
EntityGUI_1SelGroup1Sel
EntityGUI_2Sel1CheckGroup2Sel
EntityGUI_1Sel1Spin1CheckGroup1Sel1Spin
EntityGUI_1SpinGroup1Spin
EntityGUI_2SpinGroup2Spin
EntityGUI_3Spin1CheckGroup3Spin
EntityGUI_4Spin1CheckGroup4Spin
QLabel * myErrLabel
QGroupBoxGroupBox1
QComboBox * ComboBox1
QPushButton * planeButton
GeometryGUImyGeometryGUI
QString myHelpFileName
double myLineWidth
QList< gp_Ax3 > myLCSList
int myCheckFlag

Member Enumeration Documentation

Enumerator:
FIRST_POINT 
NEXT_POINT 
Enumerator:
PT_ABS 
PT_RELATIVE 
PT_SEL 
PT_ABS_RADIUS 
PT_REL_RADIUS 
PT_SEL_RADIUS 
PT_ABS_CENTER 
PT_REL_CENTER 
PT_SEL_CENTER 
DIR_ANGLE_LENGTH 
DIR_ANGLE_X 
DIR_ANGLE_Y 
DIR_PER_LENGTH 
DIR_PER_X 
DIR_PER_Y 
DIR_TAN_LENGTH 
DIR_TAN_X 
DIR_TAN_Y 
DIR_DXDY_LENGTH 
DIR_DXDY_X 
DIR_DXDY_Y 

Constructor & Destructor Documentation

EntityGUI_SketcherDlg::EntityGUI_SketcherDlg ( GeometryGUI GUI,
QWidget parent = 0,
bool  modal = false,
Qt::WindowFlags  fl = 0,
const double  lineWidth = 2. 
)
EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg ( )

Member Function Documentation

bool EntityGUI_SketcherDlg::eventFilter ( QObject object,
QEvent *  event 
)
void EntityGUI_SketcherDlg::initSpinBox ( SalomeApp_DoubleSpinBox *  spinBox,
double  min,
double  max,
double  step = 0.1,
const char *  quantity = "length_precision" 
) [protected]
GEOM::GEOM_IOperations_ptr EntityGUI_SketcherDlg::createOperation ( ) [protected, virtual]
bool EntityGUI_SketcherDlg::isValid ( QString &  msg) [protected, virtual]
bool EntityGUI_SketcherDlg::execute ( ObjectList objects) [protected, virtual]
void EntityGUI_SketcherDlg::closeEvent ( QCloseEvent *  e) [protected]

References myGeometryGUI.

void EntityGUI_SketcherDlg::keyPressEvent ( QKeyEvent *  e) [protected]

References ClickOnHelp().

void EntityGUI_SketcherDlg::Init ( ) [private]
void EntityGUI_SketcherDlg::enterEvent ( QEvent *  ) [private]

References ActivateThisDialog().

void EntityGUI_SketcherDlg::InitClick ( ) [private]
void EntityGUI_SketcherDlg::setEnabledUndo ( bool  value) [private]
void EntityGUI_SketcherDlg::setEnabledRedo ( bool  value) [private]
QString EntityGUI_SketcherDlg::GetNewCommand ( QString &  theParameters) [private]
void EntityGUI_SketcherDlg::displayPreview ( GEOM::GEOM_Object_ptr  object,
const bool  append = false,
const bool  activate = false,
const bool  update = true,
const double  lineWidth = -1,
const int  displayMode = -1,
const int  color = -1 
) [private, virtual]
bool EntityGUI_SketcherDlg::createShapes ( GEOM::GEOM_Object_ptr  theObject,
TopoDS_Shape &  theApplyedWire,
TopoDS_Shape &  theLastSegment 
) [private]
void EntityGUI_SketcherDlg::ClickOnEnd ( ) [private, slot]
void EntityGUI_SketcherDlg::ClickOnCancel ( ) [private, slot]
bool EntityGUI_SketcherDlg::ClickOnApply ( ) [private, slot]
void EntityGUI_SketcherDlg::ClickOnUndo ( ) [private, slot]
void EntityGUI_SketcherDlg::ClickOnRedo ( ) [private, slot]
void EntityGUI_SketcherDlg::ClickOnHelp ( ) [private, slot]

References myGeometryGUI, and myHelpFileName.

void EntityGUI_SketcherDlg::LineEditReturnPressed ( ) [private, slot]
void EntityGUI_SketcherDlg::SelectionIntoArgument ( ) [private, slot]
void EntityGUI_SketcherDlg::SetEditCurrentArgument ( ) [private, slot]
void EntityGUI_SketcherDlg::DeactivateActiveDialog ( ) [private, slot]
void EntityGUI_SketcherDlg::ActivateThisDialog ( ) [private, slot]
void EntityGUI_SketcherDlg::TypeClicked ( int  constructorId) [private, slot]
void EntityGUI_SketcherDlg::DestClicked ( int  constructorId) [private, slot]
void EntityGUI_SketcherDlg::PointClicked ( int  constructorId) [private, slot]
void EntityGUI_SketcherDlg::Point2Clicked ( int  constructorId) [private, slot]
void EntityGUI_SketcherDlg::Dir1Clicked ( int  constructorId) [private, slot]
void EntityGUI_SketcherDlg::Dir2Clicked ( int  constructorId) [private, slot]
void EntityGUI_SketcherDlg::CheckBoxClicked ( int  State) [private, slot]
void EntityGUI_SketcherDlg::ValueChangedInSpinBox ( double  newValue) [private, slot]
void EntityGUI_SketcherDlg::SetDoubleSpinBoxStep ( double  step) [private, slot]
void EntityGUI_SketcherDlg::FindLocalCS ( ) [private, slot]
gp_Ax3 EntityGUI_SketcherDlg::GetActiveLocalCS ( ) [private, slot]
void EntityGUI_SketcherDlg::ActivateLocalCS ( ) [private, slot]
GEOM::GEOM_Gen_ptr GEOMBase_Helper::getGeomEngine ( ) [static, protected, inherited]
void GEOMBase_Helper::display ( const ObjectList objList,
const bool  updateView = true 
) [protected, inherited]
void GEOMBase_Helper::display ( GEOM::GEOM_Object_ptr  object,
const bool  updateView = true 
) [protected, inherited]
void GEOMBase_Helper::erase ( const ObjectList objList,
const bool  updateView = true 
) [protected, inherited]
void GEOMBase_Helper::erase ( GEOM::GEOM_Object_ptr  object,
const bool  updateView = true 
) [protected, inherited]
void GEOMBase_Helper::redisplay ( const ObjectList objList,
const bool  withChildren = true,
const bool  updateView = true 
) [protected, inherited]
void GEOMBase_Helper::redisplay ( GEOM::GEOM_Object_ptr  object,
const bool  withChildren = true,
const bool  updateView = true 
) [protected, inherited]
void GEOMBase_Helper::displayPreview ( const bool  display,
const bool  activate = false,
const bool  update = true,
const bool  toRemoveFromEngine = true,
const double  lineWidth = -1,
const int  displayMode = -1,
const int  color = -1 
) [protected, virtual, inherited]
void GEOMBase_Helper::displayPreview ( const SALOME_Prs *  prs,
const bool  append = false,
const bool  update = true 
) [protected, inherited]
void GEOMBase_Helper::erasePreview ( const bool  update = true) [protected, inherited]
void GEOMBase_Helper::localSelection ( const ObjectList theObjs,
const int  theMode 
) [protected, inherited]
void GEOMBase_Helper::localSelection ( GEOM::GEOM_Object_ptr  obj,
const int  mode 
) [protected, inherited]
void GEOMBase_Helper::activate ( const int  theType) [protected, inherited]
void GEOMBase_Helper::globalSelection ( const int  theMode = GEOM_ALLOBJECTS,
const bool  update = false 
) [protected, inherited]
void GEOMBase_Helper::globalSelection ( const TColStd_MapOfInteger &  theModes,
const bool  update = false 
) [protected, inherited]
void GEOMBase_Helper::globalSelection ( const TColStd_MapOfInteger &  theModes,
const QList< int > &  subShapes,
const bool  update = false 
) [protected, inherited]
void GEOMBase_Helper::updateViewer ( ) [protected, inherited]
void GEOMBase_Helper.prepareSelection ( const ObjectList ,
const int   
) [protected, inherited]
void GEOMBase_Helper.prepareSelection ( GEOM::GEOM_Object_ptr  ,
const int   
) [protected, inherited]
QString GEOMBase_Helper::addInStudy ( GEOM::GEOM_Object_ptr  theObj,
const char *  theName 
) [protected, inherited]
bool GEOMBase_Helper::openCommand ( ) [protected, inherited]
bool GEOMBase_Helper::abortCommand ( ) [protected, inherited]
bool GEOMBase_Helper::commitCommand ( const char *  = 0) [protected, inherited]
bool GEOMBase_Helper::hasCommand ( ) const [protected, inherited]
void GEOMBase_Helper::updateObjBrowser ( ) const [protected, inherited]
int GEOMBase_Helper::getStudyId ( ) const [protected, inherited]
SalomeApp_Study * GEOMBase_Helper::getStudy ( ) const [protected, inherited]
bool GEOMBase_Helper::checkViewWindow ( ) [protected, inherited]
bool GEOMBase_Helper::onAccept ( const bool  publish = true,
const bool  useTransaction = true 
) [protected, inherited]
void GEOMBase_Helper::showError ( ) [protected, inherited]
void GEOMBase_Helper::showError ( const QString &  msg) [protected, inherited]
GEOM::GEOM_IOperations_ptr GEOMBase_Helper::getOperation ( ) [protected, inherited]
void GEOMBase_Helper.setPrefix ( const QString &  prefix) [protected, inherited]
QString GEOMBase_Helper::getPrefix ( GEOM::GEOM_Object_ptr  theObj = GEOM::GEOM_Object::_nil()) const [protected, inherited]
bool GEOMBase_Helper::selectObjects ( ObjectList objects) [protected, inherited]
void GEOMBase_Helper::restoreSubShapes ( SALOMEDS::Study_ptr  theStudy,
SALOMEDS::SObject_ptr  theSObject 
) [protected, virtual, inherited]
GEOM::GEOM_Object_ptr GEOMBase_Helper::getFather ( GEOM::GEOM_Object_ptr  theObj) [protected, virtual, inherited]
QString GEOMBase_Helper::getNewObjectName ( ) const [protected, virtual, inherited]
bool GEOMBase_Helper::extractPrefix ( ) const [protected, virtual, inherited]
void GEOMBase_Helper::addSubshapesToStudy ( ) [protected, virtual, inherited]
GEOM::GEOM_Object_ptr GEOMBase_Helper::findObjectInFather ( GEOM::GEOM_Object_ptr  theFather,
const QString &  theName 
) [protected, inherited]
GEOM::GEOM_Object_ptr GEOMBase_Helper::findObjectInFather ( GEOM::GEOM_Object_ptr  theFather,
int  theIndex 
) [protected, inherited]
GEOM::GeomObjPtr GEOMBase_Helper::getSelected ( TopAbs_ShapeEnum  type) [protected, inherited]
GEOM::GeomObjPtr GEOMBase_Helper::getSelected ( const QList< TopAbs_ShapeEnum > &  types) [protected, inherited]
QList< GEOM::GeomObjPtr > GEOMBase_Helper::getSelected ( TopAbs_ShapeEnum  type,
int  count,
bool  strict = true 
) [protected, inherited]
QList< GEOM::GeomObjPtr > GEOMBase_Helper::getSelected ( const QList< TopAbs_ShapeEnum > &  types,
int  count,
bool  strict = true 
) [protected, inherited]
void GEOMBase_Helper.SetIsPreview ( const bool  thePreview) [protected, inherited]
bool GEOMBase_Helper.IsPreview ( ) [protected, inherited]
GEOM_Displayer * GEOMBase_Helper::getDisplayer ( ) [protected, inherited]
SUIT_Desktop * GEOMBase_Helper::getDesktop ( ) const [protected, inherited]
void GEOMBase_Helper::setIsApplyAndClose ( const bool  theFlag) [protected, virtual, inherited]
bool GEOMBase_Helper::isApplyAndClose ( ) const [protected, virtual, inherited]
void GEOMBase_Helper::setIsOptimizedBrowsing ( const bool  theFlag) [protected, virtual, inherited]
bool GEOMBase_Helper::isOptimizedBrowsing ( ) const [protected, virtual, inherited]

Field Documentation

QStringList EntityGUI_SketcherDlg.myCommand [private]

Reimplemented from GEOMBase_Helper.

QStringList EntityGUI_SketcherDlg.myUndoCommand [private]
QStringList EntityGUI_SketcherDlg.myParameters [private]
Standard_Real EntityGUI_SketcherDlg.myX [private]
Standard_Real EntityGUI_SketcherDlg.myY [private]
Standard_Real EntityGUI_SketcherDlg.myDX [private]
Standard_Real EntityGUI_SketcherDlg.myDY [private]
Standard_Real EntityGUI_SketcherDlg.myXc [private]
Standard_Real EntityGUI_SketcherDlg.myYc [private]
Standard_Real EntityGUI_SketcherDlg.myDXc [private]
Standard_Real EntityGUI_SketcherDlg.myDYc [private]
Standard_Real EntityGUI_SketcherDlg.myLength [private]
Standard_Real EntityGUI_SketcherDlg.myAngle [private]
Standard_Real EntityGUI_SketcherDlg.myRadius [private]
Standard_Real EntityGUI_SketcherDlg.myLastX1 [private]
Standard_Real EntityGUI_SketcherDlg.myLastY1 [private]
Standard_Real EntityGUI_SketcherDlg.myLastX2 [private]
Standard_Real EntityGUI_SketcherDlg.myLastY2 [private]
QString EntityGUI_SketcherDlg.myXStr [private]
QString EntityGUI_SketcherDlg.myYStr [private]
QString EntityGUI_SketcherDlg.myDXStr [private]
QString EntityGUI_SketcherDlg.myDYStr [private]
QString EntityGUI_SketcherDlg.myXcStr [private]
QString EntityGUI_SketcherDlg.myYcStr [private]
QString EntityGUI_SketcherDlg.myDXcStr [private]
QString EntityGUI_SketcherDlg.myDYcStr [private]
QComboBox* EntityGUI_SketcherDlg.ComboBox1 [private]
QPushButton* EntityGUI_SketcherDlg.planeButton [private]
QList<gp_Ax3> EntityGUI_SketcherDlg.myLCSList [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS