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 PyObject * | getPyObject (void) |
This method returns the Python wrapper for a C++ object. More... | |
View3DInventorViewer * | getViewer (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 PyObject * | getPyObject () |
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::Document * | getGuiDocument () const |
returns the document the view is attached to More... | |
App::Document * | getAppDocument () 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 PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId () const |
bool | isDerivedFrom (const Type type) const |
BaseClass & | operator= (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 | |
PyObject * | pythonObject |
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) |
The 3D view window It consists out of the 3D view.
View3DInventor::View3DInventor | ( | Gui::Document * | pcDocument, |
QWidget * | parent, | ||
const QtGLWidget * | sharewidget = nullptr , |
||
Qt::WindowFlags | wflags = Qt::WindowFlags() |
||
) |
View3DInventor::~View3DInventor | ( | ) |
References Base::Subject< _MessageType >::Detach(), hGrp, and Gui::SoFCDB::writeNodesToString().
|
virtual |
containsViewProvider Checks if the given view provider is part of this view. The default implementation returns false.
Reimplemented from Gui::MDIView.
|
protected |
|
protected |
|
virtual |
|
protected |
|
protected |
Drops the event e and writes the right Python command.
References Gui::BaseView::getAppDocument(), Gui::getMainWindow(), and Gui::MainWindow::loadUrls().
|
slot |
Referenced by Gui::View3DInventorPy::dump(), and onMsg().
|
protected |
|
virtual |
returns the name of the view (important for messages)
Reimplemented from Gui::BaseView.
Referenced by OnChange().
|
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.
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().
bool View3DInventor::hasClippingPlane | ( | ) | const |
|
protected |
|
protected |
|
virtual |
Observer message from the ParameterGrp.
References Gui::NavigationStyle::BoundingBoxCenter, Gui::NavigationStyle::FocalPointAtCursor, Base::Type::fromName(), ParameterGrp::GetASCII(), ParameterGrp::GetBool(), Base::BaseClass::getClassTypeId(), ParameterGrp::GetFloat(), ParameterGrp::GetInt(), getName(), ParameterGrp::GetUnsigned(), Gui::NavigationStyle::ScenePointAtCursor, and Gui::NavigationStyle::WindowCenter.
|
virtual |
|
virtual |
Message handler.
Reimplemented from Gui::MDIView.
References Gui::Camera::Bottom, dump(), Gui::Camera::Front, Gui::BaseView::getGuiDocument(), Gui::Camera::Isometric, Gui::Camera::Left, Gui::Camera::Rear, Gui::Document::redo(), Gui::Camera::Right, Gui::Camera::rotation(), Gui::Document::save(), Gui::Document::saveAs(), Gui::Document::saveCopy(), setCamera(), Gui::Camera::Top, Gui::Document::undo(), and Gui::SoFCDB::writeNodesToString().
Referenced by Gui::Document::createView().
|
virtual |
get called when the document is updated
Reimplemented from Gui::BaseView.
References Gui::Document::getDocument(), and App::Document::getName().
|
virtual |
get called when the document is updated
Reimplemented from Gui::BaseView.
References Base::Console(), and Base::ConsoleSingleton::Log().
|
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().
|
virtual |
Reimplemented from Gui::MDIView.
|
virtual |
Print to PDF file.
Reimplemented from Gui::MDIView.
References Gui::FileDialog::getSaveFileName(), and print().
|
virtual |
Show a preview dialog.
Reimplemented from Gui::MDIView.
References draftgeoutils.intersections::connect(), print(), Gui::MDIView::restorePrinterSettings(), and Gui::MDIView::savePrinterSettings().
void View3DInventor::removeOverlayWidget | ( | ) |
Referenced by setOverlayWidget().
|
slot |
bool View3DInventor::setCamera | ( | const char * | pCamera | ) |
Referenced by onMsg(), and Gui::View3DInventorPy::setCamera().
|
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().
void View3DInventor::setOverlayWidget | ( | QWidget * | widget | ) |
References removeOverlayWidget().
|
slot |
override the cursor in this view
|
protectedslot |
void View3DInventor::toggleClippingPlane | ( | ) |
|
virtual |
Reimplemented from Gui::MDIView.
Referenced by Gui::Application::sExport().
|
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.
|
friend |
|
protected |
handle to the viewer parameter group
Referenced by customEvent(), windowStateChanged(), and ~View3DInventor().