The 3D view window It consists out of the 3D view. More...
#include <View3DInventor.h>
Public Slots | |
void | dump (const char *filename) |
void | setCursor (Qt::CursorShape s) |
void | setCursor (const QCursor &) |
override the cursor in this view | |
Public Member Functions | |
bool | eventFilter (QObject *, QEvent *) |
virtual const char * | getName (void) const |
returns the name of the view (important for messages) | |
virtual PyObject * | getPyObject (void) |
This method returns the Python wrapper for a C++ object. | |
virtual Base::Type | getTypeId (void) const |
View3DInventorViewer * | getViewer (void) const |
bool | hasClippingPlane () const |
virtual void | OnChange (ParameterGrp::SubjectType &rCaller, ParameterGrp::MessageType Reason) |
Observer message from the ParameterGrp. | |
virtual bool | onHasMsg (const char *pMsg) const |
Message handler test. | |
virtual bool | onMsg (const char *pMsg, const char **ppReturn) |
Mesage handler. | |
virtual void | onRename (Gui::Document *pDoc) |
get called when the document is updated | |
virtual void | onUpdate (void) |
get called when the document is updated | |
virtual void | print () |
print function of the view | |
virtual void | printPdf () |
virtual void | printPreview () |
void | removeOverlayWidget () |
bool | setCamera (const char *pCamera) |
void | setCurrentViewMode (ViewMode b) |
If b is set to FullScreen the MDI view is displayed in full screen mode, if b is set to TopLevel then it is displayed as an own top-level window, otherwise (Normal) as tabbed window. | |
void | setOverlayWidget (GLOverlayWidget *) |
void | toggleClippingPlane () |
View3DInventor (Gui::Document *pcDocument, QWidget *parent, Qt::WFlags wflags=0) | |
virtual void | viewAll () |
~View3DInventor () | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Protected Slots | |
void | print (QPrinter *) |
void | stopAnimating () |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *e) |
void | customEvent (QEvent *e) |
void | dragEnterEvent (QDragEnterEvent *e) |
void | dropEvent (QDropEvent *e) |
Drops the event e and writes the right Python command. | |
void | focusInEvent (QFocusEvent *e) |
void | keyPressEvent (QKeyEvent *e) |
void | keyReleaseEvent (QKeyEvent *e) |
void | windowStateChanged (MDIView *) |
Protected Attributes | |
ParameterGrp::handle | hGrp |
handle to the viewer parameter group | |
Friends | |
class | View3DPy |
The 3D view window It consists out of the 3D view.
Definition at line 63 of file View3DInventor.h.
View3DInventor::View3DInventor | ( | Gui::Document * | pcDocument, | |
QWidget * | parent, | |||
Qt::WFlags | wflags = 0 | |||
) |
Definition at line 98 of file View3DInventor.cpp.
References draftlibs::fcgeo::connect(), App::GetApplication(), App::Application::GetParameterGroupByPath(), hGrp, OnChange(), and stopAnimating().
View3DInventor::~View3DInventor | ( | ) |
Definition at line 146 of file View3DInventor.cpp.
References hGrp.
void View3DInventor::contextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected] |
Definition at line 923 of file View3DInventor.cpp.
void * Gui::View3DInventor::create | ( | void | ) | [static] |
Reimplemented from Gui::MDIView.
Definition at line 96 of file View3DInventor.cpp.
void View3DInventor::customEvent | ( | QEvent * | e | ) | [protected] |
Definition at line 928 of file View3DInventor.cpp.
References Gui::View3DInventorViewer::setNavigationType(), and Gui::NavigationStyleEvent::style().
void View3DInventor::dragEnterEvent | ( | QDragEnterEvent * | e | ) | [protected] |
Definition at line 816 of file View3DInventor.cpp.
void View3DInventor::dropEvent | ( | QDropEvent * | e | ) | [protected] |
Drops the event e and writes the right Python command.
Definition at line 805 of file View3DInventor.cpp.
References Gui::BaseView::getAppDocument(), Gui::getMainWindow(), and Gui::MainWindow::loadUrls().
void View3DInventor::dump | ( | const char * | filename | ) | [slot] |
Definition at line 758 of file View3DInventor.cpp.
References Gui::View3DInventorViewer::dumpToFile().
Referenced by Gui::View3DInventorPy::dump(), and onMsg().
bool View3DInventor::eventFilter | ( | QObject * | watched, | |
QEvent * | e | |||
) |
Definition at line 862 of file View3DInventor.cpp.
void View3DInventor::focusInEvent | ( | QFocusEvent * | e | ) | [protected] |
Definition at line 918 of file View3DInventor.cpp.
Base::Type Gui::View3DInventor::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Gui::MDIView.
Definition at line 96 of file View3DInventor.cpp.
Referenced by DrawingGui::TaskProjection::accept(), StdCmdToggleNavigation::activated(), CmdPointsPolyCut::activated(), CmdMeshPolySplit::activated(), CmdMeshPolyCut::activated(), CmdMeshAddFacet::activated(), CmdMeshPolySelect::activated(), CmdMeshPolySegm::activated(), Gui::SelectionSingleton::addSelection(), SketcherGui::DrawSketchHandler::applyCursor(), SketcherGui::ViewProviderSketch::draw(), SketcherGui::ViewProviderSketch::getScaleFactor(), SketcherGui::SoZoomTranslation::getScaleFactor(), StdCmdTextureMapping::isActive(), StdCmdMeasureDistance::isActive(), StdCmdToggleNavigation::isActive(), StdViewScreenShot::isActive(), CmdShapeInfo::isActive(), CmdMeshFillInteractiveHole::isActive(), CmdMeshEvaluateFacet::isActive(), CmdMeshPolySplit::isActive(), CmdMeshPolyCut::isActive(), CmdMeshAddFacet::isActive(), CmdMeshPolySelect::isActive(), CmdMeshPolySegm::isActive(), CmdMeshVertexCurvatureInfo::isActive(), CmdInspectElement::isActive(), Gui::SelectionSingleton::rmvPreselect(), Gui::Document::Save(), setCamera(), SketcherGui::DrawSketchHandler::setCursor(), Gui::SelectionSingleton::setPreselect(), SketcherGui::DrawSketchHandler::unsetCursor(), and Gui::ViewProviderDocumentObjectGroup::updateData().
const char * View3DInventor::getName | ( | void | ) | const [virtual] |
returns the name of the view (important for messages)
Reimplemented from Gui::BaseView.
Definition at line 344 of file View3DInventor.cpp.
Referenced by OnChange().
PyObject * View3DInventor::getPyObject | ( | void | ) | [virtual] |
This method returns the Python wrapper for a C++ object.
It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.
The default implementation returns 'None'.
Reimplemented from Base::BaseClass.
Definition at line 176 of file View3DInventor.cpp.
Base::Type Gui::View3DInventor::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Gui::MDIView.
Definition at line 96 of file View3DInventor.cpp.
View3DInventorViewer* Gui::View3DInventor::getViewer | ( | void | ) | const [inline] |
Definition at line 105 of file View3DInventor.h.
Referenced by StdCmdSceneInspector::activated(), StdCmdMeasureDistance::activated(), StdViewBoxZoom::activated(), StdViewZoomOut::activated(), StdViewZoomIn::activated(), StdCmdAxisCross::activated(), StdViewScreenShot::activated(), StdCmdDrawStyle::activated(), StdPerspectiveCamera::activated(), StdOrthographicCamera::activated(), CmdMeshFillInteractiveHole::activated(), CmdMeshRemoveCompByHand::activated(), CmdMeshEvaluateFacet::activated(), CmdMeshVertexCurvatureInfo::activated(), CmdInspectElement::activated(), Gui::View3DInventorPy::addEventCallback(), Gui::View3DInventorPy::addEventCallbackPivy(), Gui::Command::adjustCameraPosition(), Gui::Document::createView(), MeshGui::MeshFaceAddition::finishEditing(), Gui::View3DInventorPy::fitAll(), Gui::View3DInventorPy::getCamera(), Gui::View3DInventorPy::getCameraNode(), Gui::View3DInventorPy::getCameraType(), Gui::Document::getInEdit(), Gui::View3DInventorPy::getNavigationType(), Gui::View3DInventorPy::getObjectInfo(), Gui::View3DInventorPy::getObjectsInfo(), Gui::View3DInventorPy::getPoint(), Gui::View3DInventorPy::getSceneGraph(), Gui::View3DInventorPy::getSize(), Gui::View3DInventorPy::getStereoType(), Gui::View3DInventorPy::getViewDirection(), Gui::View3DInventorPy::getViewer(), StdCmdAxisCross::isActive(), StdPerspectiveCamera::isActive(), StdOrthographicCamera::isActive(), CmdMeshRemoveCompByHand::isActive(), Gui::View3DInventorPy::isAnimationEnabled(), Gui::Dialog::DemoMode::on_angleSlider_valueChanged(), Gui::Dialog::DemoMode::on_playButton_clicked(), CamGui::Cutting::on_SelectFace_button_clicked(), Gui::Dialog::DemoMode::on_speedSlider_valueChanged(), Gui::Dialog::DemoMode::on_stopButton_clicked(), CamGui::Cutting::on_toolpath_calculation_highest_level_button_clicked(), CamGui::Cutting::on_toolpath_calculation_lowest_level_button_clicked(), CamGui::Cutting::on_toolpath_calculation_middle_level_button_clicked(), Gui::Dialog::DemoMode::onAutoPlay(), Gui::Document::removeAnnotationViewProvider(), Gui::View3DInventorPy::removeEventCallback(), Gui::View3DInventorPy::removeEventCallbackPivy(), Gui::Document::resetEdit(), Gui::View3DInventorPy::saveImage(), Gui::View3DInventorPy::saveVectorGraphic(), Gui::View3DInventorPy::setAnimationEnabled(), Gui::Document::setAnnotationViewProvider(), Gui::View3DInventorPy::setCameraOrientation(), Gui::View3DInventorPy::setCameraType(), Gui::Document::setEdit(), Gui::View3DInventorPy::setNavigationType(), Gui::View3DInventorPy::setStereoType(), Gui::Document::slotDeletedObject(), Gui::Document::slotNewObject(), Gui::View3DInventorPy::startAnimating(), MeshGui::MeshFaceAddition::startEditing(), Gui::View3DInventorPy::stopAnimating(), Gui::View3DInventorPy::viewAxometric(), Gui::View3DInventorPy::viewBottom(), Gui::View3DInventorPy::viewFront(), Gui::View3DInventorPy::viewLeft(), Gui::View3DInventorPy::viewPosition(), Gui::View3DInventorPy::viewRear(), Gui::View3DInventorPy::viewRight(), and Gui::View3DInventorPy::viewTop().
bool View3DInventor::hasClippingPlane | ( | ) | const |
Definition at line 726 of file View3DInventor.cpp.
References Gui::View3DInventorViewer::hasClippingPlane().
Referenced by StdCmdToggleClipPlane::activated(), and StdCmdToggleClipPlane::isActive().
void Gui::View3DInventor::init | ( | void | ) | [static] |
Reimplemented from Gui::MDIView.
Definition at line 96 of file View3DInventor.cpp.
Referenced by Gui::Application::initTypes().
void View3DInventor::keyPressEvent | ( | QKeyEvent * | e | ) | [protected] |
Definition at line 883 of file View3DInventor.cpp.
References Gui::MDIView::Child, Gui::MDIView::currentViewMode(), setCurrentViewMode(), and RobotExample::w.
void View3DInventor::keyReleaseEvent | ( | QKeyEvent * | e | ) | [protected] |
Definition at line 906 of file View3DInventor.cpp.
References Gui::MDIView::Child, Gui::MDIView::currentViewMode(), and RobotExample::w.
void View3DInventor::OnChange | ( | ParameterGrp::SubjectType & | rCaller, | |
ParameterGrp::MessageType | Reason | |||
) | [virtual] |
Observer message from the ParameterGrp.
Definition at line 185 of file View3DInventor.cpp.
References SketcherExample::f, Base::Type::fromName(), ParameterGrp::GetASCII(), Gui::View3DInventorViewer::getBacklight(), ParameterGrp::GetBool(), Gui::CADNavigationStyle::getClassTypeId(), ParameterGrp::GetFloat(), ParameterGrp::GetInt(), getName(), ParameterGrp::GetUnsigned(), Py::long, Gui::View3DInventorViewer::navigationStyle(), RobotExample::pos, Gui::View3DInventorViewer::setAnimationEnabled(), Gui::View3DInventorViewer::setBacklight(), Gui::View3DInventorViewer::setCameraType(), Gui::View3DInventorViewer::setEnabledFPSCounter(), Gui::View3DInventorViewer::setFeedbackVisibility(), Gui::View3DInventorViewer::setGradientBackgroud(), Gui::View3DInventorViewer::setGradientBackgroudColor(), Gui::View3DInventorViewer::setNavigationType(), Gui::NavigationStyle::setOrbitStyle(), Gui::NavigationStyle::setZoomInverted(), Py::type(), Py::value(), MovieTool::x, and MovieTool::y.
Referenced by View3DInventor().
bool View3DInventor::onHasMsg | ( | const char * | pMsg | ) | const [virtual] |
Message handler test.
Reimplemented from Gui::MDIView.
Definition at line 601 of file View3DInventor.cpp.
References Gui::BaseView::getAppDocument(), App::Document::getAvailableRedos(), and App::Document::getAvailableUndos().
bool View3DInventor::onMsg | ( | const char * | pMsg, | |
const char ** | ppReturn | |||
) | [virtual] |
Mesage handler.
Reimplemented from Gui::MDIView.
Definition at line 450 of file View3DInventor.cpp.
References AnimationTexture(), Base::Console(), dump(), SketcherExample::f, Gui::BaseView::getGuiDocument(), LightManip(), Gui::Document::redo(), Gui::Document::save(), Gui::Document::saveAs(), setCamera(), Gui::View3DInventorViewer::setCameraOrientation(), Gui::View3DInventorViewer::setCameraType(), Gui::View3DInventorViewer::setSceneGraph(), KDL::sqrt(), Texture3D(), Gui::Document::undo(), Gui::View3DInventorViewer::viewAll(), Gui::View3DInventorViewer::viewSelection(), and Gui::SoFCDB::writeNodesToString().
Referenced by Gui::View3DInventorPy::message().
void View3DInventor::onRename | ( | Gui::Document * | pDoc | ) | [virtual] |
get called when the document is updated
Reimplemented from Gui::BaseView.
Definition at line 322 of file View3DInventor.cpp.
References Gui::Document::getDocument(), and App::Document::getName().
void View3DInventor::onUpdate | ( | void | ) | [virtual] |
get called when the document is updated
Reimplemented from Gui::BaseView.
Definition at line 330 of file View3DInventor.cpp.
References Base::Console().
void View3DInventor::print | ( | QPrinter * | printer | ) | [protected, slot] |
Definition at line 385 of file View3DInventor.cpp.
References Gui::SoSVGVectorOutput::closeFile(), Gui::SoFCVectorizeSVGAction::getSVGOutput(), Base::FileInfo::getTempFileName(), Gui::SoSVGVectorOutput::openFile(), draftTools::p, Gui::View3DInventorViewer::saveGraphic(), Gui::View3DInventorViewer::savePicture(), and Gui::View3DInventorViewer::White.
void View3DInventor::print | ( | ) | [virtual] |
print function of the view
Reimplemented from Gui::MDIView.
Definition at line 349 of file View3DInventor.cpp.
Referenced by printPdf(), and printPreview().
void View3DInventor::printPdf | ( | ) | [virtual] |
Reimplemented from Gui::MDIView.
Definition at line 360 of file View3DInventor.cpp.
References draftlibs::dxfReader::filename, Gui::FileDialog::getSaveFileName(), and print().
void View3DInventor::printPreview | ( | ) | [virtual] |
Reimplemented from Gui::MDIView.
Definition at line 372 of file View3DInventor.cpp.
References draftlibs::fcgeo::connect(), and print().
void View3DInventor::removeOverlayWidget | ( | ) |
Definition at line 741 of file View3DInventor.cpp.
Referenced by setOverlayWidget().
bool View3DInventor::setCamera | ( | const char * | pCamera | ) |
Definition at line 660 of file View3DInventor.cpp.
References getClassTypeId(), importDAE::read(), and Gui::View3DInventorViewer::setCameraType().
Referenced by onMsg(), and Gui::View3DInventorPy::setCamera().
void View3DInventor::setCurrentViewMode | ( | ViewMode | b | ) | [virtual] |
If b is set to FullScreen the MDI view is displayed in full screen mode, if b is set to TopLevel then it is displayed as an own top-level window, otherwise (Normal) as tabbed window.
This method is reimplemented from MDIView to set the this widget as the proxy of the embedded GL widget to get all key events in TopLevel or Fullscreen mode.
Reimplemented from Gui::MDIView.
Definition at line 826 of file View3DInventor.cpp.
References Gui::MDIView::Child, Gui::MDIView::currentViewMode(), and Gui::getMainWindow().
Referenced by keyPressEvent(), and Gui::Dialog::DemoMode::on_fullscreen_toggled().
void View3DInventor::setCursor | ( | Qt::CursorShape | s | ) | [slot] |
Definition at line 753 of file View3DInventor.cpp.
void View3DInventor::setCursor | ( | const QCursor & | aCursor | ) | [slot] |
override the cursor in this view
Definition at line 748 of file View3DInventor.cpp.
void View3DInventor::setOverlayWidget | ( | GLOverlayWidget * | widget | ) |
Definition at line 731 of file View3DInventor.cpp.
References removeOverlayWidget(), Gui::GLOverlayWidget::setImage(), and RobotExample::w.
void View3DInventor::stopAnimating | ( | void | ) | [protected, slot] |
Definition at line 797 of file View3DInventor.cpp.
References Gui::View3DInventorViewer::stopAnimating().
Referenced by View3DInventor().
void View3DInventor::toggleClippingPlane | ( | ) |
Definition at line 721 of file View3DInventor.cpp.
References Gui::View3DInventorViewer::toggleClippingPlane().
Referenced by StdCmdToggleClipPlane::activated().
void View3DInventor::viewAll | ( | ) | [virtual] |
Reimplemented from Gui::MDIView.
Definition at line 339 of file View3DInventor.cpp.
References Gui::View3DInventorViewer::viewAll().
void View3DInventor::windowStateChanged | ( | MDIView * | view | ) | [protected] |
Definition at line 770 of file View3DInventor.cpp.
References hGrp.
friend class View3DPy [friend] |
Definition at line 141 of file View3DInventor.h.
ParameterGrp::handle Gui::View3DInventor::hGrp [protected] |
handle to the viewer parameter group
Definition at line 132 of file View3DInventor.h.
Referenced by View3DInventor(), windowStateChanged(), and ~View3DInventor().