Version: 8.3.0
SMESHGUI_ClippingDlg Class Reference

#include <SMESHGUI_ClippingDlg.h>

Inheritance diagram for SMESHGUI_ClippingDlg:

Public Slots

void onModeAbsolute ()
 Set absolute mode of clipping plane. More...
 
void onModeRelative ()
 Set relative mode of clipping plane. More...
 
void ClickOnNew ()
 SLOT on new button click: create a new clipping plane. More...
 
void ClickOnDelete ()
 SLOT on delete button click: Delete selected clipping plane. More...
 
void onSelectPlane (int)
 Set current parameters of selected plane. More...
 
void onSelectAll (int)
 SLOT: called on SelectAll check box toggled. More...
 
void onActorItemChanged (QListWidgetItem *)
 SLOT: called when actor item was changed. More...
 
void SetCurrentPlaneParam ()
 Restore parameters of selected plane. More...
 
void onIsOpenGLClipping (bool)
 SLOT: called on OpenGLClipping check box toggled. More...
 
void OnPreviewToggle (bool)
 SLOT: called on preview check box toggled. More...
 
void onAutoApply (bool)
 SLOT: called on Auto Apply check box toggled. More...
 
void ClickOnOk ()
 SLOT on ok button click: sets cutting plane and closes dialog. More...
 
void ClickOnApply ()
 SLOT on Apply button click: sets cutting plane and update viewer. More...
 
void ClickOnHelp ()
 SLOT on help button click: opens a help page. More...
 
void onSelectAbsoluteOrientation (int)
 
void onSelectRelativeOrientation (int)
 SLOT: called on orientation of clipping plane in relative mode changed. More...
 
void onReset ()
 SLOT on reset button click: sets default values. More...
 
void onInvert ()
 SLOT on invert button click: inverts normal of cutting plane. More...
 

Public Member Functions

 SMESHGUI_ClippingDlg (SMESHGUI *, SVTK_ViewWindow *)
 Constructor. More...
 
 ~SMESHGUI_ClippingDlg ()
 Destructor Destroys the object and frees any allocated resources. More...
 

Static Public Member Functions

static bool AddPlane (SMESH::TActorList theActorList, SMESH::OrientedPlane *thePlane)
 Used in SMESHGUI::restoreVisualParameters() to avoid Declaration of OrientedPlane outside of SMESHGUI_ClippingDlg.cxx. More...
 

Protected Slots

virtual void reject ()
 SLOT on close button click: rejects dialog. More...
 

Protected Member Functions

void keyPressEvent (QKeyEvent *)
 Custom handling of events. More...
 

Static Protected Member Functions

static void ProcessEvents (vtkObject *theObject, unsigned long theEvent, void *theClientData, void *theCallData)
 Handles the char preview widget activation event. More...
 

Private Member Functions

double getDistance () const
 Get distance for cutting plane in relative mode. More...
 
void setDistance (const double)
 Set distance of cutting plane in relative mode. More...
 
double getRotation1 () const
 Get rotation1 for cutting plane in relative mode. More...
 
double getRotation2 () const
 Get rotation2 for cutting plane in relative mode. More...
 
void setRotation (const double, const double)
 Set angles of clipping plane in relative mode. More...
 
void setOrigin (double theVal[3])
 Set coordinates of origin point in dialog box. More...
 
void setDirection (double theVal[3])
 Set coordinates of normal vector in dialog box. More...
 
void initializePlaneData ()
 Initialize the planes's data when the dialog opened. More...
 
void initParam ()
 Initialization of initial values of widgets. More...
 
void synchronize ()
 Synchronize dialog's widgets with data. More...
 
void updateActorList ()
 Update the list of actors. More...
 
void updateActorItem (QListWidgetItem *theItem, bool theUpdateSelectAll, bool theUpdateClippingPlaneMap)
 Update an actor in actor's list. More...
 
SMESH::TActorList getCurrentActors ()
 Get the list of current actors. More...
 
void dumpPlaneData () const
 Dump the parameters of clipping planes. More...
 
void absolutePlaneToRelative (double theOrigin[3], double theDir[3])
 Convert absolute coordinates of plane to relative mode. More...
 
void setBoundsForPreviewWidget ()
 Set current bounds for preview widget. More...
 
vtkImplicitPlaneWidget * createPreviewWidget ()
 Create a new widget for preview clipping plane. More...
 

Private Attributes

SMESHGUImySMESHGUI
 
SVTK_ViewWindow * myViewWindow
 
SMESH::TPlaneDataVector myPlanes
 
vtkCallbackCommand * myCallback
 
vtkImplicitPlaneWidget * myPreviewWidget
 
double myBounds [6]
 
QComboBox * ComboBoxPlanes
 
QCheckBox * isOpenGLClipping
 
QPushButton * buttonNew
 
QMenu * MenuMode
 
QPushButton * buttonDelete
 
QListWidget * ActorList
 
QCheckBox * SelectAllCheckBox
 
QStackedLayout * ModeStackedLayout
 
QGroupBoxGroupAbsolutePoint
 
QLabel * TextLabelX
 
QLabel * TextLabelY
 
QLabel * TextLabelZ
 
QtxDoubleSpinBox * SpinBox_X
 
QtxDoubleSpinBox * SpinBox_Y
 
QtxDoubleSpinBox * SpinBox_Z
 
QPushButton * resetButton
 
QGroupBoxGroupAbsoluteDirection
 
QLabel * TextLabelDx
 
QLabel * TextLabelDy
 
QLabel * TextLabelDz
 
QtxDoubleSpinBox * SpinBox_Dx
 
QtxDoubleSpinBox * SpinBox_Dy
 
QtxDoubleSpinBox * SpinBox_Dz
 
QPushButton * invertButton
 
QComboBox * CBAbsoluteOrientation
 
QGroupBoxGroupRelative
 
QLabel * TextLabelOrientation
 
QLabel * TextLabelDistance
 
QLabel * TextLabelRotation1
 
QLabel * TextLabelRotation2
 
QtxDoubleSpinSlider * SpinSliderDistance
 
QtxIntSpinSlider * SpinSliderRotation1
 
QtxIntSpinSlider * SpinSliderRotation2
 
QComboBox * CBRelativeOrientation
 
QCheckBox * PreviewCheckBox
 
QCheckBox * AutoApplyCheckBox
 
QPushButton * buttonOk
 
QPushButton * buttonCancel
 
QPushButton * buttonApply
 
QPushButton * buttonHelp
 
bool myIsSelectPlane
 
bool myIsPreviewMoved
 
QString myHelpFileName
 
SMESH::Mode CurrentMode
 

Constructor & Destructor Documentation

SMESHGUI_ClippingDlg::~SMESHGUI_ClippingDlg ( )

Destructor Destroys the object and frees any allocated resources.

References myCallback, myPlanes, myPreviewWidget, myViewWindow, SMESH::TPlaneData::Plane, and SMESH::RenderViewWindow().

Member Function Documentation

void SMESHGUI_ClippingDlg::absolutePlaneToRelative ( double  theOrigin[3],
double  theDir[3] 
)
private
bool SMESHGUI_ClippingDlg::AddPlane ( SMESH::TActorList  theActorList,
SMESH::OrientedPlane thePlane 
)
static
void SMESHGUI_ClippingDlg::ClickOnDelete ( )
slot

SLOT on delete button click: Delete selected clipping plane.

References AutoApplyCheckBox, ClickOnApply(), ComboBoxPlanes, myPlanes, myViewWindow, SMESH::TPlaneData::Plane, SMESH::RenderViewWindow(), and synchronize().

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::ClickOnHelp ( )
slot

SLOT on help button click: opens a help page.

References myHelpFileName, and mySMESHGUI.

Referenced by keyPressEvent(), and SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::ClickOnOk ( )
slot

SLOT on ok button click: sets cutting plane and closes dialog.

References ClickOnApply().

Referenced by SMESHGUI_ClippingDlg().

vtkImplicitPlaneWidget * SMESHGUI_ClippingDlg::createPreviewWidget ( )
private

Create a new widget for preview clipping plane.

References SMESH::GetColor(), myCallback, myViewWindow, and SIZEFACTOR.

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::dumpPlaneData ( ) const
private

Dump the parameters of clipping planes.

References SMESH::TPlaneData::ActorList, myPlanes, and SMESH::TPlaneData::Plane.

SMESH::TActorList SMESHGUI_ClippingDlg::getCurrentActors ( )
private

Get the list of current actors.

References ActorList.

double SMESHGUI_ClippingDlg::getDistance ( ) const
private

Get distance for cutting plane in relative mode.

References SpinSliderDistance.

Referenced by SetCurrentPlaneParam().

double SMESHGUI_ClippingDlg::getRotation1 ( ) const
private

Get rotation1 for cutting plane in relative mode.

References SpinSliderRotation1.

Referenced by absolutePlaneToRelative(), and SetCurrentPlaneParam().

double SMESHGUI_ClippingDlg::getRotation2 ( ) const
private

Get rotation2 for cutting plane in relative mode.

References SpinSliderRotation2.

Referenced by absolutePlaneToRelative(), and SetCurrentPlaneParam().

void SMESHGUI_ClippingDlg::initializePlaneData ( )
private
void SMESHGUI_ClippingDlg::initParam ( )
private
void SMESHGUI_ClippingDlg::keyPressEvent ( QKeyEvent *  e)
protected

Custom handling of events.

References ClickOnHelp().

void SMESHGUI_ClippingDlg::onActorItemChanged ( QListWidgetItem *  theItem)
slot

SLOT: called when actor item was changed.

References SetCurrentPlaneParam(), and updateActorItem().

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::onAutoApply ( bool  toggled)
slot

SLOT: called on Auto Apply check box toggled.

References ClickOnApply().

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::onInvert ( )
slot

SLOT on invert button click: inverts normal of cutting plane.

References ComboBoxPlanes, SMESH::OrientedPlane::IsInvert, myIsSelectPlane, myPlanes, SMESH::TPlaneData::Plane, SetCurrentPlaneParam(), SpinBox_Dx, SpinBox_Dy, and SpinBox_Dz.

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::onIsOpenGLClipping ( bool  toggled)
slot
void SMESHGUI_ClippingDlg::onModeAbsolute ( )
slot

Set absolute mode of clipping plane.

References SMESH::Absolute, ClickOnNew(), CurrentMode, ModeStackedLayout, and SetCurrentPlaneParam().

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::onModeRelative ( )
slot

Set relative mode of clipping plane.

References ClickOnNew(), CurrentMode, ModeStackedLayout, SMESH::Relative, and SetCurrentPlaneParam().

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::OnPreviewToggle ( bool  theIsToggled)
slot
void SMESHGUI_ClippingDlg::onReset ( )
slot

SLOT on reset button click: sets default values.

References myIsSelectPlane, SetCurrentPlaneParam(), SpinBox_X, SpinBox_Y, and SpinBox_Z.

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::onSelectAll ( int  theState)
slot

SLOT: called on SelectAll check box toggled.

References ActorList, SelectAllCheckBox, SetCurrentPlaneParam(), and updateActorItem().

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::onSelectRelativeOrientation ( int  theItem)
slot

SLOT: called on orientation of clipping plane in relative mode changed.

References CBRelativeOrientation, myPlanes, SetCurrentPlaneParam(), TextLabelRotation1, and TextLabelRotation2.

Referenced by onSelectPlane(), and SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::ProcessEvents ( vtkObject *  theObject,
unsigned long  theEvent,
void *  theClientData,
void *  theCallData 
)
staticprotected
void SMESHGUI_ClippingDlg::reject ( )
protectedvirtualslot

SLOT on close button click: rejects dialog.

Referenced by SMESHGUI_ClippingDlg().

void SMESHGUI_ClippingDlg::setBoundsForPreviewWidget ( )
private
void SMESHGUI_ClippingDlg::setDirection ( double  theVal[3])
private

Set coordinates of normal vector in dialog box.

References CBAbsoluteOrientation, SpinBox_Dx, SpinBox_Dy, and SpinBox_Dz.

Referenced by onSelectPlane(), and ProcessEvents().

void SMESHGUI_ClippingDlg::setDistance ( const double  theDistance)
private

Set distance of cutting plane in relative mode.

References SpinSliderDistance.

Referenced by onSelectPlane().

void SMESHGUI_ClippingDlg::setOrigin ( double  theVal[3])
private

Set coordinates of origin point in dialog box.

References CBAbsoluteOrientation, SpinBox_X, SpinBox_Y, and SpinBox_Z.

Referenced by onSelectPlane(), and ProcessEvents().

void SMESHGUI_ClippingDlg::setRotation ( const double  theRot1,
const double  theRot2 
)
private

Set angles of clipping plane in relative mode.

References SpinSliderRotation1, and SpinSliderRotation2.

Referenced by onSelectPlane().

void SMESHGUI_ClippingDlg::updateActorItem ( QListWidgetItem *  theItem,
bool  theUpdateSelectAll,
bool  theUpdateClippingPlaneMap 
)
private
void SMESHGUI_ClippingDlg::updateActorList ( )
private

Field Documentation

QListWidget* SMESHGUI_ClippingDlg::ActorList
private
QCheckBox* SMESHGUI_ClippingDlg::AutoApplyCheckBox
private
QPushButton* SMESHGUI_ClippingDlg::buttonApply
private

Referenced by SMESHGUI_ClippingDlg().

QPushButton* SMESHGUI_ClippingDlg::buttonCancel
private

Referenced by SMESHGUI_ClippingDlg().

QPushButton* SMESHGUI_ClippingDlg::buttonDelete
private
QPushButton* SMESHGUI_ClippingDlg::buttonHelp
private

Referenced by SMESHGUI_ClippingDlg().

QPushButton* SMESHGUI_ClippingDlg::buttonNew
private

Referenced by SMESHGUI_ClippingDlg().

QPushButton* SMESHGUI_ClippingDlg::buttonOk
private

Referenced by SMESHGUI_ClippingDlg().

QComboBox* SMESHGUI_ClippingDlg::CBAbsoluteOrientation
private
QComboBox* SMESHGUI_ClippingDlg::CBRelativeOrientation
private
QGroupBox* SMESHGUI_ClippingDlg::GroupAbsoluteDirection
private

Referenced by SMESHGUI_ClippingDlg().

QGroupBox* SMESHGUI_ClippingDlg::GroupAbsolutePoint
private

Referenced by SMESHGUI_ClippingDlg().

QGroupBox* SMESHGUI_ClippingDlg::GroupRelative
private
QPushButton* SMESHGUI_ClippingDlg::invertButton
private
QCheckBox* SMESHGUI_ClippingDlg::isOpenGLClipping
private
QMenu* SMESHGUI_ClippingDlg::MenuMode
private

Referenced by SMESHGUI_ClippingDlg().

QStackedLayout* SMESHGUI_ClippingDlg::ModeStackedLayout
private
double SMESHGUI_ClippingDlg::myBounds[6]
private
vtkCallbackCommand* SMESHGUI_ClippingDlg::myCallback
private
QString SMESHGUI_ClippingDlg::myHelpFileName
private
bool SMESHGUI_ClippingDlg::myIsPreviewMoved
private
SMESHGUI* SMESHGUI_ClippingDlg::mySMESHGUI
private
QCheckBox* SMESHGUI_ClippingDlg::PreviewCheckBox
private
QPushButton* SMESHGUI_ClippingDlg::resetButton
private
QCheckBox* SMESHGUI_ClippingDlg::SelectAllCheckBox
private
QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Dx
private
QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Dy
private
QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Dz
private
QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_X
private
QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Y
private
QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Z
private
QtxDoubleSpinSlider* SMESHGUI_ClippingDlg::SpinSliderDistance
private
QtxIntSpinSlider* SMESHGUI_ClippingDlg::SpinSliderRotation1
private
QtxIntSpinSlider* SMESHGUI_ClippingDlg::SpinSliderRotation2
private
QLabel* SMESHGUI_ClippingDlg::TextLabelDistance
private

Referenced by SMESHGUI_ClippingDlg().

QLabel* SMESHGUI_ClippingDlg::TextLabelDx
private
QLabel* SMESHGUI_ClippingDlg::TextLabelDy
private
QLabel* SMESHGUI_ClippingDlg::TextLabelDz
private
QLabel* SMESHGUI_ClippingDlg::TextLabelOrientation
private

Referenced by SMESHGUI_ClippingDlg().

QLabel* SMESHGUI_ClippingDlg::TextLabelRotation1
private
QLabel* SMESHGUI_ClippingDlg::TextLabelRotation2
private
QLabel* SMESHGUI_ClippingDlg::TextLabelX
private
QLabel* SMESHGUI_ClippingDlg::TextLabelY
private
QLabel* SMESHGUI_ClippingDlg::TextLabelZ
private