TechDrawGui::MDIViewPage Class Reference

#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 blockSceneSelection (bool isBlocked)
 
void centerOnPage (void)
 
void clearSceneSelection ()
 
void contextMenuEvent (QContextMenuEvent *event)
 
void fixOrphans (bool force=false)
 
TechDraw::DrawPagegetPage ()
 
PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
QGSPagegetQGSPage (void)
 
QGVPagegetQGVPage (void)
 
QPointF getTemplateCenter (TechDraw::DrawTemplate *obj)
 
ViewProviderPagegetViewProviderPage ()
 
void matchSceneRectToTemplate (void)
 
 MDIViewPage (ViewProviderPage *page, Gui::Document *doc, QWidget *parent=nullptr)
 
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 selection 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...
 
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
 
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=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
 
virtual bool containsViewProvider (const ViewProvider *) const
 containsViewProvider Checks if the given view provider is part of this view. The default implementation returns false. More...
 
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...
 
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...
 
 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...
 
- Public Member Functions inherited from Gui::SelectionObserver
void attachSelection ()
 Attaches to the selection. More...
 
bool blockSelection (bool block)
 
void detachSelection ()
 Detaches from the selection. More...
 
bool isSelectionAttached () const
 
bool isSelectionBlocked () const
 
 SelectionObserver (bool attach=true, ResolveMode resolve=ResolveMode::OldStyleElement)
 Constructor. More...
 
 SelectionObserver (const Gui::ViewProviderDocumentObject *vp, bool attach=true, ResolveMode resolve=ResolveMode::OldStyleElement)
 Constructor. More...
 
virtual ~SelectionObserver ()
 

Static Public Member Functions

static MDIViewPagegetFromScene (const QGSPage *scene)
 
- Static Public Member Functions inherited from Base::BaseClass
static void * create ()
 
static Type getClassTypeId ()
 
static void init ()
 

Protected Types

typedef boost::signals2::connection Connection
 

Protected Member Functions

bool attachView (App::DocumentObject *obj)
 Attaches view of obj to m_scene. Returns true on success, false otherwise. More...
 
void closeEvent (QCloseEvent *)
 
bool compareSelections (std::vector< Gui::SelectionObject > treeSel, QList< QGraphicsItem * > sceneSel)
 
void findMissingViews (const std::vector< App::DocumentObject * > &list, std::vector< App::DocumentObject * > &missing)
 
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
PyObjectpythonObject
 
- 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

typedef boost::signals2::connection TechDrawGui::MDIViewPage::Connection
protected

Constructor & Destructor Documentation

◆ MDIViewPage()

MDIViewPage::MDIViewPage ( ViewProviderPage page,
Gui::Document doc,
QWidget parent = nullptr 
)

◆ ~MDIViewPage()

MDIViewPage::~MDIViewPage ( )
virtual

References connectDeletedObject.

Member Function Documentation

◆ addChildrenToPage()

◆ addView()

bool MDIViewPage::addView ( const App::DocumentObject obj)

◆ attachTemplate()

◆ attachView()

◆ blockSceneSelection()

◆ centerOnPage()

◆ clearSceneSelection()

◆ closeEvent()

void MDIViewPage::closeEvent ( QCloseEvent *  ev)
protected

◆ compareSelections()

bool MDIViewPage::compareSelections ( std::vector< Gui::SelectionObject treeSel,
QList< QGraphicsItem * >  sceneSel 
)
protected

◆ contextMenuEvent()

void MDIViewPage::contextMenuEvent ( QContextMenuEvent *  event)

◆ findMissingViews()

void MDIViewPage::findMissingViews ( const std::vector< App::DocumentObject * > &  list,
std::vector< App::DocumentObject * > &  missing 
)
protected

◆ fixOrphans()

◆ getFromScene()

MDIViewPage * MDIViewPage::getFromScene ( const QGSPage scene)
static

◆ getPage()

TechDraw::DrawPage * TechDrawGui::MDIViewPage::getPage ( void  )

◆ getPyObject()

PyObject * MDIViewPage::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.

References Gui::MDIView::pythonObject.

◆ getQGSPage()

◆ getQGVPage()

◆ getTemplateCenter()

QPointF MDIViewPage::getTemplateCenter ( TechDraw::DrawTemplate obj)

References TechDrawGui::Rez::guiX().

Referenced by centerOnPage().

◆ getViewProviderPage()

ViewProviderPage * TechDrawGui::MDIViewPage::getViewProviderPage ( )

◆ hasQView()

bool MDIViewPage::hasQView ( App::DocumentObject obj)
protected

Helper function.

References TechDrawGui::QGSPage::getViews().

Referenced by findMissingViews().

◆ matchSceneRectToTemplate()

◆ onDeleteObject()

void MDIViewPage::onDeleteObject ( const App::DocumentObject obj)
protected

◆ onHasMsg()

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

Message handler test.

Reimplemented from Gui::MDIView.

References Gui::BaseView::getAppDocument().

◆ onMsg()

bool MDIViewPage::onMsg ( const char *  pMsg,
const char **  ppReturn 
)
virtual

Message handler.

receive a message

Reimplemented from Gui::MDIView.

References Gui::BaseView::getGuiDocument(), Gui::Command::updateActive(), and viewAll().

◆ onSelectionChanged()

void MDIViewPage::onSelectionChanged ( const Gui::SelectionChanges msg)
virtual

◆ onTimer

void MDIViewPage::onTimer ( )
slot

References fixOrphans().

◆ orphanExists()

bool MDIViewPage::orphanExists ( const char *  viewName,
const std::vector< App::DocumentObject * > &  list 
)
protected

◆ preSelectionChanged()

◆ print() [1/2]

void MDIViewPage::print ( )
virtual

Print content of view.

Reimplemented from Gui::MDIView.

References print().

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

◆ print() [2/2]

◆ printPdf() [1/2]

void MDIViewPage::printPdf ( )
virtual

Print to PDF file.

Reimplemented from Gui::MDIView.

References Gui::getMainWindow(), Gui::FileDialog::getSaveFileName(), and printPdf().

Referenced by printPdf(), and savePDF().

◆ printPdf() [2/2]

void MDIViewPage::printPdf ( std::string  file)

◆ printPreview()

void MDIViewPage::printPreview ( )
virtual

Show a preview dialog.

Reimplemented from Gui::MDIView.

References draftgeoutils.intersections::connect(), and print().

◆ redraw1View()

void MDIViewPage::redraw1View ( TechDraw::DrawView dv)

◆ redrawAllViews()

void MDIViewPage::redrawAllViews ( void  )

◆ saveDXF() [1/2]

◆ saveDXF [2/2]

void MDIViewPage::saveDXF ( void  )
slot

◆ savePDF() [1/2]

void MDIViewPage::savePDF ( std::string  file)

References printPdf().

◆ savePDF [2/2]

void MDIViewPage::savePDF ( void  )
slot

References printPdf().

◆ saveSVG() [1/2]

void MDIViewPage::saveSVG ( std::string  file)

◆ saveSVG [2/2]

◆ sceneSelectionChanged

void MDIViewPage::sceneSelectionChanged ( )
slot

◆ sceneSelectionManager()

void MDIViewPage::sceneSelectionManager ( void  )
protected

maintain QGScene selected items in selection order

Referenced by sceneSelectionChanged().

◆ selectQGIView()

void MDIViewPage::selectQGIView ( App::DocumentObject obj,
bool  state 
)

QGraphicsScene selection routines.

Update QGIView's selection state based on Selection made outside Drawing Interface.

References blockSceneSelection(), and TechDrawGui::QGSPage::findQViewForDocObj().

Referenced by onSelectionChanged().

◆ setBalloonGroups()

void MDIViewPage::setBalloonGroups ( void  )
protected

◆ setDimensionGroups()

void MDIViewPage::setDimensionGroups ( void  )
protected

◆ setDocumentName()

void MDIViewPage::setDocumentName ( const std::string &  name)

◆ setDocumentObject()

void MDIViewPage::setDocumentObject ( const std::string &  name)

◆ setLeaderGroups()

void MDIViewPage::setLeaderGroups ( void  )
protected

◆ setTabText()

void MDIViewPage::setTabText ( std::string  t)

◆ setTreeToSceneSelect()

◆ showStatusMsg()

void MDIViewPage::showStatusMsg ( const char *  s1,
const char *  s2,
const char *  s3 
) const
protected

◆ toggleFrame

void MDIViewPage::toggleFrame ( void  )
slot

◆ toggleKeepUpdated

◆ updateTemplate()

◆ viewAll

void MDIViewPage::viewAll ( )
slot

Member Data Documentation

◆ connectDeletedObject

Connection TechDrawGui::MDIViewPage::connectDeletedObject
protected

Referenced by ~MDIViewPage().


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