Version: 9.12.0
OCCViewer_ClippingDlg Class Reference

Dialog allowing to assign parameters of clipping plane. More...

#include <OCCViewer_ClippingDlg.h>

Inheritance diagram for OCCViewer_ClippingDlg:
Inheritance graph

Public Slots

void onApply ()
 

Public Member Functions

 OCCViewer_ClippingDlg (OCCViewer_ViewWindow *parrent, OCCViewer_Viewer *model)
 
 ~OCCViewer_ClippingDlg ()
 
void synchronize ()
 
void SetCurrentPlaneParam ()
 

Private Slots

void ClickOnNew ()
 
void ClickOnDelete ()
 
void ClickOnDisableAll ()
 
void ClickOnOk ()
 
void ClickOnApply ()
 
void ClickOnClose ()
 
void ClickOnHelp ()
 
void onModeAbsolute ()
 
void onModeRelative ()
 
void onValueChanged ()
 
void onSelectPlane (int)
 
void onReset ()
 
void onInvert ()
 
void onOrientationAbsoluteChanged (int)
 
void onOrientationRelativeChanged (int)
 
void onPreview (bool on)
 
void onAutoApply (bool)
 
void onPlaneClicked (const Handle_AIS_Plane &thePlane)
 
void onPlaneDragged (const Handle_AIS_Plane &thePlane)
 

Private Member Functions

virtual void closeEvent (QCloseEvent *e)
 
virtual void showEvent (QShowEvent *)
 
virtual void hideEvent (QHideEvent *)
 
void initParam ()
 
void setPlaneParam (OCCViewer_ClipPlane &thePlane)
 
void displayPreview ()
 
void erasePreview ()
 
void updatePreview ()
 
bool isValid ()
 
void updateClipping ()
 
void updateControls ()
 
OCCViewer_ClipPlanegetClipPlane (int)
 
int clipPlanesCount ()
 
OCCViewer_ClipPlane::PlaneMode currentPlaneMode () const
 
 Handle (V3d_View) myView3d
 

Private Attributes

QComboBoxComboBoxPlanes
 
QCheckBox * isActivePlane
 
QPushButton * buttonNew
 
QMenuMenuMode
 
QPushButton * buttonDelete
 
QPushButton * buttonDisableAll
 
QStackedLayout * ModeStackedLayout
 
QGroupBoxGroupAbsolutePoint
 
QLabelTextLabelX
 
QLabelTextLabelY
 
QLabelTextLabelZ
 
QtxDoubleSpinBoxSpinBox_X
 
QtxDoubleSpinBoxSpinBox_Y
 
QtxDoubleSpinBoxSpinBox_Z
 
QPushButton * resetButton
 
QGroupBoxGroupAbsoluteDirection
 
QLabelTextLabelDx
 
QLabelTextLabelDy
 
QLabelTextLabelDz
 
QtxDoubleSpinBoxSpinBox_Dx
 
QtxDoubleSpinBoxSpinBox_Dy
 
QtxDoubleSpinBoxSpinBox_Dz
 
QPushButton * invertButton
 
QComboBoxCBAbsoluteOrientation
 
QGroupBoxGroupRelative
 
QLabelTextLabelOrientation
 
QLabelTextLabelDistance
 
QLabelTextLabelRotation1
 
QLabelTextLabelRotation2
 
QtxDoubleSpinSliderSpinSliderDistance
 
QtxIntSpinSliderSpinSliderRotation1
 
QtxIntSpinSliderSpinSliderRotation2
 
QComboBoxCBRelativeOrientation
 
QCheckBox * PreviewCheckBox
 
QCheckBox * AutoApplyCheckBox
 
QPushButton * buttonOk
 
QPushButton * buttonApply
 
QPushButton * buttonClose
 
OCCViewer_ViewermyModel
 
std::vector< Handle(AIS_Plane)> myPreviewPlaneVector
 
bool myIsSelectPlane
 
bool myIsUpdatingControls
 
bool myBusy
 
bool myIsPlaneCreation
 
ClipPlanesList myLocalPlanes
 
OCCViewer_ClipPlaneInteractormyInteractor
 

Detailed Description

Dialog allowing to assign parameters of clipping plane.

Constructor & Destructor Documentation

◆ OCCViewer_ClippingDlg()

◆ ~OCCViewer_ClippingDlg()

OCCViewer_ClippingDlg::~OCCViewer_ClippingDlg ( )

Destructor Destroys the object and frees any allocated resources

References myLocalPlanes.

Member Function Documentation

◆ ClickOnApply

void OCCViewer_ClippingDlg::ClickOnApply ( )
privateslot

SLOT on Apply button click: sets cutting plane and update viewer

References myModel, onApply(), and OCCViewer_Viewer::update().

◆ ClickOnClose

void OCCViewer_ClippingDlg::ClickOnClose ( )
privateslot

SLOT on close button click: erases preview and rejects dialog

References erasePreview(), and OCCViewer_ViewWindow::onClipping().

◆ ClickOnDelete

void OCCViewer_ClippingDlg::ClickOnDelete ( )
privateslot

SLOT on delete button click: Delete selected clipping plane

References AutoApplyCheckBox, clipPlanesCount(), ComboBoxPlanes, Handle(), myLocalPlanes, myModel, myPreviewPlaneVector, onApply(), synchronize(), and OCCViewer_Viewer::update().

◆ ClickOnDisableAll

void OCCViewer_ClippingDlg::ClickOnDisableAll ( )
privateslot

SLOT on disable all button click: Restore initial state of viewer, erase all clipping planes

References AutoApplyCheckBox, clipPlanesCount(), erasePreview(), getClipPlane(), isActivePlane, OCCViewer_ClipPlane::IsOn, myLocalPlanes, myModel, OCCViewer_Viewer::setClipPlanes(), and OCCViewer_Viewer::update().

◆ ClickOnHelp

void OCCViewer_ClippingDlg::ClickOnHelp ( )
privateslot

SLOT on help button click: opens a help page

References SUIT_Session::activeApplication(), SUIT_Application::onHelpContextModule(), and SUIT_Session::session().

◆ ClickOnNew

void OCCViewer_ClippingDlg::ClickOnNew ( )
privateslot

SLOT on new button click: create a new clipping plane

References initParam(), myIsUpdatingControls, myLocalPlanes, setPlaneParam(), and synchronize().

◆ ClickOnOk

void OCCViewer_ClippingDlg::ClickOnOk ( )
privateslot

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

References ClickOnClose(), and onApply().

◆ clipPlanesCount()

int OCCViewer_ClippingDlg::clipPlanesCount ( )
private

References myLocalPlanes.

◆ closeEvent()

void OCCViewer_ClippingDlg::closeEvent ( QCloseEvent *  e)
privatevirtual

Custom handling of close event: erases preview

References erasePreview(), and OCCViewer_ViewWindow::onClipping().

◆ currentPlaneMode()

OCCViewer_ClipPlane::PlaneMode OCCViewer_ClippingDlg::currentPlaneMode ( ) const
private

◆ displayPreview()

◆ erasePreview()

void OCCViewer_ClippingDlg::erasePreview ( )
private

◆ getClipPlane()

OCCViewer_ClipPlane & OCCViewer_ClippingDlg::getClipPlane ( int  theIdx)
private

References myLocalPlanes.

◆ Handle()

OCCViewer_ClippingDlg::Handle ( V3d_View  )
private

◆ hideEvent()

void OCCViewer_ClippingDlg::hideEvent ( QHideEvent *  e)
privatevirtual

Custom handling of hide event: erases preview

References erasePreview(), and OCCViewer_ViewWindow::onClipping().

◆ initParam()

◆ isValid()

bool OCCViewer_ClippingDlg::isValid ( )
private

Return true if plane parameters are valid

References SpinBox_Dx, SpinBox_Dy, and SpinBox_Dz.

◆ onApply

void OCCViewer_ClippingDlg::onApply ( )
slot

SLOT on Apply button click: sets cutting plane

References myBusy, myIsSelectPlane, myLocalPlanes, myModel, and OCCViewer_Viewer::setClipPlanes().

◆ onAutoApply

void OCCViewer_ClippingDlg::onAutoApply ( bool  toggled)
privateslot

SLOT: called on Auto Apply check box toggled

References myModel, onApply(), and OCCViewer_Viewer::update().

◆ onInvert

void OCCViewer_ClippingDlg::onInvert ( )
privateslot

SLOT on invert button click: inverts normal of cutting plane

References OCCViewer_ClipPlane::AbsoluteOrientation, clipPlanesCount(), ComboBoxPlanes, getClipPlane(), myBusy, SpinBox_Dx, SpinBox_Dy, SpinBox_Dz, and updateClipping().

◆ onModeAbsolute

void OCCViewer_ClippingDlg::onModeAbsolute ( )
privateslot

Set absolute mode of clipping plane

References ClickOnNew(), ModeStackedLayout, myIsPlaneCreation, and updateClipping().

◆ onModeRelative

void OCCViewer_ClippingDlg::onModeRelative ( )
privateslot

Set relative mode of clipping plane

References ClickOnNew(), ModeStackedLayout, myIsPlaneCreation, SetCurrentPlaneParam(), and updateClipping().

◆ onOrientationAbsoluteChanged

void OCCViewer_ClippingDlg::onOrientationAbsoluteChanged ( int  mode)
privateslot

◆ onOrientationRelativeChanged

void OCCViewer_ClippingDlg::onOrientationRelativeChanged ( int  theItem)
privateslot

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

References CBRelativeOrientation, clipPlanesCount(), myIsUpdatingControls, SetCurrentPlaneParam(), TextLabelRotation1, TextLabelRotation2, and updateClipping().

◆ onPlaneClicked

void OCCViewer_ClippingDlg::onPlaneClicked ( const Handle_AIS_Plane &  thePlane)
privateslot

SLOT: Called when clip plane is clicked in viewer.

References ComboBoxPlanes, Handle(), and myPreviewPlaneVector.

◆ onPlaneDragged

◆ onPreview

void OCCViewer_ClippingDlg::onPreview ( bool  on)
privateslot

SLOT: called on preview check box toggled

References displayPreview(), and erasePreview().

◆ onReset

void OCCViewer_ClippingDlg::onReset ( )
privateslot

SLOT on reset button click: sets default values

References myBusy, SetCurrentPlaneParam(), SpinBox_X, SpinBox_Y, SpinBox_Z, and updateClipping().

◆ onSelectPlane

void OCCViewer_ClippingDlg::onSelectPlane ( int  theIndex)
privateslot

Set current parameters of selected plane

References clipPlanesCount(), ComboBoxPlanes, myIsSelectPlane, and updateControls().

◆ onValueChanged

void OCCViewer_ClippingDlg::onValueChanged ( )
privateslot

SLOT: called on value of clipping plane changed

References myIsSelectPlane, myIsUpdatingControls, SetCurrentPlaneParam(), and updateClipping().

◆ SetCurrentPlaneParam()

void OCCViewer_ClippingDlg::SetCurrentPlaneParam ( )

Restore parameters of selected plane

References clipPlanesCount(), ComboBoxPlanes, getClipPlane(), myBusy, myIsSelectPlane, and setPlaneParam().

◆ setPlaneParam()

◆ showEvent()

void OCCViewer_ClippingDlg::showEvent ( QShowEvent *  e)
privatevirtual

Custom handling of show event: displays preview

References onPreview(), and PreviewCheckBox.

◆ synchronize()

◆ updateClipping()

void OCCViewer_ClippingDlg::updateClipping ( )
private

◆ updateControls()

◆ updatePreview()

Member Data Documentation

◆ AutoApplyCheckBox

QCheckBox* OCCViewer_ClippingDlg::AutoApplyCheckBox
private

◆ buttonApply

QPushButton* OCCViewer_ClippingDlg::buttonApply
private

◆ buttonClose

QPushButton* OCCViewer_ClippingDlg::buttonClose
private

◆ buttonDelete

QPushButton* OCCViewer_ClippingDlg::buttonDelete
private

◆ buttonDisableAll

QPushButton* OCCViewer_ClippingDlg::buttonDisableAll
private

◆ buttonNew

QPushButton* OCCViewer_ClippingDlg::buttonNew
private

◆ buttonOk

QPushButton* OCCViewer_ClippingDlg::buttonOk
private

◆ CBAbsoluteOrientation

QComboBox* OCCViewer_ClippingDlg::CBAbsoluteOrientation
private

◆ CBRelativeOrientation

QComboBox* OCCViewer_ClippingDlg::CBRelativeOrientation
private

◆ ComboBoxPlanes

QComboBox* OCCViewer_ClippingDlg::ComboBoxPlanes
private

◆ GroupAbsoluteDirection

QGroupBox* OCCViewer_ClippingDlg::GroupAbsoluteDirection
private

◆ GroupAbsolutePoint

QGroupBox* OCCViewer_ClippingDlg::GroupAbsolutePoint
private

◆ GroupRelative

QGroupBox* OCCViewer_ClippingDlg::GroupRelative
private

◆ invertButton

QPushButton* OCCViewer_ClippingDlg::invertButton
private

◆ isActivePlane

QCheckBox* OCCViewer_ClippingDlg::isActivePlane
private

◆ MenuMode

QMenu* OCCViewer_ClippingDlg::MenuMode
private

◆ ModeStackedLayout

QStackedLayout* OCCViewer_ClippingDlg::ModeStackedLayout
private

◆ myBusy

bool OCCViewer_ClippingDlg::myBusy
private

◆ myInteractor

OCCViewer_ClipPlaneInteractor* OCCViewer_ClippingDlg::myInteractor
private

◆ myIsPlaneCreation

bool OCCViewer_ClippingDlg::myIsPlaneCreation
private

◆ myIsSelectPlane

bool OCCViewer_ClippingDlg::myIsSelectPlane
private

◆ myIsUpdatingControls

bool OCCViewer_ClippingDlg::myIsUpdatingControls
private

◆ myLocalPlanes

ClipPlanesList OCCViewer_ClippingDlg::myLocalPlanes
private

◆ myModel

OCCViewer_Viewer* OCCViewer_ClippingDlg::myModel
private

◆ myPreviewPlaneVector

std::vector<Handle(AIS_Plane)> OCCViewer_ClippingDlg::myPreviewPlaneVector
private

◆ PreviewCheckBox

QCheckBox* OCCViewer_ClippingDlg::PreviewCheckBox
private

◆ resetButton

QPushButton* OCCViewer_ClippingDlg::resetButton
private

◆ SpinBox_Dx

QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Dx
private

◆ SpinBox_Dy

QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Dy
private

◆ SpinBox_Dz

QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Dz
private

◆ SpinBox_X

QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_X
private

◆ SpinBox_Y

QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Y
private

◆ SpinBox_Z

QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Z
private

◆ SpinSliderDistance

QtxDoubleSpinSlider* OCCViewer_ClippingDlg::SpinSliderDistance
private

◆ SpinSliderRotation1

QtxIntSpinSlider* OCCViewer_ClippingDlg::SpinSliderRotation1
private

◆ SpinSliderRotation2

QtxIntSpinSlider* OCCViewer_ClippingDlg::SpinSliderRotation2
private

◆ TextLabelDistance

QLabel* OCCViewer_ClippingDlg::TextLabelDistance
private

◆ TextLabelDx

QLabel* OCCViewer_ClippingDlg::TextLabelDx
private

◆ TextLabelDy

QLabel* OCCViewer_ClippingDlg::TextLabelDy
private

◆ TextLabelDz

QLabel* OCCViewer_ClippingDlg::TextLabelDz
private

◆ TextLabelOrientation

QLabel* OCCViewer_ClippingDlg::TextLabelOrientation
private

◆ TextLabelRotation1

QLabel* OCCViewer_ClippingDlg::TextLabelRotation1
private

◆ TextLabelRotation2

QLabel* OCCViewer_ClippingDlg::TextLabelRotation2
private

◆ TextLabelX

QLabel* OCCViewer_ClippingDlg::TextLabelX
private

◆ TextLabelY

QLabel* OCCViewer_ClippingDlg::TextLabelY
private

◆ TextLabelZ

QLabel* OCCViewer_ClippingDlg::TextLabelZ
private

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