#include <MDIViewPage.h>
Public Slots | |
void | onTimer () |
void | saveDXF (void) |
void | savePDF (void) |
void | saveSVG (void) |
void | sceneSelectionChanged () |
update Tree Selection from QGraphicsScene selection More... | |
void | toggleFrame (void) |
void | toggleKeepUpdated (void) |
void | viewAll () |
Public Slots inherited from Gui::MDIView | |
virtual void | setOverrideCursor (const QCursor &) |
virtual void | restoreOverrideCursor () |
Public Member Functions | |
void | addChildrenToPage (void) |
bool | addView (const App::DocumentObject *obj) |
void | attachTemplate (TechDraw::DrawTemplate *obj) |
void | blockSelection (bool isBlocked) |
void | centerOnPage (void) |
void | clearSceneSelection () |
void | fixOrphans (bool force=false) |
PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
QGVPage * | getQGVPage (void) |
QPointF | getTemplateCenter (TechDraw::DrawTemplate *obj) |
void | matchSceneRectToTemplate (void) |
MDIViewPage (ViewProviderPage *page, Gui::Document *doc, QWidget *parent=0) | |
bool | onHasMsg (const char *pMsg) const |
Message handler test. More... | |
bool | onMsg (const char *pMsg, const char **ppReturn) |
Message handler. More... | |
void | onSelectionChanged (const Gui::SelectionChanges &msg) |
Observer message from the Tree Selection mechanism. More... | |
void | preSelectionChanged (const QPoint &pos) |
void | print () |
Print content of view. More... | |
void | print (QPrinter *printer) |
void | printPdf () |
Print to PDF file. More... | |
void | printPdf (std::string file) |
void | printPreview () |
Show a preview dialog. More... | |
void | redraw1View (TechDraw::DrawView *dv) |
void | redrawAllViews (void) |
void | saveDXF (std::string file) |
void | savePDF (std::string file) |
void | saveSVG (std::string file) |
void | selectQGIView (App::DocumentObject *obj, bool state) |
QGraphicsScene seletion routines. More... | |
void | setDocumentName (const std::string &) |
void | setDocumentObject (const std::string &) |
void | setTabText (std::string t) |
void | updateTemplate (bool force=false) |
virtual | ~MDIViewPage () |
Public Member Functions inherited from Gui::MDIView | |
virtual bool | canClose (void) |
overwrite when checking on close state More... | |
virtual void | deleteSelf () |
delete itself More... | |
MDIView (Gui::Document *pcDocument, QWidget *parent, Qt::WindowFlags wflags=0) | |
View constructor Attach the view to the given document. 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... | |
QSize | minimumSizeHint () const |
virtual void | setCurrentViewMode (ViewMode mode) |
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... | |
ViewMode | currentViewMode () const |
template<typename _T > | |
_T | getActiveObject (const char *name, App::DocumentObject **parent=0, std::string *subname=0) const |
access getter for the active object list More... | |
void | setActiveObject (App::DocumentObject *o, const char *n, const char *subname=0) |
bool | hasActiveObject (const char *n) const |
bool | isActiveObject (App::DocumentObject *o, const char *n, const char *subname=0) const |
virtual bool | containsViewProvider (const ViewProvider *) const |
containsViewProvider Checks if the given view provider is part of this view. The default implementation returns false. More... | |
Public Member Functions inherited from Gui::BaseView | |
BaseView (Gui::Document *pcDocument=0) | |
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... | |
virtual void | onUpdate (void) |
get called when the document is updated More... | |
virtual void | onRename (Gui::Document *) |
get called when the document is renamed (change of its internal name) More... | |
virtual const char * | getName (void) const |
returns the name of the view (important for messages) More... | |
Public Member Functions inherited from Base::BaseClass | |
BaseClass () | |
Construction. More... | |
virtual Type | getTypeId (void) const |
bool | isDerivedFrom (const Type type) const |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
Public Member Functions inherited from Gui::SelectionObserver | |
void | attachSelection () |
Attaches to the selection. More... | |
bool | blockConnection (bool block) |
void | detachSelection () |
Detaches from the selection. More... | |
bool | isConnectionAttached () const |
bool | isConnectionBlocked () const |
SelectionObserver (bool attach=true, int resolve=1) | |
Constructor. More... | |
SelectionObserver (const Gui::ViewProviderDocumentObject *vp, bool attach=true, int resolve=1) | |
Constructor. More... | |
virtual | ~SelectionObserver () |
Static Public Member Functions | |
static MDIViewPage * | getFromScene (const QGraphicsScene *scene) |
Static Public Member Functions inherited from Base::BaseClass | |
static void * | create (void) |
static Type | getClassTypeId (void) |
static void | init (void) |
Public Attributes | |
QGraphicsScene * | m_scene |
Protected Types | |
typedef boost::signals2::connection | Connection |
Protected Member Functions | |
bool | attachView (App::DocumentObject *obj) |
Attaches view of obj to m_view. Returns true on success, false otherwise. More... | |
void | closeEvent (QCloseEvent *) |
bool | compareSelections (std::vector< Gui::SelectionObject > treeSel, QList< QGraphicsItem * > sceneSel) |
void | contextMenuEvent (QContextMenuEvent *event) |
void | findMissingViews (const std::vector< App::DocumentObject * > &list, std::vector< App::DocumentObject * > &missing) |
QPrinter::PaperSize | getPaperSize (int w, int h) const |
bool | hasQView (App::DocumentObject *obj) |
Helper function. More... | |
void | onDeleteObject (const App::DocumentObject &obj) |
bool | orphanExists (const char *viewName, const std::vector< App::DocumentObject * > &list) |
Helper function. More... | |
void | sceneSelectionManager (void) |
maintain QGScene selected items in selection order More... | |
void | setBalloonGroups (void) |
void | setDimensionGroups (void) |
void | setLeaderGroups (void) |
void | setTreeToSceneSelect (void) |
void | showStatusMsg (const char *s1, const char *s2, const char *s3) const |
Protected Member Functions inherited from Gui::MDIView | |
void | closeEvent (QCloseEvent *e) |
void | changeEvent (QEvent *e) |
Protected Attributes | |
Connection | connectDeletedObject |
Protected Attributes inherited from Gui::MDIView | |
PyObject * | pythonObject |
Protected Attributes inherited from Gui::BaseView | |
bool | bIsDetached |
bool | bIsPassive |
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) |
Protected Slots inherited from Gui::MDIView | |
virtual 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... | |
Static Protected Member Functions inherited from Base::BaseClass | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) |
Member Typedef Documentation
◆ Connection
|
protected |
Constructor & Destructor Documentation
◆ MDIViewPage()
MDIViewPage::MDIViewPage | ( | ViewProviderPage * | page, |
Gui::Document * | doc, | ||
QWidget * | parent = 0 |
||
) |
References onDeleteObject(), and App::Document::signalDeletedObject.
◆ ~MDIViewPage()
|
virtual |
References connectDeletedObject.
Member Function Documentation
◆ addChildrenToPage()
void MDIViewPage::addChildrenToPage | ( | void | ) |
References attachTemplate(), attachView(), TechDrawGui::ViewProviderPage::getDrawPage(), App::PropertyLink::getValue(), App::PropertyListsT< T, ListT, ParentT >::getValues(), matchSceneRectToTemplate(), setBalloonGroups(), setDimensionGroups(), setLeaderGroups(), TechDraw::DrawPage::Template, viewAll(), TechDraw::DrawViewCollection::Views, and TechDraw::DrawPage::Views.
◆ addView()
bool MDIViewPage::addView | ( | const App::DocumentObject * | obj | ) |
References attachView().
Referenced by TechDrawGui::ViewProviderDrawingView::onGuiRepaint().
◆ attachTemplate()
void MDIViewPage::attachTemplate | ( | TechDraw::DrawTemplate * | obj | ) |
References getPaperSize(), and TechDrawGui::QGVPage::setPageTemplate().
Referenced by addChildrenToPage(), and TechDrawGui::ViewProviderTemplate::updateData().
◆ attachView()
|
protected |
Attaches view of obj to m_view. Returns true on success, false otherwise.
References TechDrawGui::QGVPage::addDrawView(), TechDrawGui::QGVPage::addDrawViewAnnotation(), TechDrawGui::QGVPage::addDrawViewClip(), TechDrawGui::QGVPage::addDrawViewImage(), TechDrawGui::QGVPage::addDrawViewSpreadsheet(), TechDrawGui::QGVPage::addDrawViewSymbol(), TechDrawGui::QGVPage::addProjectionGroup(), TechDrawGui::QGVPage::addRichAnno(), TechDrawGui::QGVPage::addViewBalloon(), TechDrawGui::QGVPage::addViewDimension(), TechDrawGui::QGVPage::addViewLeader(), TechDrawGui::QGVPage::addViewPart(), TechDrawGui::QGVPage::addViewSection(), TechDrawGui::QGVPage::addWeldSymbol(), Base::Console(), Base::Persistence::getClassTypeId(), and Base::ConsoleSingleton::Log().
Referenced by addChildrenToPage(), addView(), and fixOrphans().
◆ blockSelection()
void MDIViewPage::blockSelection | ( | bool | isBlocked | ) |
◆ centerOnPage()
void MDIViewPage::centerOnPage | ( | void | ) |
◆ clearSceneSelection()
void MDIViewPage::clearSceneSelection | ( | ) |
◆ closeEvent()
|
protected |
◆ compareSelections()
|
protected |
References Base::Persistence::getClassTypeId(), and TechDrawGui::QGIView::getViewNameAsString().
Referenced by sceneSelectionChanged().
◆ contextMenuEvent()
|
protected |
◆ findMissingViews()
|
protected |
◆ fixOrphans()
void MDIViewPage::fixOrphans | ( | bool | force = false | ) |
References attachView(), TechDrawGui::QGVPage::findQViewForDocObj(), TechDraw::DrawPage::getAllViews(), Gui::BaseView::getAppDocument(), TechDrawGui::ViewProviderPage::getDrawPage(), App::DocumentObject::getNameInDocument(), TechDrawGui::QGVPage::getViews(), and TechDrawGui::QGVPage::removeQView().
Referenced by onTimer().
◆ getFromScene()
|
static |
Referenced by TechDrawGui::QGIView::getMDIViewPage().
◆ getPaperSize()
|
protected |
Referenced by attachTemplate(), and print().
◆ getPyObject()
|
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.
References Gui::MDIView::getPyObject().
◆ getQGVPage()
QGVPage* TechDrawGui::MDIViewPage::getQGVPage | ( | void | ) |
Referenced by TechDrawGui::DrawGuiUtil::findPage(), TechDrawGui::QGIView::getGraphicsView(), TechDrawGui::ViewProviderTemplate::getQTemplate(), TechDrawGui::ViewProviderDrawingView::getQView(), TechDrawGui::TaskLeaderLine::onTrackerClicked(), TechDrawGui::TaskCosVertex::TaskCosVertex(), TechDrawGui::TaskDetail::TaskDetail(), TechDrawGui::TaskLeaderLine::TaskLeaderLine(), and TechDrawGui::TaskRichAnno::TaskRichAnno().
◆ getTemplateCenter()
QPointF MDIViewPage::getTemplateCenter | ( | TechDraw::DrawTemplate * | obj | ) |
References TechDrawGui::Rez::guiX().
Referenced by centerOnPage().
◆ hasQView()
|
protected |
◆ matchSceneRectToTemplate()
void MDIViewPage::matchSceneRectToTemplate | ( | void | ) |
References TechDrawGui::ViewProviderPage::getDrawPage(), App::PropertyLink::getValue(), TechDrawGui::Rez::guiX(), and TechDraw::DrawPage::Template.
Referenced by addChildrenToPage().
◆ onDeleteObject()
|
protected |
References blockSelection(), Base::Persistence::getClassTypeId(), and TechDrawGui::QGVPage::removeQViewByName().
Referenced by MDIViewPage().
◆ onHasMsg()
|
virtual |
◆ onMsg()
|
virtual |
Message handler.
receive a message
Reimplemented from Gui::MDIView.
References Gui::BaseView::getGuiDocument(), Gui::Command::updateActive(), and viewAll().
◆ onSelectionChanged()
|
virtual |
Observer message from the Tree Selection mechanism.
invoked by selection change made in Tree via father MDIView
Implements Gui::SelectionObserver.
References Gui::SelectionChanges::AddSelection, blockSelection(), clearSceneSelection(), Gui::SelectionChanges::ClrSelection, Base::Console(), Base::Persistence::getClassTypeId(), Gui::SelectionSingleton::getSelection(), Base::ConsoleSingleton::Log(), Gui::Selection(), selectQGIView(), and Gui::SelectionChanges::SetSelection.
◆ onTimer
|
slot |
References fixOrphans().
◆ orphanExists()
|
protected |
Helper function.
References Base::Persistence::getClassTypeId(), App::PropertyListsT< T, ListT, ParentT >::getValues(), and TechDraw::DrawViewCollection::Views.
◆ preSelectionChanged()
void MDIViewPage::preSelectionChanged | ( | const QPoint & | pos | ) |
◆ print() [1/2]
|
virtual |
Print content of view.
Reimplemented from Gui::MDIView.
Referenced by printPdf(), and printPreview().
◆ print() [2/2]
|
virtual |
Reimplemented from Gui::MDIView.
References Gui::SelectionObserver::blockConnection(), Gui::SelectionSingleton::clearSelection(), TechDrawGui::ViewProviderPage::getDrawPage(), TechDrawGui::ViewProviderPage::getFrameState(), getPaperSize(), App::PropertyLink::getValue(), TechDrawGui::Rez::guiX(), TechDrawGui::QGVPage::refreshViews(), Gui::Selection(), TechDrawGui::ViewProviderPage::setFrameState(), TechDrawGui::ViewProviderPage::setTemplateMarkers(), and TechDraw::DrawPage::Template.
◆ printPdf() [1/2]
|
virtual |
Print to PDF file.
Reimplemented from Gui::MDIView.
References Gui::getMainWindow(), and Gui::FileDialog::getSaveFileName().
Referenced by savePDF().
◆ printPdf() [2/2]
void MDIViewPage::printPdf | ( | std::string | file | ) |
◆ printPreview()
|
virtual |
◆ redraw1View()
void MDIViewPage::redraw1View | ( | TechDraw::DrawView * | dv | ) |
References App::DocumentObject::getNameInDocument(), and TechDrawGui::QGVPage::getViews().
◆ redrawAllViews()
void MDIViewPage::redrawAllViews | ( | void | ) |
References TechDrawGui::QGVPage::getViews().
◆ saveDXF() [1/2]
void MDIViewPage::saveDXF | ( | std::string | file | ) |
◆ saveDXF [2/2]
|
slot |
References Gui::getMainWindow(), and Gui::FileDialog::getSaveFileName().
◆ savePDF() [1/2]
void MDIViewPage::savePDF | ( | std::string | file | ) |
References printPdf().
◆ savePDF [2/2]
|
slot |
References printPdf().
◆ saveSVG() [1/2]
void MDIViewPage::saveSVG | ( | std::string | file | ) |
References Base::Console(), TechDrawGui::QGVPage::saveSvg(), and Base::ConsoleSingleton::Warning().
◆ saveSVG [2/2]
|
slot |
◆ sceneSelectionChanged
|
slot |
update Tree Selection from QGraphicsScene selection
References compareSelections(), Gui::SelectionSingleton::getSelectionEx(), sceneSelectionManager(), Gui::Selection(), and setTreeToSceneSelect().
◆ sceneSelectionManager()
|
protected |
maintain QGScene selected items in selection order
Referenced by sceneSelectionChanged().
◆ selectQGIView()
void MDIViewPage::selectQGIView | ( | App::DocumentObject * | obj, |
bool | state | ||
) |
QGraphicsScene seletion routines.
Update QGIView's selection state based on Selection made outside Drawing Interface.
References blockSelection(), and TechDrawGui::QGVPage::findQViewForDocObj().
Referenced by onSelectionChanged().
◆ setBalloonGroups()
|
protected |
References TechDrawGui::QGVPage::addBalloonToParent(), TechDrawGui::QGVPage::findParent(), and TechDrawGui::QGVPage::getViews().
Referenced by addChildrenToPage().
◆ setDimensionGroups()
|
protected |
References TechDrawGui::QGVPage::addDimToParent(), TechDrawGui::QGVPage::findParent(), and TechDrawGui::QGVPage::getViews().
Referenced by addChildrenToPage().
◆ setDocumentName()
void MDIViewPage::setDocumentName | ( | const std::string & | name | ) |
◆ setDocumentObject()
void MDIViewPage::setDocumentObject | ( | const std::string & | name | ) |
◆ setLeaderGroups()
|
protected |
References TechDrawGui::QGVPage::addLeaderToParent(), TechDrawGui::QGVPage::findParent(), and TechDrawGui::QGVPage::getViews().
Referenced by addChildrenToPage().
◆ setTabText()
void MDIViewPage::setTabText | ( | std::string | t | ) |
References Gui::BaseView::isPassive().
◆ setTreeToSceneSelect()
|
protected |
References Gui::SelectionSingleton::addSelection(), Gui::SelectionObserver::blockConnection(), blockSelection(), Gui::SelectionSingleton::clearSelection(), App::DocumentObject::getDocument(), App::Document::getName(), App::DocumentObject::getNameInDocument(), TechDrawGui::QGIVertex::getProjIndex(), TechDrawGui::QGIEdge::getProjIndex(), TechDrawGui::QGIView::getViewObject(), App::DocumentObject::isRemoving(), Gui::Selection(), and showStatusMsg().
Referenced by sceneSelectionChanged().
◆ showStatusMsg()
|
protected |
References Gui::getMainWindow(), and Gui::MainWindow::showMessage().
Referenced by setTreeToSceneSelect().
◆ toggleFrame
|
slot |
◆ toggleKeepUpdated
|
slot |
◆ updateTemplate()
void MDIViewPage::updateTemplate | ( | bool | force = false | ) |
References Base::Console(), Base::Persistence::getClassTypeId(), TechDrawGui::ViewProviderPage::getDrawPage(), App::DocumentObject::getNameInDocument(), TechDrawGui::QGVPage::getTemplate(), App::PropertyLink::getValue(), Base::BaseClass::isDerivedFrom(), App::DocumentObject::isTouched(), App::Property::isTouched(), Base::ConsoleSingleton::Log(), TechDrawGui::QGITemplate::setTemplate(), TechDraw::DrawPage::Template, and TechDrawGui::QGITemplate::updateView().
◆ viewAll
|
slot |
Referenced by addChildrenToPage(), onMsg(), and TechDrawGui::ViewProviderTemplate::updateData().
Member Data Documentation
◆ connectDeletedObject
|
protected |
Referenced by ~MDIViewPage().
◆ m_scene
QGraphicsScene* TechDrawGui::MDIViewPage::m_scene |
The documentation for this class was generated from the following files:
- src/Mod/TechDraw/Gui/MDIViewPage.h
- src/Mod/TechDraw/Gui/MDIViewPage.cpp