Base class of all windows belonging to a document. More...
#include <MDIView.h>
Public Member Functions | |
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... | |
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... | |
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 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... | |
Undo/Redo actions | |
enum | ViewMode { Child , TopLevel , FullScreen } |
MDI view mode enum. More... | |
PyObject * | pythonObject |
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... | |
virtual void | setOverrideCursor (const QCursor &) |
virtual void | restoreOverrideCursor () |
void | message (const QString &, int) |
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... | |
void | closeEvent (QCloseEvent *e) |
void | changeEvent (QEvent *e) |
Printing | |
virtual void | print () |
Print content of view. More... | |
virtual void | printPdf () |
Print to PDF file. More... | |
virtual void | printPreview () |
Show a preview dialog. More... | |
void | savePrinterSettings (QPrinter *printer) |
Save the printer configuration. More... | |
void | restorePrinterSettings (QPrinter *printer) |
Restore the printer configuration. More... | |
virtual void | print (QPrinter *printer) |
Additional Inherited Members | |
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) |
Protected Attributes inherited from Gui::BaseView | |
bool | bIsDetached |
bool | bIsPassive |
Base class of all windows belonging to a document.
There are two ways of belonging to a document:
MDIView::MDIView | ( | Gui::Document * | pcDocument, |
QWidget * | parent, | ||
Qt::WindowFlags | wflags = Qt::WindowFlags() |
||
) |
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.
References draftgeoutils.faces::bind().
MDIView::~MDIView | ( | ) |
View destructor Detach the view from the document, if attached.
References Gui::getMainWindow(), and pythonObject.
|
virtual |
overwrite when checking on close state
Reimplemented from Gui::BaseView.
Reimplemented in Gui::AlignmentView, Gui::TextDocumentEditorView, Gui::EditorView, and WebGui::BrowserView.
References Gui::BaseView::bIsPassive, canClose(), Gui::BaseView::getAppDocument(), Gui::BaseView::getGuiDocument(), and App::Document::TempDoc.
Referenced by Gui::TextDocumentEditorView::canClose(), canClose(), and closeEvent().
|
protected |
|
protected |
References Gui::BaseView::bIsPassive, canClose(), and Gui::BaseView::getGuiDocument().
Referenced by Gui::EditorView::closeEvent(), Gui::TextDocumentEditorView::closeEvent(), and ImageGui::ImageView::closeEvent().
|
virtual |
containsViewProvider Checks if the given view provider is part of this view. The default implementation returns false.
Reimplemented in Gui::AbstractSplitView, and Gui::View3DInventor.
Referenced by Gui::Document::setActiveView().
ViewMode Gui::MDIView::currentViewMode | ( | ) | const |
Referenced by Gui::View3DInventor::setCurrentViewMode().
|
virtual |
delete itself
Reimplemented from Gui::BaseView.
Reimplemented in Gui::AbstractSplitView, Gui::View3DInventor, and SpreadsheetGui::SheetView.
References Gui::BaseView::onClose().
Referenced by Gui::AbstractSplitView::deleteSelf(), Gui::View3DInventor::deleteSelf(), and SpreadsheetGui::SheetView::deleteSelf().
_T Gui::MDIView::getActiveObject | ( | const char * | name, |
App::DocumentObject ** | parent = nullptr , |
||
std::string * | subname = nullptr |
||
) | const |
access getter for the active object list
Referenced by PartDesignGui::assertActivePart(), Gui::View3DInventorPy::getActiveObject(), PartDesignGui::getActivePart(), Gui::View3DInventorPy::getattr(), PartGui::getAutoGroupCommandStr(), PartDesignGui::getBody(), and PartDesignGui::ViewProvider::unsetEdit().
|
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 Base::BaseClass.
Reimplemented in Gui::AlignmentView, DrawingGui::DrawingView, TechDrawGui::MDIViewPage, Gui::AbstractSplitView, Gui::View3DInventor, SpreadsheetGui::SheetView, and WebGui::BrowserView.
References pythonObject.
Referenced by Gui::MainWindowPy::getActiveWindow(), DrawingGui::DrawingView::getPyObject(), and Gui::Application::sActiveView().
bool Gui::MDIView::hasActiveObject | ( | const char * | n | ) | const |
bool Gui::MDIView::isActiveObject | ( | App::DocumentObject * | o, |
const char * | n, | ||
const char * | subname = nullptr |
||
) | const |
|
signal |
Referenced by addonmanager_workers.GitProgressMonitor::update().
QSize MDIView::minimumSizeHint | ( | ) | const |
|
virtual |
Message handler test.
Implements Gui::BaseView.
Reimplemented in ImageGui::ImageView, Gui::TextDocumentEditorView, Gui::EditorView, Gui::PythonEditorView, Gui::GraphvizView, Gui::AbstractSplitView, Gui::View3DInventor, DrawingGui::DrawingView, SpreadsheetGui::SheetView, TechDrawGui::MDIViewPage, and WebGui::BrowserView.
|
virtual |
Message handler.
receive a message
Implements Gui::BaseView.
Reimplemented in ImageGui::ImageView, Gui::TextDocumentEditorView, Gui::EditorView, Gui::PythonEditorView, Gui::GraphvizView, Gui::AbstractSplitView, Gui::View3DInventor, DrawingGui::DrawingView, SpreadsheetGui::SheetView, TechDrawGui::MDIViewPage, and WebGui::BrowserView.
|
virtual |
get called when the document is updated
Reimplemented from Gui::BaseView.
Reimplemented in DrawingGui::DrawingView.
References Gui::BaseView::bIsPassive, Gui::Document::getDocument(), App::PropertyString::getValue(), and App::Document::Label.
|
virtual |
Print content of view.
Reimplemented in Gui::EditorView, Gui::GraphvizView, Gui::View3DInventor, DrawingGui::DrawingView, SpreadsheetGui::SheetView, and TechDrawGui::MDIViewPage.
|
virtualslot |
Reimplemented in Gui::EditorView, Gui::View3DInventor, SpreadsheetGui::SheetView, Gui::GraphvizView, DrawingGui::DrawingView, and TechDrawGui::MDIViewPage.
Referenced by StdCmdPrint::activated().
|
virtual |
Print to PDF file.
Reimplemented in Gui::EditorView, Gui::GraphvizView, Gui::View3DInventor, DrawingGui::DrawingView, SpreadsheetGui::SheetView, and TechDrawGui::MDIViewPage.
Referenced by StdCmdPrintPdf::activated().
|
virtual |
Show a preview dialog.
Reimplemented in Gui::EditorView, Gui::GraphvizView, Gui::View3DInventor, DrawingGui::DrawingView, SpreadsheetGui::SheetView, and TechDrawGui::MDIViewPage.
Referenced by StdCmdPrintPreview::activated().
|
virtual |
Reimplemented in Gui::EditorView, and Gui::TextDocumentEditorView.
References Gui::BaseView::getGuiDocument(), and draftguitools.gui_setstyle::translate.
Referenced by Gui::Dialog::RedoDialog::onFetchInfo().
|
virtualslot |
void MDIView::restorePrinterSettings | ( | QPrinter * | printer | ) |
Restore the printer configuration.
References App::GetApplication(), ParameterGrp::GetGroup(), and App::Application::GetParameterGroupByPath().
Referenced by Gui::View3DInventor::print(), and Gui::View3DInventor::printPreview().
void MDIView::savePrinterSettings | ( | QPrinter * | printer | ) |
Save the printer configuration.
References App::GetApplication(), ParameterGrp::GetGroup(), App::Application::GetParameterGroupByPath(), and ParameterGrp::SetInt().
Referenced by Gui::View3DInventor::print(), and Gui::View3DInventor::printPreview().
void Gui::MDIView::setActiveObject | ( | App::DocumentObject * | o, |
const char * | n, | ||
const char * | subname = nullptr |
||
) |
Referenced by Gui::View3DInventorPy::setActiveObject().
|
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.
References Gui::MainWindow::addWindow(), Child, FullScreen, Gui::getMainWindow(), Gui::MainWindow::removeWindow(), and TopLevel.
Referenced by Gui::View3DInventor::setCurrentViewMode().
|
virtualslot |
Reimplemented in Gui::AbstractSplitView.
Referenced by Gui::SelectionSingleton::addSelection(), and Gui::SelectionSingleton::setPreselect().
|
virtual |
Reimplemented in Gui::EditorView, and Gui::TextDocumentEditorView.
References Gui::BaseView::getGuiDocument(), and draftguitools.gui_setstyle::translate.
Referenced by Gui::Dialog::UndoDialog::onFetchInfo().
|
virtual |
Reimplemented in Gui::AbstractSplitView, and Gui::View3DInventor.
Referenced by StdCmdViewCreate::activated().
|
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.
Reimplemented in Gui::View3DInventor.
|
protected |