FreeCAD C++
|
#include <Gui/MDIView.h>
Base class of all windows belonging to a document. There are two ways of belonging to a document:
Public Types | |
enum | ViewMode { Child, TopLevel, FullScreen } |
MDI view mode enum. More... | |
Public Member Functions | |
MDIView (Gui::Document *pcDocument, QWidget *parent, Qt::WindowFlags wflags=0) | |
~MDIView () | |
virtual void | onRelabel (Gui::Document *pDoc) |
get called when the document is updated | |
virtual bool | onMsg (const char *pMsg, const char **ppReturn) |
Message handler. | |
virtual bool | onHasMsg (const char *pMsg) const |
Message handler test. | |
virtual bool | canClose (void) |
overwrite when checking on close state | |
virtual void | deleteSelf () |
delete itself | |
virtual void | setCurrentViewMode (ViewMode mode) |
template<typename _T > | |
_T | getActiveObject (const char *name) const |
access getter for the active object list | |
![]() | |
BaseView (Gui::Document *pcDocument=0) | |
virtual | ~BaseView () |
Gui::Document * | getGuiDocument () const |
returns the document the view is attached to | |
App::Document * | getAppDocument () const |
returns the document the view is attached to | |
bool | isPassive (void) const |
indicates if the view is in passive mode | |
void | setDocument (Gui::Document *pcDocument) |
sets the view to another document (called by Application) | |
void | onClose (void) |
is sent from the document in order to close the document | |
virtual void | onUpdate (void) |
get called when the document is updated | |
virtual void | onRename (Gui::Document *) |
get called when the document is renamed (change of its internal name) | |
virtual const char * | getName (void) const |
returns the name of the view (important for messages) | |
![]() | |
BaseClass () | |
Construction. | |
virtual | ~BaseClass () |
Destruction. | |
Protected Slots | |
virtual void | windowStateChanged (MDIView *) |
Printing | |
virtual void | print () |
virtual void | printPdf () |
virtual void | printPreview () |
virtual void | print (QPrinter *printer) |
Gui::MDIView::MDIView | ( | Gui::Document * | pcDocument, |
QWidget * | parent, | ||
Qt::WindowFlags | wflags = 0 |
||
) |
View constructor Attach the view to the given document. If the document is zero the view will attach to the active document. Be aware, there isn't always an active document.
Gui::MDIView::~MDIView | ( | ) |
View destructor Detach the view from the document, if attached.
|
virtual |
Print content of view
Reimplemented in Gui::View3DInventor.
|
virtual |
Print to PDF file
|
virtual |
Show a preview dialog
|
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. For more hints refer to the Qt documentation to QWidget::showFullScreen ().
Reimplemented in Gui::View3DInventor.
|
protectedvirtualslot |
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.