Version: 9.16.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]
 
QComboBoxComboBoxPlanes
 
QCheckBox * isOpenGLClipping
 
QPushButton * buttonNew
 
QMenu * MenuMode
 
QPushButton * buttonDelete
 
QListWidget * ActorList
 
QCheckBox * SelectAllCheckBox
 
QStackedLayout * ModeStackedLayout
 
QGroupBoxGroupAbsolutePoint
 
QLabelTextLabelX
 
QLabelTextLabelY
 
QLabelTextLabelZ
 
QtxDoubleSpinBox * SpinBox_X
 
QtxDoubleSpinBox * SpinBox_Y
 
QtxDoubleSpinBox * SpinBox_Z
 
QPushButton * resetButton
 
QGroupBoxGroupAbsoluteDirection
 
QLabelTextLabelDx
 
QLabelTextLabelDy
 
QLabelTextLabelDz
 
QtxDoubleSpinBox * SpinBox_Dx
 
QtxDoubleSpinBox * SpinBox_Dy
 
QtxDoubleSpinBox * SpinBox_Dz
 
QPushButton * invertButton
 
QComboBoxCBAbsoluteOrientation
 
QGroupBoxGroupRelative
 
QLabelTextLabelOrientation
 
QLabelTextLabelDistance
 
QLabelTextLabelRotation1
 
QLabelTextLabelRotation2
 
QtxDoubleSpinSlider * SpinSliderDistance
 
QtxIntSpinSlider * SpinSliderRotation1
 
QtxIntSpinSlider * SpinSliderRotation2
 
QComboBoxCBRelativeOrientation
 
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()

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

◆ absolutePlaneToRelative()

void SMESHGUI_ClippingDlg::absolutePlaneToRelative ( double  theOrigin[3],
double  theDir[3] 
)
private

◆ AddPlane()

◆ ClickOnApply

◆ ClickOnDelete

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

◆ ClickOnHelp

void SMESHGUI_ClippingDlg::ClickOnHelp ( )
slot

SLOT on help button click: opens a help page.

References myHelpFileName, and mySMESHGUI.

Referenced by keyPressEvent(), and SMESHGUI_ClippingDlg().

◆ ClickOnNew

◆ ClickOnOk

void SMESHGUI_ClippingDlg::ClickOnOk ( )
slot

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

References ClickOnApply().

Referenced by SMESHGUI_ClippingDlg().

◆ createPreviewWidget()

vtkImplicitPlaneWidget * SMESHGUI_ClippingDlg::createPreviewWidget ( )
private

Create a new widget for preview clipping plane.

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

Referenced by SMESHGUI_ClippingDlg().

◆ dumpPlaneData()

void SMESHGUI_ClippingDlg::dumpPlaneData ( ) const
private

Dump the parameters of clipping planes.

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

◆ getCurrentActors()

SMESH::TActorList SMESHGUI_ClippingDlg::getCurrentActors ( )
private

Get the list of current actors.

References ActorList.

◆ getDistance()

double SMESHGUI_ClippingDlg::getDistance ( ) const
private

Get distance for cutting plane in relative mode.

References SpinSliderDistance.

Referenced by SetCurrentPlaneParam().

◆ getRotation1()

double SMESHGUI_ClippingDlg::getRotation1 ( ) const
private

Get rotation1 for cutting plane in relative mode.

References SpinSliderRotation1.

Referenced by absolutePlaneToRelative(), and SetCurrentPlaneParam().

◆ getRotation2()

double SMESHGUI_ClippingDlg::getRotation2 ( ) const
private

Get rotation2 for cutting plane in relative mode.

References SpinSliderRotation2.

Referenced by absolutePlaneToRelative(), and SetCurrentPlaneParam().

◆ initializePlaneData()

void SMESHGUI_ClippingDlg::initializePlaneData ( )
private

◆ initParam()

void SMESHGUI_ClippingDlg::initParam ( )
private

◆ keyPressEvent()

void SMESHGUI_ClippingDlg::keyPressEvent ( QKeyEvent *  e)
protected

Custom handling of events.

References ClickOnHelp().

◆ onActorItemChanged

void SMESHGUI_ClippingDlg::onActorItemChanged ( QListWidgetItem *  theItem)
slot

SLOT: called when actor item was changed.

References SetCurrentPlaneParam(), and updateActorItem().

Referenced by SMESHGUI_ClippingDlg().

◆ onAutoApply

void SMESHGUI_ClippingDlg::onAutoApply ( bool  toggled)
slot

SLOT: called on Auto Apply check box toggled.

References ClickOnApply().

Referenced by SMESHGUI_ClippingDlg().

◆ onInvert

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

◆ onIsOpenGLClipping

void SMESHGUI_ClippingDlg::onIsOpenGLClipping ( bool  toggled)
slot

◆ onModeAbsolute

void SMESHGUI_ClippingDlg::onModeAbsolute ( )
slot

Set absolute mode of clipping plane.

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

Referenced by SMESHGUI_ClippingDlg().

◆ onModeRelative

void SMESHGUI_ClippingDlg::onModeRelative ( )
slot

Set relative mode of clipping plane.

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

Referenced by SMESHGUI_ClippingDlg().

◆ OnPreviewToggle

void SMESHGUI_ClippingDlg::OnPreviewToggle ( bool  theIsToggled)
slot

◆ onReset

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

◆ onSelectAbsoluteOrientation

◆ onSelectAll

void SMESHGUI_ClippingDlg::onSelectAll ( int  theState)
slot

SLOT: called on SelectAll check box toggled.

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

Referenced by SMESHGUI_ClippingDlg().

◆ onSelectPlane

◆ onSelectRelativeOrientation

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

◆ ProcessEvents()

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

◆ reject

void SMESHGUI_ClippingDlg::reject ( )
protectedvirtualslot

SLOT on close button click: rejects dialog.

Referenced by SMESHGUI_ClippingDlg().

◆ setBoundsForPreviewWidget()

void SMESHGUI_ClippingDlg::setBoundsForPreviewWidget ( )
private

◆ SetCurrentPlaneParam

◆ setDirection()

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

◆ setDistance()

void SMESHGUI_ClippingDlg::setDistance ( const double  theDistance)
private

Set distance of cutting plane in relative mode.

References SpinSliderDistance.

Referenced by onSelectPlane().

◆ setOrigin()

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

◆ setRotation()

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

◆ synchronize()

◆ updateActorItem()

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

◆ updateActorList()

void SMESHGUI_ClippingDlg::updateActorList ( )
private

Field Documentation

◆ ActorList

QListWidget* SMESHGUI_ClippingDlg::ActorList
private

◆ AutoApplyCheckBox

QCheckBox* SMESHGUI_ClippingDlg::AutoApplyCheckBox
private

◆ buttonApply

QPushButton* SMESHGUI_ClippingDlg::buttonApply
private

Referenced by SMESHGUI_ClippingDlg().

◆ buttonCancel

QPushButton* SMESHGUI_ClippingDlg::buttonCancel
private

Referenced by SMESHGUI_ClippingDlg().

◆ buttonDelete

QPushButton* SMESHGUI_ClippingDlg::buttonDelete
private

◆ buttonHelp

QPushButton* SMESHGUI_ClippingDlg::buttonHelp
private

Referenced by SMESHGUI_ClippingDlg().

◆ buttonNew

QPushButton* SMESHGUI_ClippingDlg::buttonNew
private

Referenced by SMESHGUI_ClippingDlg().

◆ buttonOk

QPushButton* SMESHGUI_ClippingDlg::buttonOk
private

Referenced by SMESHGUI_ClippingDlg().

◆ CBAbsoluteOrientation

QComboBox* SMESHGUI_ClippingDlg::CBAbsoluteOrientation
private

◆ CBRelativeOrientation

◆ ComboBoxPlanes

◆ CurrentMode

◆ GroupAbsoluteDirection

QGroupBox* SMESHGUI_ClippingDlg::GroupAbsoluteDirection
private

Referenced by SMESHGUI_ClippingDlg().

◆ GroupAbsolutePoint

QGroupBox* SMESHGUI_ClippingDlg::GroupAbsolutePoint
private

Referenced by SMESHGUI_ClippingDlg().

◆ GroupRelative

QGroupBox* SMESHGUI_ClippingDlg::GroupRelative
private

◆ invertButton

QPushButton* SMESHGUI_ClippingDlg::invertButton
private

◆ isOpenGLClipping

QCheckBox* SMESHGUI_ClippingDlg::isOpenGLClipping
private

◆ MenuMode

QMenu* SMESHGUI_ClippingDlg::MenuMode
private

Referenced by SMESHGUI_ClippingDlg().

◆ ModeStackedLayout

QStackedLayout* SMESHGUI_ClippingDlg::ModeStackedLayout
private

◆ myBounds

double SMESHGUI_ClippingDlg::myBounds[6]
private

◆ myCallback

vtkCallbackCommand* SMESHGUI_ClippingDlg::myCallback
private

◆ myHelpFileName

QString SMESHGUI_ClippingDlg::myHelpFileName
private

◆ myIsPreviewMoved

bool SMESHGUI_ClippingDlg::myIsPreviewMoved
private

◆ myIsSelectPlane

◆ myPlanes

◆ myPreviewWidget

◆ mySMESHGUI

SMESHGUI* SMESHGUI_ClippingDlg::mySMESHGUI
private

◆ myViewWindow

◆ PreviewCheckBox

QCheckBox* SMESHGUI_ClippingDlg::PreviewCheckBox
private

◆ resetButton

QPushButton* SMESHGUI_ClippingDlg::resetButton
private

◆ SelectAllCheckBox

QCheckBox* SMESHGUI_ClippingDlg::SelectAllCheckBox
private

◆ SpinBox_Dx

QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Dx
private

◆ SpinBox_Dy

QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Dy
private

◆ SpinBox_Dz

QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Dz
private

◆ SpinBox_X

QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_X
private

◆ SpinBox_Y

QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Y
private

◆ SpinBox_Z

QtxDoubleSpinBox* SMESHGUI_ClippingDlg::SpinBox_Z
private

◆ SpinSliderDistance

QtxDoubleSpinSlider* SMESHGUI_ClippingDlg::SpinSliderDistance
private

◆ SpinSliderRotation1

QtxIntSpinSlider* SMESHGUI_ClippingDlg::SpinSliderRotation1
private

◆ SpinSliderRotation2

QtxIntSpinSlider* SMESHGUI_ClippingDlg::SpinSliderRotation2
private

◆ TextLabelDistance

QLabel* SMESHGUI_ClippingDlg::TextLabelDistance
private

Referenced by SMESHGUI_ClippingDlg().

◆ TextLabelDx

QLabel* SMESHGUI_ClippingDlg::TextLabelDx
private

◆ TextLabelDy

QLabel* SMESHGUI_ClippingDlg::TextLabelDy
private

◆ TextLabelDz

QLabel* SMESHGUI_ClippingDlg::TextLabelDz
private

◆ TextLabelOrientation

QLabel* SMESHGUI_ClippingDlg::TextLabelOrientation
private

Referenced by SMESHGUI_ClippingDlg().

◆ TextLabelRotation1

QLabel* SMESHGUI_ClippingDlg::TextLabelRotation1
private

◆ TextLabelRotation2

QLabel* SMESHGUI_ClippingDlg::TextLabelRotation2
private

◆ TextLabelX

QLabel* SMESHGUI_ClippingDlg::TextLabelX
private

◆ TextLabelY

QLabel* SMESHGUI_ClippingDlg::TextLabelY
private

◆ TextLabelZ

QLabel* SMESHGUI_ClippingDlg::TextLabelZ
private