Dialog allowing to assign parameters of clipping plane. More...
#include <OCCViewer_ClippingDlg.h>
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_ClipPlane & | getClipPlane (int) |
int | clipPlanesCount () |
OCCViewer_ClipPlane::PlaneMode | currentPlaneMode () const |
Handle (V3d_View) myView3d | |
Dialog allowing to assign parameters of clipping plane.
OCCViewer_ClippingDlg::OCCViewer_ClippingDlg | ( | OCCViewer_ViewWindow * | parent, |
OCCViewer_Viewer * | model | ||
) |
Constructor
view | - view window |
parent | - parent widget |
References AutoApplyCheckBox, buttonApply, buttonClose, buttonDelete, buttonDisableAll, buttonNew, buttonOk, CBAbsoluteOrientation, CBRelativeOrientation, ClickOnApply(), ClickOnClose(), ClickOnDelete(), ClickOnDisableAll(), ClickOnHelp(), ClickOnOk(), ComboBoxPlanes, QtxDoubleSpinSlider::font(), OCCViewer_Viewer::getClipPlanes(), SUIT_ViewModel::getViewManager(), GroupAbsoluteDirection, GroupAbsolutePoint, initParam(), invertButton, isActivePlane, MenuMode, ModeStackedLayout, myBusy, myInteractor, myIsPlaneCreation, myIsSelectPlane, myIsUpdatingControls, myLocalPlanes, myModel, onAutoApply(), onInvert(), onModeAbsolute(), onModeRelative(), onOrientationAbsoluteChanged(), onOrientationRelativeChanged(), onPlaneClicked(), onPlaneDragged(), onPreview(), onReset(), onSelectPlane(), onValueChanged(), PreviewCheckBox, resetButton, QtxDoubleSpinSlider::setFont(), QtxIntSpinSlider::setFont(), QtxDoubleSpinBox::setPrecision(), QtxDoubleSpinSlider::setPrecision(), QtxIntSpinSlider::setUnit(), SpinBox_Dx, SpinBox_Dy, SpinBox_Dz, SpinBox_X, SpinBox_Y, SpinBox_Z, SpinSliderDistance, SpinSliderRotation1, SpinSliderRotation2, synchronize(), TextLabelDistance, TextLabelDx, TextLabelDy, TextLabelDz, TextLabelOrientation, TextLabelRotation1, TextLabelRotation2, TextLabelX, TextLabelY, and TextLabelZ.
OCCViewer_ClippingDlg::~OCCViewer_ClippingDlg | ( | ) |
Destructor Destroys the object and frees any allocated resources
References myLocalPlanes.
|
privateslot |
SLOT on Apply button click: sets cutting plane and update viewer
References myModel, onApply(), and OCCViewer_Viewer::update().
|
privateslot |
SLOT on close button click: erases preview and rejects dialog
References erasePreview(), and OCCViewer_ViewWindow::onClipping().
|
privateslot |
SLOT on delete button click: Delete selected clipping plane
References AutoApplyCheckBox, clipPlanesCount(), ComboBoxPlanes, Handle(), myLocalPlanes, myModel, myPreviewPlaneVector, onApply(), synchronize(), and OCCViewer_Viewer::update().
|
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().
|
privateslot |
SLOT on help button click: opens a help page
References SUIT_Session::activeApplication(), SUIT_Application::onHelpContextModule(), and SUIT_Session::session().
|
privateslot |
SLOT on new button click: create a new clipping plane
References initParam(), myIsUpdatingControls, myLocalPlanes, setPlaneParam(), and synchronize().
|
privateslot |
SLOT on ok button click: sets cutting plane and closes dialog
References ClickOnClose(), and onApply().
|
private |
References myLocalPlanes.
|
privatevirtual |
Custom handling of close event: erases preview
References erasePreview(), and OCCViewer_ViewWindow::onClipping().
|
private |
References OCCViewer_ClipPlane::Absolute, ModeStackedLayout, and OCCViewer_ClipPlane::Relative.
|
private |
Displays preview of clipping plane
References clipPlaneParams(), clipPlanesCount(), ComboBoxPlanes, getClipPlane(), getMinMaxFromContext(), Handle(), OCCViewer_ClipPlane::IsOn, isValid(), myBusy, myInteractor, myModel, myPreviewPlaneVector, OCCViewer_ClipPlaneInteractor::setEnabled(), OCCViewer_ClipPlaneInteractor::setMinMax(), OCCViewer_ClipPlaneInteractor::setPlanes(), OCCViewer_ClipPlaneInteractor::setRotationCenter(), OCCViewer_Viewer::trihedronSize(), and OCCViewer_Viewer::update().
|
private |
Erases preview of clipping plane
References Handle(), myInteractor, myModel, myPreviewPlaneVector, OCCViewer_ClipPlaneInteractor::setEnabled(), and OCCViewer_Viewer::update().
|
private |
References myLocalPlanes.
|
private |
|
privatevirtual |
Custom handling of hide event: erases preview
References erasePreview(), and OCCViewer_ViewWindow::onClipping().
|
private |
Initialization of initial values of widgets
References CBAbsoluteOrientation, CBRelativeOrientation, isActivePlane, QtxDoubleSpinSlider::setValue(), QtxIntSpinSlider::setValue(), SpinBox_Dx, SpinBox_Dy, SpinBox_Dz, SpinBox_X, SpinBox_Y, SpinBox_Z, SpinSliderDistance, SpinSliderRotation1, and SpinSliderRotation2.
|
private |
Return true if plane parameters are valid
References SpinBox_Dx, SpinBox_Dy, and SpinBox_Dz.
|
slot |
SLOT on Apply button click: sets cutting plane
References myBusy, myIsSelectPlane, myLocalPlanes, myModel, and OCCViewer_Viewer::setClipPlanes().
|
privateslot |
SLOT: called on Auto Apply check box toggled
References myModel, onApply(), and OCCViewer_Viewer::update().
|
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().
|
privateslot |
Set absolute mode of clipping plane
References ClickOnNew(), ModeStackedLayout, myIsPlaneCreation, and updateClipping().
|
privateslot |
Set relative mode of clipping plane
References ClickOnNew(), ModeStackedLayout, myIsPlaneCreation, SetCurrentPlaneParam(), and updateClipping().
|
privateslot |
SLOT: called on orientation of clipping plane in absolute mode changed
References OCCViewer_ClipPlane::AbsoluteOrientation, ComboBoxPlanes, getClipPlane(), myBusy, myIsUpdatingControls, SetCurrentPlaneParam(), SpinBox_Dx, SpinBox_Dy, SpinBox_Dz, SpinBox_X, SpinBox_Y, SpinBox_Z, TextLabelDx, TextLabelDy, TextLabelDz, TextLabelX, TextLabelY, TextLabelZ, and updateClipping().
|
privateslot |
SLOT: called on orientation of clipping plane in relative mode changed
References CBRelativeOrientation, clipPlanesCount(), myIsUpdatingControls, SetCurrentPlaneParam(), TextLabelRotation1, TextLabelRotation2, and updateClipping().
|
privateslot |
SLOT: Called when clip plane is clicked in viewer.
References ComboBoxPlanes, Handle(), and myPreviewPlaneVector.
|
privateslot |
SLOT: Called when clip plane is changed by dragging in viewer.
References OCCViewer_ClipPlane::Absolute, OCCViewer_ClipPlane::AbsoluteCustom, OCCViewer_ClipPlane::AbsoluteOrientation, AutoApplyCheckBox, OCCViewer_ClipPlane::DXYZToRelative(), getClipPlane(), Handle(), OCCViewer_ClipPlane::Mode, myIsUpdatingControls, myPreviewPlaneVector, onApply(), OCCViewer_ClipPlane::OrientationType, OCCViewer_ClipPlane::RelativeOrientation, updateControls(), OCCViewer_ClipPlane::X, OCCViewer_ClipPlane::Y, and OCCViewer_ClipPlane::Z.
|
privateslot |
SLOT: called on preview check box toggled
References displayPreview(), and erasePreview().
|
privateslot |
SLOT on reset button click: sets default values
References myBusy, SetCurrentPlaneParam(), SpinBox_X, SpinBox_Y, SpinBox_Z, and updateClipping().
|
privateslot |
Set current parameters of selected plane
References clipPlanesCount(), ComboBoxPlanes, myIsSelectPlane, and updateControls().
|
privateslot |
SLOT: called on value of clipping plane changed
References myIsSelectPlane, myIsUpdatingControls, SetCurrentPlaneParam(), and updateClipping().
void OCCViewer_ClippingDlg::SetCurrentPlaneParam | ( | ) |
Restore parameters of selected plane
References clipPlanesCount(), ComboBoxPlanes, getClipPlane(), myBusy, myIsSelectPlane, and setPlaneParam().
|
private |
Set plane parameters from widgets.
References OCCViewer_ClipPlane::Absolute, OCCViewer_ClipPlane::AbsoluteCustom, OCCViewer_ClipPlane::AbsoluteOrientation, CBAbsoluteOrientation, CBRelativeOrientation, currentPlaneMode(), DistanceToXYZ(), isActivePlane, OCCViewer_ClipPlane::IsOn, OCCViewer_ClipPlane::Mode, myModel, OCCViewer_ClipPlane::OrientationType, OCCViewer_ClipPlane::RelativeOrientation, OCCViewer_ClipPlane::RelativeToDXYZ(), SpinBox_Dx, SpinBox_Dy, SpinBox_Dz, SpinBox_X, SpinBox_Y, SpinBox_Z, SpinSliderDistance, SpinSliderRotation1, SpinSliderRotation2, OCCViewer_Viewer::trihedronSize(), QtxDoubleSpinSlider::value(), QtxIntSpinSlider::value(), OCCViewer_ClipPlane::X, OCCViewer_ClipPlane::Y, and OCCViewer_ClipPlane::Z.
|
privatevirtual |
Custom handling of show event: displays preview
References onPreview(), and PreviewCheckBox.
void OCCViewer_ClippingDlg::synchronize | ( | ) |
Synchronize dialog's widgets with data
References OCCViewer_ClipPlane::Absolute, CBAbsoluteOrientation, CBRelativeOrientation, ComboBoxPlanes, currentPlaneMode(), initParam(), invertButton, isActivePlane, myLocalPlanes, onSelectPlane(), OCCViewer_ClipPlane::Relative, resetButton, SpinBox_Dx, SpinBox_Dy, SpinBox_Dz, SpinBox_X, SpinBox_Y, SpinBox_Z, SpinSliderDistance, SpinSliderRotation1, and SpinSliderRotation2.
|
private |
Update view after changes
References AutoApplyCheckBox, myModel, onApply(), PreviewCheckBox, OCCViewer_Viewer::update(), and updatePreview().
|
private |
Updates state of user controls.
References OCCViewer_ClipPlane::Absolute, CBAbsoluteOrientation, CBRelativeOrientation, clipPlanesCount(), ComboBoxPlanes, getClipPlane(), initParam(), isActivePlane, OCCViewer_ClipPlane::IsOn, OCCViewer_ClipPlane::Mode, ModeStackedLayout, myModel, onOrientationAbsoluteChanged(), onOrientationRelativeChanged(), OCCViewer_ClipPlane::OrientationToXYZ(), OCCViewer_ClipPlane::OrientationType, OCCViewer_ClipPlane::Relative, OCCViewer_ClipPlane::RelativeOrientation, QtxDoubleSpinSlider::setValue(), QtxIntSpinSlider::setValue(), SpinBox_Dx, SpinBox_Dy, SpinBox_Dz, SpinBox_X, SpinBox_Y, SpinBox_Z, SpinSliderDistance, SpinSliderRotation1, SpinSliderRotation2, OCCViewer_Viewer::trihedronSize(), OCCViewer_ClipPlane::X, XYZToDistance(), OCCViewer_ClipPlane::Y, and OCCViewer_ClipPlane::Z.
|
private |
References clipPlaneParams(), clipPlanesCount(), ComboBoxPlanes, getClipPlane(), getMinMaxFromContext(), Handle(), OCCViewer_ClipPlane::IsOn, isValid(), myBusy, myInteractor, myIsPlaneCreation, myModel, myPreviewPlaneVector, PreviewCheckBox, OCCViewer_ClipPlaneInteractor::setMinMax(), OCCViewer_ClipPlaneInteractor::setPlanes(), OCCViewer_ClipPlaneInteractor::setRotationCenter(), OCCViewer_Viewer::trihedronSize(), and OCCViewer_Viewer::update().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |