Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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=-1)
 
 ~EntityGUI_SketcherDlg ()
 
bool eventFilter (QObject *object, QEvent *event)
 
bool acceptMouseEvent () const
 
void OnPointSelected (Qt::KeyboardModifiers, const gp_Pnt &, bool isStart=true)
 

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 &)
 
virtual void addSubshapesToStudy ()
 
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 RectClicked ()
 
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 AddLocalCS (GEOM::GEOM_Object_var)
 
void FindLocalCS ()
 
gp_Ax3 GetActiveLocalCS ()
 
gp_Ax3 WPlaneToLCS (GEOM::GEOM_Object_var)
 
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)
 
void displayPntPreview (const double=0.0, const double=0.0, bool=true, bool=true)
 
bool createShapes (GEOM::GEOM_Object_ptr, TopoDS_Shape &, TopoDS_Shape &)
 
int getPnt1ConstructorId () const
 
int getPnt2ConstructorId () const
 
void OnFirstPoint ()
 
void OnNextPoint ()
 
- Private Member Functions inherited from GEOMBase_Helper
 GEOMBase_Helper (SUIT_Desktop *)
 
virtual ~GEOMBase_Helper ()
 
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, const bool append=false)
 
void displayPreview (const SALOME_Prs *prs, const bool append=false, const bool=true)
 
void erasePreview (const bool=true)
 
const PrsListgetPreview () const
 
void localSelection (const ObjectList &, const std::list< int >)
 
void localSelection (const ObjectList &, const int)
 
void localSelection (GEOM::GEOM_Object_ptr, const std::list< int >)
 
void localSelection (GEOM::GEOM_Object_ptr, const int)
 
void localSelection (const std::list< int >)
 
void localSelection (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, bool erasePreviewFlag=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 (int CurrObj=-1) const
 
virtual QString getObjectName (GEOM::GEOM_Object_ptr object) const
 
virtual bool extractPrefix () const
 
virtual QList< GEOM::GeomObjPtrgetSourceObjects ()
 
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 hideSourceObjects (QList< GEOM::GeomObjPtr > theObjectList)
 
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
 
virtual void setIsWaitCursorEnabled (const bool theFlag)
 
virtual bool isWaitCursorEnabled () const
 
virtual void setIsDisableBrowsing (const bool theFlag)
 
virtual bool isDisableBrowsing () const
 
virtual void setIsDisplayResult (const bool theFlag)
 
virtual bool isDisplayResult () const
 

Private Attributes

int myConstructorId
 
int myConstructorDirId
 
int myConstructorPntId
 
int mySketchType
 
int mySketchState
 
bool myIsAllAdded
 
bool myIsApply
 
bool autoApply
 
QLineEdit * myEditCurrentArgument
 
QStringList myCommand
 
QStringList myUndoCommand
 
QStringList myParameters
 
QStringList myUndoParameters
 
Standard_Real myX
 
Standard_Real myY
 
Standard_Real myDX
 
Standard_Real myDY
 
Standard_Real myX1
 
Standard_Real myY1
 
Standard_Real myX2
 
Standard_Real myY2
 
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 myX1Str
 
QString myY1Str
 
QString myX2Str
 
QString myY2Str
 
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
 
DlgRef_4SpinGroupRect
 
QLabel * myErrLabel
 
QGroupBoxGroupBox1
 
QComboBox * ComboBox1
 
QPushButton * planeButton
 
QPushButton * selButton
 
QLineEdit * WPlaneLineEdit
 
GeometryGUImyGeometryGUI
 
QString myHelpFileName
 
double myLineWidth
 
QList< gp_Ax3 > myLCSList
 
GEOM::GEOM_Object_var myGlobalCS
 
GEOM::GEOM_Object_var myWPlane
 
QList< GEOM::GEOM_Object_var > myWPlaneList
 
int myCheckFlag
 
TopAbs_ShapeEnum myNeedType
 

Additional Inherited Members

- Static Private Member Functions inherited from GEOMBase_Helper
static SUIT_ViewWindow * getActiveView ()
 
static GEOM::GEOM_Gen_ptr getGeomEngine ()
 

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 ( )

Member Function Documentation

bool EntityGUI_SketcherDlg::acceptMouseEvent ( ) const
void EntityGUI_SketcherDlg::ActivateLocalCS ( )
privateslot
void EntityGUI_SketcherDlg::AddLocalCS ( GEOM::GEOM_Object_var  aSelectedObject)
privateslot
void EntityGUI_SketcherDlg::addSubshapesToStudy ( )
protectedvirtual

Reimplemented from GEOMBase_Helper.

References myWPlane, and GEOMBase::PublishSubObject().

void EntityGUI_SketcherDlg::CheckBoxClicked ( int  State)
privateslot
void EntityGUI_SketcherDlg::ClickOnCancel ( )
privateslot
void EntityGUI_SketcherDlg::ClickOnHelp ( )
privateslot

References myGeometryGUI, and myHelpFileName.

void EntityGUI_SketcherDlg::closeEvent ( QCloseEvent *  e)
protected

References myGeometryGUI.

GEOM::GEOM_IOperations_ptr EntityGUI_SketcherDlg::createOperation ( )
protectedvirtual
bool EntityGUI_SketcherDlg::createShapes ( GEOM::GEOM_Object_ptr  theObject,
TopoDS_Shape &  theApplyedWire,
TopoDS_Shape &  theLastSegment 
)
private
void EntityGUI_SketcherDlg::DeactivateActiveDialog ( )
privateslot
void EntityGUI_SketcherDlg::DestClicked ( int  constructorId)
privateslot
void EntityGUI_SketcherDlg::Dir1Clicked ( int  constructorId)
privateslot
void EntityGUI_SketcherDlg::displayPntPreview ( const double  x = 0.0,
const double  y = 0.0,
bool  append = true,
bool  update = true 
)
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 
)
privatevirtual
void EntityGUI_SketcherDlg::enterEvent ( QEvent *  )
private

References ActivateThisDialog().

bool EntityGUI_SketcherDlg::eventFilter ( QObject object,
QEvent *  event 
)
void EntityGUI_SketcherDlg::FindLocalCS ( )
privateslot
gp_Ax3 EntityGUI_SketcherDlg::GetActiveLocalCS ( )
privateslot
int EntityGUI_SketcherDlg::getPnt1ConstructorId ( ) const
private
int EntityGUI_SketcherDlg::getPnt2ConstructorId ( ) const
private
void EntityGUI_SketcherDlg::initSpinBox ( SalomeApp_DoubleSpinBox *  spinBox,
double  min,
double  max,
double  step = 0.1,
const char *  quantity = "length_precision" 
)
protected
bool EntityGUI_SketcherDlg::isValid ( QString &  msg)
protectedvirtual
void EntityGUI_SketcherDlg::keyPressEvent ( QKeyEvent *  e)
protected

References ClickOnHelp().

void EntityGUI_SketcherDlg::LineEditReturnPressed ( )
privateslot
void EntityGUI_SketcherDlg::OnFirstPoint ( )
private

References GroupPt2, and MainWidget.

void EntityGUI_SketcherDlg::OnNextPoint ( )
private
void EntityGUI_SketcherDlg::OnPointSelected ( Qt::KeyboardModifiers  modifiers,
const gp_Pnt &  thePnt,
bool  isStart = true 
)
void EntityGUI_SketcherDlg::PointClicked ( int  constructorId)
privateslot
void EntityGUI_SketcherDlg::RectClicked ( )
privateslot
void EntityGUI_SketcherDlg::SetDoubleSpinBoxStep ( double  step)
privateslot
void EntityGUI_SketcherDlg::setEnabledRedo ( bool  value)
private
void EntityGUI_SketcherDlg::setEnabledUndo ( bool  value)
private
void EntityGUI_SketcherDlg::TypeClicked ( int  constructorId)
privateslot
gp_Ax3 EntityGUI_SketcherDlg::WPlaneToLCS ( GEOM::GEOM_Object_var  geomObj)
privateslot

Member Data Documentation

bool EntityGUI_SketcherDlg::autoApply
private
QComboBox* EntityGUI_SketcherDlg::ComboBox1
private
EntityGUI_1Sel* EntityGUI_SketcherDlg::Group1Sel
private
EntityGUI_1Sel1Spin1Check* EntityGUI_SketcherDlg::Group1Sel1Spin
private
EntityGUI_1Spin* EntityGUI_SketcherDlg::Group1Spin
private
EntityGUI_2Sel1Check* EntityGUI_SketcherDlg::Group2Sel
private
EntityGUI_2Spin* EntityGUI_SketcherDlg::Group2Spin
private
EntityGUI_3Spin1Check* EntityGUI_SketcherDlg::Group3Spin
private
EntityGUI_4Spin1Check* EntityGUI_SketcherDlg::Group4Spin
private
QGroupBox* EntityGUI_SketcherDlg::GroupBox1
private
EntityGUI_Dir1* EntityGUI_SketcherDlg::GroupD1
private
EntityGUI_Dir2* EntityGUI_SketcherDlg::GroupD2
private
EntityGUI_Point* EntityGUI_SketcherDlg::GroupPt
private
EntityGUI_Point* EntityGUI_SketcherDlg::GroupPt2
private
DlgRef_4Spin* EntityGUI_SketcherDlg::GroupRect
private
EntityGUI_Skeleton* EntityGUI_SketcherDlg::MainWidget
private
Standard_Real EntityGUI_SketcherDlg::myAngle
private
QString EntityGUI_SketcherDlg::myAngleStr
private
int EntityGUI_SketcherDlg::myCheckFlag
private
QStringList EntityGUI_SketcherDlg::myCommand
private
int EntityGUI_SketcherDlg::myConstructorDirId
private
int EntityGUI_SketcherDlg::myConstructorId
private
int EntityGUI_SketcherDlg::myConstructorPntId
private
Standard_Real EntityGUI_SketcherDlg::myDX
private
Standard_Real EntityGUI_SketcherDlg::myDXc
private
QString EntityGUI_SketcherDlg::myDXcStr
private
QString EntityGUI_SketcherDlg::myDXStr
private
Standard_Real EntityGUI_SketcherDlg::myDY
private
Standard_Real EntityGUI_SketcherDlg::myDYc
private
QString EntityGUI_SketcherDlg::myDYcStr
private
QString EntityGUI_SketcherDlg::myDYStr
private
QLineEdit* EntityGUI_SketcherDlg::myEditCurrentArgument
private
QLabel* EntityGUI_SketcherDlg::myErrLabel
private
GeometryGUI* EntityGUI_SketcherDlg::myGeometryGUI
private
GEOM::GEOM_Object_var EntityGUI_SketcherDlg::myGlobalCS
private
QString EntityGUI_SketcherDlg::myHelpFileName
private
bool EntityGUI_SketcherDlg::myIsAllAdded
private
bool EntityGUI_SketcherDlg::myIsApply
private
Standard_Real EntityGUI_SketcherDlg::myLastX1
private
QString EntityGUI_SketcherDlg::myLastX1Str
private
Standard_Real EntityGUI_SketcherDlg::myLastX2
private
QString EntityGUI_SketcherDlg::myLastX2Str
private
Standard_Real EntityGUI_SketcherDlg::myLastY1
private
QString EntityGUI_SketcherDlg::myLastY1Str
private
Standard_Real EntityGUI_SketcherDlg::myLastY2
private
QString EntityGUI_SketcherDlg::myLastY2Str
private
QList<gp_Ax3> EntityGUI_SketcherDlg::myLCSList
private
Standard_Real EntityGUI_SketcherDlg::myLength
private
QString EntityGUI_SketcherDlg::myLengthStr
private
double EntityGUI_SketcherDlg::myLineWidth
private
TopAbs_ShapeEnum EntityGUI_SketcherDlg::myNeedType
private
QStringList EntityGUI_SketcherDlg::myParameters
private
Standard_Real EntityGUI_SketcherDlg::myRadius
private
QString EntityGUI_SketcherDlg::myRadiusStr
private
int EntityGUI_SketcherDlg::mySketchState
private
int EntityGUI_SketcherDlg::mySketchType
private
QStringList EntityGUI_SketcherDlg::myUndoCommand
private
QStringList EntityGUI_SketcherDlg::myUndoParameters
private
GEOM::GEOM_Object_var EntityGUI_SketcherDlg::myWPlane
private
QList< GEOM::GEOM_Object_var > EntityGUI_SketcherDlg::myWPlaneList
private
Standard_Real EntityGUI_SketcherDlg::myX
private
Standard_Real EntityGUI_SketcherDlg::myX1
private
QString EntityGUI_SketcherDlg::myX1Str
private
Standard_Real EntityGUI_SketcherDlg::myX2
private
QString EntityGUI_SketcherDlg::myX2Str
private
Standard_Real EntityGUI_SketcherDlg::myXc
private
QString EntityGUI_SketcherDlg::myXcStr
private
QString EntityGUI_SketcherDlg::myXStr
private
Standard_Real EntityGUI_SketcherDlg::myY
private
Standard_Real EntityGUI_SketcherDlg::myY1
private
QString EntityGUI_SketcherDlg::myY1Str
private
Standard_Real EntityGUI_SketcherDlg::myY2
private
QString EntityGUI_SketcherDlg::myY2Str
private
Standard_Real EntityGUI_SketcherDlg::myYc
private
QString EntityGUI_SketcherDlg::myYcStr
private
QString EntityGUI_SketcherDlg::myYStr
private
QPushButton* EntityGUI_SketcherDlg::planeButton
private
QPushButton* EntityGUI_SketcherDlg::selButton
private
QLineEdit* EntityGUI_SketcherDlg::WPlaneLineEdit
private

The documentation for this class was generated from the following files: