#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)
 
PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
QGVPagegetQGVPage (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 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...
 
 MDIView (Gui::Document *pcDocument, QWidget *parent, Qt::WindowFlags wflags=Qt::WindowFlags())
 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::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...
 
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 MDIViewPagegetFromScene (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

QGraphicsScenem_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
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::~MDIViewPage ( )
virtual

References connectDeletedObject.

Member Function Documentation

◆ addChildrenToPage()

◆ addView()

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

◆ attachTemplate()

◆ attachView()

◆ blockSelection()

◆ 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)
protected

◆ findMissingViews()

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

◆ fixOrphans()

◆ getFromScene()

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

◆ getPaperSize()

QPrinter::PaperSize MDIViewPage::getPaperSize ( int  w,
int  h 
) const
protected

Referenced by attachTemplate().

◆ 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::getPyObject().

◆ getQGVPage()

◆ getTemplateCenter()

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

References TechDrawGui::Rez::guiX().

Referenced by centerOnPage().

◆ hasQView()

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

Helper function.

References TechDrawGui::QGVPage::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.

Referenced by printPdf(), and printPreview().

◆ print() [2/2]

◆ printPdf() [1/2]

void MDIViewPage::printPdf ( )
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()

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 blockSelection(), and TechDrawGui::QGVPage::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 ( void  )
slot

Member Data Documentation

◆ connectDeletedObject

Connection TechDrawGui::MDIViewPage::connectDeletedObject
protected

Referenced by ~MDIViewPage().

◆ m_scene


The documentation for this class was generated from the following files:
  • Sources/FreeCAD/src/Mod/TechDraw/Gui/MDIViewPage.h
  • Sources/FreeCAD/src/Mod/TechDraw/Gui/MDIViewPage.cpp