Gui::View3DInventor Class Reference

The 3D view window It consists out of the 3D view. More...

#include <View3DInventor.h>

Public Slots

void dump (const char *filename, bool onlyVisible=false)
 
void restoreOverrideCursor ()
 
void setOverrideCursor (const QCursor &)
 override the cursor in this view More...
 
- Public Slots inherited from Gui::MDIView
virtual void setOverrideCursor (const QCursor &)
 
virtual void restoreOverrideCursor ()
 

Public Member Functions

virtual bool containsViewProvider (const ViewProvider *) const
 containsViewProvider Checks if the given view provider is part of this view. The default implementation returns false. More...
 
virtual void deleteSelf ()
 delete itself More...
 
bool eventFilter (QObject *, QEvent *)
 
virtual const char * getName (void) const
 returns the name of the view (important for messages) More...
 
virtual PyObjectgetPyObject (void)
 This method returns the Python wrapper for a C++ object. More...
 
View3DInventorViewergetViewer (void) const
 
bool hasClippingPlane () const
 
virtual void OnChange (ParameterGrp::SubjectType &rCaller, ParameterGrp::MessageType Reason)
 Observer message from the ParameterGrp. More...
 
virtual bool onHasMsg (const char *pMsg) const
 Message handler test. More...
 
virtual bool onMsg (const char *pMsg, const char **ppReturn)
 Message handler. More...
 
virtual void onRename (Gui::Document *pDoc)
 get called when the document is updated More...
 
virtual void onUpdate (void)
 get called when the document is updated More...
 
virtual void print ()
 print function of the view More...
 
virtual void print (QPrinter *)
 
virtual void printPdf ()
 Print to PDF file. More...
 
virtual void printPreview ()
 Show a preview dialog. More...
 
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. More...
 
void setOverlayWidget (QWidget *)
 
void toggleClippingPlane ()
 
 View3DInventor (Gui::Document *pcDocument, QWidget *parent, const QtGLWidget *sharewidget=nullptr, Qt::WindowFlags wflags=Qt::WindowFlags())
 
virtual void viewAll ()
 
 ~View3DInventor ()
 
- Public Member Functions inherited from Gui::MDIView
virtual bool canClose (void)
 overwrite when checking on close state More...
 
virtual void deleteSelf ()
 delete itself More...
 
virtual PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
 MDIView (Gui::Document *pcDocument, QWidget *parent, Qt::WindowFlags wflags=Qt::WindowFlags())
 View constructor Attach the view to the given document. More...
 
virtual bool onHasMsg (const char *pMsg) const
 Message handler test. More...
 
virtual bool onMsg (const char *pMsg, const char **ppReturn)
 Message handler. More...
 
virtual void onRelabel (Gui::Document *pDoc)
 get called when the document is updated More...
 
virtual void viewAll ()
 
 ~MDIView ()
 View destructor Detach the view from the document, if attached. More...
 
virtual QStringList undoActions () const
 
virtual QStringList redoActions () const
 
QSize minimumSizeHint () const
 
ViewMode currentViewMode () const
 
template<typename _T >
_T getActiveObject (const char *name, App::DocumentObject **parent=nullptr, std::string *subname=nullptr) const
 access getter for the active object list More...
 
void setActiveObject (App::DocumentObject *o, const char *n, const char *subname=nullptr)
 
bool hasActiveObject (const char *n) const
 
bool isActiveObject (App::DocumentObject *o, const char *n, const char *subname=nullptr) const
 
void savePrinterSettings (QPrinter *printer)
 Save the printer configuration. More...
 
void restorePrinterSettings (QPrinter *printer)
 Restore the printer configuration. More...
 
- Public Member Functions inherited from Gui::BaseView
 BaseView (Gui::Document *pcDocument=nullptr)
 View constructor Attach the view to the given document. More...
 
virtual ~BaseView ()
 View destructor Detach the view from the document, if attached! More...
 
void setDocument (Gui::Document *pcDocument)
 sets the view to another document (called by Application) More...
 
void onClose (void)
 is sent from the document in order to close the document More...
 
Gui::DocumentgetGuiDocument () const
 returns the document the view is attached to More...
 
App::DocumentgetAppDocument () const
 returns the document the view is attached to More...
 
bool isPassive (void) const
 indicates if the view is in passive mode More...
 
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction. More...
 
 BaseClass (const BaseClass &)=default
 
virtual PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
virtual Type getTypeId () const
 
bool isDerivedFrom (const Type type) const
 
BaseClassoperator= (const BaseClass &)=default
 
virtual void setPyObject (PyObject *)
 
virtual ~BaseClass ()
 Destruction. More...
 

Protected Slots

void stopAnimating ()
 
- Protected Slots inherited from Gui::MDIView

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. More...
 
void focusInEvent (QFocusEvent *e)
 
void keyPressEvent (QKeyEvent *e)
 
void keyReleaseEvent (QKeyEvent *e)
 
void windowStateChanged (MDIView *)
 This method gets called from the main window this view is attached to whenever the window state of the active view changes. More...
 
- Protected Member Functions inherited from Gui::MDIView
void closeEvent (QCloseEvent *e)
 
void changeEvent (QEvent *e)
 

Protected Attributes

ParameterGrp::handle hGrp
 handle to the viewer parameter group More...
 
- Protected Attributes inherited from Gui::MDIView
PyObjectpythonObject
 
- Protected Attributes inherited from Gui::BaseView
bool bIsDetached
 
bool bIsPassive
 

Friends

class View3DPy
 

Additional Inherited Members

- Public Types inherited from Gui::MDIView
enum  ViewMode { Child , TopLevel , FullScreen }
 MDI view mode enum. More...
 
- Signals inherited from Gui::MDIView
void message (const QString &, int)
 
- Static Public Member Functions inherited from Base::BaseClass
static void * create ()
 
static Type getClassTypeId ()
 
static void init ()
 
- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr)
 

Detailed Description

The 3D view window It consists out of the 3D view.

Author
Juergen Riegel

Constructor & Destructor Documentation

◆ View3DInventor()

View3DInventor::View3DInventor ( Gui::Document pcDocument,
QWidget parent,
const QtGLWidget sharewidget = nullptr,
Qt::WindowFlags  wflags = Qt::WindowFlags() 
)

◆ ~View3DInventor()

View3DInventor::~View3DInventor ( )

Member Function Documentation

◆ containsViewProvider()

bool View3DInventor::containsViewProvider ( const ViewProvider ) const
virtual

containsViewProvider Checks if the given view provider is part of this view. The default implementation returns false.

Returns
bool

Reimplemented from Gui::MDIView.

◆ contextMenuEvent()

void View3DInventor::contextMenuEvent ( QContextMenuEvent *  e)
protected

◆ customEvent()

◆ deleteSelf()

void View3DInventor::deleteSelf ( )
virtual

delete itself

Reimplemented from Gui::MDIView.

References Gui::MDIView::deleteSelf().

◆ dragEnterEvent()

void View3DInventor::dragEnterEvent ( QDragEnterEvent *  e)
protected

◆ dropEvent()

void View3DInventor::dropEvent ( QDropEvent *  e)
protected

Drops the event e and writes the right Python command.

References Gui::BaseView::getAppDocument(), Gui::getMainWindow(), and Gui::MainWindow::loadUrls().

◆ dump

void View3DInventor::dump ( const char *  filename,
bool  onlyVisible = false 
)
slot

◆ eventFilter()

bool View3DInventor::eventFilter ( QObject watched,
QEvent e 
)

◆ focusInEvent()

void View3DInventor::focusInEvent ( QFocusEvent *  e)
protected

◆ getName()

const char * View3DInventor::getName ( void  ) const
virtual

returns the name of the view (important for messages)

Reimplemented from Gui::BaseView.

Referenced by OnChange().

◆ getPyObject()

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 Gui::MDIView.

◆ getViewer()

View3DInventorViewer * Gui::View3DInventor::getViewer ( void  ) const

Referenced by StdCmdAlignment::activated(), Gui::View3DInventorPy::addEventCallback(), Gui::View3DInventorPy::addEventCallbackPivy(), Gui::View3DInventorPy::boxZoom(), Gui::Document::cloneView(), TechDrawGui::Grabber3d::copyActiveViewToSvgFile(), Gui::Document::createView(), Gui::MainWindow::event(), Gui::View3DInventorPy::fitAll(), Gui::View3DInventorPy::getCamera(), Gui::View3DInventorPy::getCameraNode(), Gui::View3DInventorPy::getCameraOrientation(), Gui::View3DInventorPy::getCameraType(), Gui::View3DInventorPy::getCornerCrossSize(), Gui::Document::getInEdit(), Gui::View3DInventorPy::getNavigationType(), Gui::View3DInventorPy::getObjectInfo(), Gui::View3DInventorPy::getObjectsInfo(), Gui::View3DInventorPy::getPointOnFocalPlane(), Gui::View3DInventorPy::getPointOnScreen(), Gui::View3DInventorPy::getSceneGraph(), Gui::View3DInventorPy::getSize(), Gui::View3DInventorPy::getViewDirection(), Gui::View3DInventorPy::getViewer(), Gui::View3DInventorPy::getViewProvidersOfType(), Gui::View3DInventorPy::hasAxisCross(), Gui::View3DInventorPy::isAnimationEnabled(), Gui::View3DInventorPy::isCornerCrossVisible(), Gui::View3DInventorPy::isPopupMenuEnabled(), Gui::View3DInventorPy::projectPointToLine(), Gui::View3DInventorPy::redraw(), Gui::Document::removeAnnotationViewProvider(), Gui::View3DInventorPy::removeEventCallback(), Gui::View3DInventorPy::removeEventCallbackPivy(), Gui::Document::Save(), Gui::View3DInventorPy::saveImage(), Gui::View3DInventorPy::saveVectorGraphic(), Gui::View3DInventorPy::setAnimationEnabled(), Gui::Document::setAnnotationViewProvider(), Gui::View3DInventorPy::setAxisCross(), Gui::View3DInventorPy::setCameraOrientation(), Gui::View3DInventorPy::setCameraType(), Gui::View3DInventorPy::setCornerCrossSize(), Gui::View3DInventorPy::setCornerCrossVisible(), Gui::Document::setEdit(), Gui::Document::setEditingTransform(), Gui::View3DInventorPy::setNavigationType(), Gui::View3DInventorPy::setPopupMenuEnabled(), Gui::View3DInventorPy::setStereoType(), Gui::View3DInventorPy::setViewDirection(), Gui::Document::slotDeletedObject(), Gui::Document::slotNewObject(), Gui::View3DInventorPy::startAnimating(), Gui::View3DInventorPy::stopAnimating(), Gui::View3DInventorPy::toggleClippingPlane(), Gui::Document::toggleInSceneGraph(), StdCmdDrawStyle::updateIcon(), Gui::View3DInventorPy::viewBottom(), Gui::View3DInventorPy::viewDefaultOrientation(), Gui::View3DInventorPy::viewDimetric(), Gui::View3DInventorPy::viewFront(), Gui::View3DInventorPy::viewIsometric(), Gui::View3DInventorPy::viewLeft(), Gui::View3DInventorPy::viewPosition(), Gui::View3DInventorPy::viewRear(), Gui::View3DInventorPy::viewRight(), Gui::View3DInventorPy::viewRotateLeft(), Gui::View3DInventorPy::viewRotateRight(), Gui::View3DInventorPy::viewTop(), Gui::View3DInventorPy::viewTrimetric(), Gui::View3DInventorPy::zoomIn(), and Gui::View3DInventorPy::zoomOut().

◆ hasClippingPlane()

bool View3DInventor::hasClippingPlane ( ) const

◆ keyPressEvent()

void View3DInventor::keyPressEvent ( QKeyEvent *  e)
protected

◆ keyReleaseEvent()

void View3DInventor::keyReleaseEvent ( QKeyEvent *  e)
protected

◆ OnChange()

◆ onHasMsg()

bool View3DInventor::onHasMsg ( const char *  pMsg) const
virtual

Message handler test.

Reimplemented from Gui::MDIView.

References Gui::BaseView::getAppDocument().

◆ onMsg()

◆ onRename()

void View3DInventor::onRename ( Gui::Document pDoc)
virtual

get called when the document is updated

Reimplemented from Gui::BaseView.

References Gui::Document::getDocument(), and App::Document::getName().

◆ onUpdate()

void View3DInventor::onUpdate ( void  )
virtual

get called when the document is updated

Reimplemented from Gui::BaseView.

References Base::Console(), and Base::ConsoleSingleton::Log().

◆ print() [1/2]

void View3DInventor::print ( )
virtual

print function of the view

Reimplemented from Gui::MDIView.

References print(), Gui::MDIView::restorePrinterSettings(), and Gui::MDIView::savePrinterSettings().

Referenced by print(), printPdf(), and printPreview().

◆ print() [2/2]

void View3DInventor::print ( QPrinter *  printer)
virtual

Reimplemented from Gui::MDIView.

◆ printPdf()

void View3DInventor::printPdf ( )
virtual

Print to PDF file.

Reimplemented from Gui::MDIView.

References Gui::FileDialog::getSaveFileName(), and print().

◆ printPreview()

void View3DInventor::printPreview ( )
virtual

◆ removeOverlayWidget()

void View3DInventor::removeOverlayWidget ( )

Referenced by setOverlayWidget().

◆ restoreOverrideCursor

void View3DInventor::restoreOverrideCursor ( )
slot

◆ setCamera()

bool View3DInventor::setCamera ( const char *  pCamera)

◆ setCurrentViewMode()

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.

References Gui::MDIView::Child, Gui::MDIView::currentViewMode(), Gui::getMainWindow(), and Gui::MDIView::setCurrentViewMode().

◆ setOverlayWidget()

void View3DInventor::setOverlayWidget ( QWidget widget)

References removeOverlayWidget().

◆ setOverrideCursor

void View3DInventor::setOverrideCursor ( const QCursor &  aCursor)
slot

override the cursor in this view

◆ stopAnimating

void View3DInventor::stopAnimating ( )
protectedslot

◆ toggleClippingPlane()

void View3DInventor::toggleClippingPlane ( )

◆ viewAll()

void View3DInventor::viewAll ( )
virtual

Reimplemented from Gui::MDIView.

Referenced by Gui::Application::sExport().

◆ windowStateChanged()

void View3DInventor::windowStateChanged ( MDIView )
protectedvirtual

This method gets called from the main window this view is attached to whenever the window state of the active view changes.

The default implementation does nothing.

Reimplemented from Gui::MDIView.

References ParameterGrp::GetInt(), and hGrp.

Friends And Related Function Documentation

◆ View3DPy

friend class View3DPy
friend

Member Data Documentation

◆ hGrp

ParameterGrp::handle Gui::View3DInventor::hGrp
protected

handle to the viewer parameter group

Referenced by customEvent(), windowStateChanged(), and ~View3DInventor().


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