Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OCCViewer_ClippingDlg Class Reference

Dialog allowing to assign parameters of clipping plane.

#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
 

Constructor & Destructor Documentation

OCCViewer_ClippingDlg::~OCCViewer_ClippingDlg ( )

Destructor Destroys the object and frees any allocated resources

References myLocalPlanes.

Member Function Documentation

void OCCViewer_ClippingDlg::ClickOnApply ( )
privateslot

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

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

void OCCViewer_ClippingDlg::ClickOnClose ( )
privateslot

SLOT on close button click: erases preview and rejects dialog

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

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

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

void OCCViewer_ClippingDlg::ClickOnHelp ( )
privateslot

SLOT on help button click: opens a help page

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

void OCCViewer_ClippingDlg::ClickOnNew ( )
privateslot

SLOT on new button click: create a new clipping plane

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

void OCCViewer_ClippingDlg::ClickOnOk ( )
privateslot

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

References ClickOnClose(), and onApply().

int OCCViewer_ClippingDlg::clipPlanesCount ( )
private

References myLocalPlanes.

void OCCViewer_ClippingDlg::closeEvent ( QCloseEvent *  e)
privatevirtual

Custom handling of close event: erases preview

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

OCCViewer_ClipPlane::PlaneMode OCCViewer_ClippingDlg::currentPlaneMode ( ) const
private
void OCCViewer_ClippingDlg::erasePreview ( )
private
OCCViewer_ClipPlane & OCCViewer_ClippingDlg::getClipPlane ( int  theIdx)
private

References myLocalPlanes.

OCCViewer_ClippingDlg::Handle ( V3d_View  )
private
void OCCViewer_ClippingDlg::hideEvent ( QHideEvent *  e)
privatevirtual

Custom handling of hide event: erases preview

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

bool OCCViewer_ClippingDlg::isValid ( )
private

Return true if plane parameters are valid

References SpinBox_Dx, SpinBox_Dy, and SpinBox_Dz.

void OCCViewer_ClippingDlg::onApply ( )
slot

SLOT on Apply button click: sets cutting plane

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

void OCCViewer_ClippingDlg::onAutoApply ( bool  toggled)
privateslot

SLOT: called on Auto Apply check box toggled

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

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

void OCCViewer_ClippingDlg::onModeAbsolute ( )
privateslot

Set absolute mode of clipping plane

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

void OCCViewer_ClippingDlg::onModeRelative ( )
privateslot

Set relative mode of clipping plane

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

void OCCViewer_ClippingDlg::onOrientationAbsoluteChanged ( int  mode)
privateslot
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().

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

SLOT: Called when clip plane is clicked in viewer.

References ComboBoxPlanes, Handle(), and myPreviewPlaneVector.

void OCCViewer_ClippingDlg::onPreview ( bool  on)
privateslot

SLOT: called on preview check box toggled

References displayPreview(), and erasePreview().

void OCCViewer_ClippingDlg::onReset ( )
privateslot

SLOT on reset button click: sets default values

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

void OCCViewer_ClippingDlg::onSelectPlane ( int  theIndex)
privateslot

Set current parameters of selected plane

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

void OCCViewer_ClippingDlg::onValueChanged ( )
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().

void OCCViewer_ClippingDlg::showEvent ( QShowEvent *  e)
privatevirtual

Custom handling of show event: displays preview

References onPreview(), and PreviewCheckBox.

void OCCViewer_ClippingDlg::updateClipping ( )
private

Member Data Documentation

QCheckBox* OCCViewer_ClippingDlg::AutoApplyCheckBox
private
QPushButton* OCCViewer_ClippingDlg::buttonApply
private
QPushButton* OCCViewer_ClippingDlg::buttonClose
private
QPushButton* OCCViewer_ClippingDlg::buttonDelete
private
QPushButton* OCCViewer_ClippingDlg::buttonDisableAll
private
QPushButton* OCCViewer_ClippingDlg::buttonNew
private
QPushButton* OCCViewer_ClippingDlg::buttonOk
private
QComboBox* OCCViewer_ClippingDlg::CBAbsoluteOrientation
private
QComboBox* OCCViewer_ClippingDlg::CBRelativeOrientation
private
QComboBox* OCCViewer_ClippingDlg::ComboBoxPlanes
private
QGroupBox* OCCViewer_ClippingDlg::GroupAbsoluteDirection
private
QGroupBox* OCCViewer_ClippingDlg::GroupAbsolutePoint
private
QGroupBox* OCCViewer_ClippingDlg::GroupRelative
private
QPushButton* OCCViewer_ClippingDlg::invertButton
private
QCheckBox* OCCViewer_ClippingDlg::isActivePlane
private
QMenu* OCCViewer_ClippingDlg::MenuMode
private
QStackedLayout* OCCViewer_ClippingDlg::ModeStackedLayout
private
bool OCCViewer_ClippingDlg::myBusy
private
OCCViewer_ClipPlaneInteractor* OCCViewer_ClippingDlg::myInteractor
private
bool OCCViewer_ClippingDlg::myIsPlaneCreation
private
bool OCCViewer_ClippingDlg::myIsSelectPlane
private
bool OCCViewer_ClippingDlg::myIsUpdatingControls
private
ClipPlanesList OCCViewer_ClippingDlg::myLocalPlanes
private
OCCViewer_Viewer* OCCViewer_ClippingDlg::myModel
private
std::vector<Handle(AIS_Plane)> OCCViewer_ClippingDlg::myPreviewPlaneVector
private
QCheckBox* OCCViewer_ClippingDlg::PreviewCheckBox
private
QPushButton* OCCViewer_ClippingDlg::resetButton
private
QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Dx
private
QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Dy
private
QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Dz
private
QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_X
private
QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Y
private
QtxDoubleSpinBox* OCCViewer_ClippingDlg::SpinBox_Z
private
QtxDoubleSpinSlider* OCCViewer_ClippingDlg::SpinSliderDistance
private
QtxIntSpinSlider* OCCViewer_ClippingDlg::SpinSliderRotation1
private
QtxIntSpinSlider* OCCViewer_ClippingDlg::SpinSliderRotation2
private
QLabel* OCCViewer_ClippingDlg::TextLabelDistance
private
QLabel* OCCViewer_ClippingDlg::TextLabelDx
private
QLabel* OCCViewer_ClippingDlg::TextLabelDy
private
QLabel* OCCViewer_ClippingDlg::TextLabelDz
private
QLabel* OCCViewer_ClippingDlg::TextLabelOrientation
private
QLabel* OCCViewer_ClippingDlg::TextLabelRotation1
private
QLabel* OCCViewer_ClippingDlg::TextLabelRotation2
private
QLabel* OCCViewer_ClippingDlg::TextLabelX
private
QLabel* OCCViewer_ClippingDlg::TextLabelY
private
QLabel* OCCViewer_ClippingDlg::TextLabelZ
private

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