Base class of all windows belonging to a document. More...
#include <MDIView.h>
Public Types | |
enum | ViewMode { Child, TopLevel, FullScreen } |
MDI view mode enum. More... | |
Signals | |
void | message (const QString &, int) |
Public Member Functions | |
virtual bool | canClose (void) |
overwrite when checking on close state | |
ViewMode | currentViewMode () const |
virtual void | deleteSelf () |
delete itself | |
virtual Base::Type | getTypeId (void) const |
MDIView (Gui::Document *pcDocument, QWidget *parent, Qt::WFlags wflags=0) | |
View constructor Attach the view to the given document. | |
QSize | minimumSizeHint () const |
virtual bool | onHasMsg (const char *pMsg) const |
Message handler test. | |
virtual bool | onMsg (const char *pMsg, const char **ppReturn) |
Message handler. | |
virtual void | onRelabel (Gui::Document *pDoc) |
get called when the document is updated | |
virtual void | print () |
print function of the view | |
virtual void | printPdf () |
virtual void | printPreview () |
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. | |
virtual void | viewAll () |
~MDIView () | |
View destructor Detach the view from the document, if attached. | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Protected Slots | |
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. | |
Protected Member Functions | |
void | changeEvent (QEvent *e) |
void | closeEvent (QCloseEvent *e) |
Base class of all windows belonging to a document.
There are two ways of belonging to a document:
Definition at line 46 of file MDIView.h.
MDIView::MDIView | ( | Gui::Document * | pcDocument, | |
QWidget * | parent, | |||
Qt::WFlags | 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.
Definition at line 46 of file MDIView.cpp.
MDIView::~MDIView | ( | ) |
View destructor Detach the view from the document, if attached.
Definition at line 52 of file MDIView.cpp.
References Gui::getMainWindow().
bool MDIView::canClose | ( | void | ) | [virtual] |
overwrite when checking on close state
Reimplemented from Gui::BaseView.
Reimplemented in Gui::EditorView, and WebGui::BrowserView.
Definition at line 126 of file MDIView.cpp.
References Gui::BaseView::bIsPassive, and Gui::BaseView::getGuiDocument().
Referenced by closeEvent(), and Gui::Application::tryClose().
void MDIView::changeEvent | ( | QEvent * | e | ) | [protected] |
Definition at line 192 of file MDIView.cpp.
References Gui::MainWindow::activeWindow(), Gui::getMainWindow(), Gui::MainWindow::setActiveWindow(), and Gui::MainWindow::tabChanged().
void MDIView::closeEvent | ( | QCloseEvent * | e | ) | [protected] |
Definition at line 136 of file MDIView.cpp.
References Gui::BaseView::bIsPassive, canClose(), Gui::Document::detachView(), Gui::BaseView::getGuiDocument(), Gui::getMainWindow(), Gui::Document::isLastView(), and Gui::MainWindow::removeWindow().
void * Gui::MDIView::create | ( | void | ) | [static] |
Reimplemented from Gui::BaseView.
Reimplemented in Gui::View3DInventor.
Definition at line 43 of file MDIView.cpp.
ViewMode Gui::MDIView::currentViewMode | ( | ) | const [inline] |
Definition at line 97 of file MDIView.h.
Referenced by StdViewDockUndockFullscreen::activated(), StdViewDockUndockFullscreen::isActive(), Gui::View3DInventor::keyPressEvent(), Gui::View3DInventor::keyReleaseEvent(), and Gui::View3DInventor::setCurrentViewMode().
void MDIView::deleteSelf | ( | ) | [virtual] |
Base::Type Gui::MDIView::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Gui::BaseView.
Reimplemented in Gui::View3DInventor.
Definition at line 43 of file MDIView.cpp.
Base::Type Gui::MDIView::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Gui::BaseView.
Reimplemented in Gui::View3DInventor.
Definition at line 43 of file MDIView.cpp.
Referenced by CmdPointsPolyCut::activated(), CmdMeshPolySplit::activated(), CmdMeshPolyCut::activated(), CmdMeshAddFacet::activated(), CmdMeshPolySelect::activated(), CmdMeshPolySegm::activated(), and Gui::MainWindow::addWindow().
void Gui::MDIView::init | ( | void | ) | [static] |
Reimplemented from Gui::BaseView.
Reimplemented in Gui::View3DInventor.
Definition at line 43 of file MDIView.cpp.
Referenced by Gui::Application::initTypes().
void Gui::MDIView::message | ( | const QString & | , | |
int | ||||
) | [signal] |
QSize MDIView::minimumSizeHint | ( | ) | const |
Definition at line 187 of file MDIView.cpp.
bool MDIView::onHasMsg | ( | const char * | pMsg | ) | const [virtual] |
Message handler test.
Implements Gui::BaseView.
Reimplemented in Gui::EditorView, Gui::PythonEditorView, Gui::SplitView3DInventor, Gui::View3DInventor, DrawingGui::DrawingView, ImageGui::ImageView, and WebGui::BrowserView.
Definition at line 121 of file MDIView.cpp.
Referenced by Gui::Application::sendHasMsgToActiveView().
bool MDIView::onMsg | ( | const char * | pMsg, | |
const char ** | ppReturn | |||
) | [virtual] |
Message handler.
receive a message
Implements Gui::BaseView.
Reimplemented in Gui::EditorView, Gui::PythonEditorView, Gui::SplitView3DInventor, Gui::View3DInventor, DrawingGui::DrawingView, ImageGui::ImageView, and WebGui::BrowserView.
Definition at line 116 of file MDIView.cpp.
Referenced by Gui::Application::sendMsgToActiveView().
void MDIView::onRelabel | ( | Gui::Document * | pDoc | ) | [virtual] |
get called when the document is updated
Reimplemented from Gui::BaseView.
Definition at line 85 of file MDIView.cpp.
References Gui::BaseView::bIsPassive, Gui::Document::getDocument(), App::Document::Label, and RobotExample::pos.
void MDIView::print | ( | ) | [virtual] |
print function of the view
Reimplemented in Gui::EditorView, Gui::View3DInventor, and DrawingGui::DrawingView.
Definition at line 169 of file MDIView.cpp.
Referenced by StdCmdPrint::activated().
void MDIView::printPdf | ( | ) | [virtual] |
Reimplemented in Gui::EditorView, Gui::View3DInventor, and DrawingGui::DrawingView.
Definition at line 175 of file MDIView.cpp.
Referenced by StdCmdPrintPdf::activated().
void MDIView::printPreview | ( | ) | [virtual] |
Reimplemented in Gui::EditorView, Gui::View3DInventor, and DrawingGui::DrawingView.
Definition at line 181 of file MDIView.cpp.
Referenced by StdCmdPrintPreview::activated().
void MDIView::setCurrentViewMode | ( | ViewMode | mode | ) | [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.
Definition at line 221 of file MDIView.cpp.
References Gui::MainWindow::addWindow(), Child, FullScreen, Gui::getMainWindow(), Gui::MainWindow::removeWindow(), and TopLevel.
Referenced by StdViewDockUndockFullscreen::activated(), and Gui::MainWindow::switchToDockedMode().
void MDIView::viewAll | ( | ) | [virtual] |
Reimplemented in Gui::View3DInventor, and DrawingGui::DrawingView.
Definition at line 111 of file MDIView.cpp.
Referenced by StdCmdViewCreate::activated().
void MDIView::windowStateChanged | ( | MDIView * | ) | [protected, virtual, slot] |
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.
Definition at line 165 of file MDIView.cpp.