Gui::MDIView Class Reference

Base class of all windows belonging to a document. More...

#include <MDIView.h>

Inheritance diagram for Gui::MDIView:
Gui::BaseView Base::BaseClass DrawingGui::DrawingView Gui::EditorView Gui::SplitView3DInventor Gui::View3DInventor ImageGui::ImageView WebGui::BrowserView Gui::PythonEditorView

List of all members.

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)

Detailed Description

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.


Member Enumeration Documentation

MDI view mode enum.

Enumerator:
Child 

Child viewing, view is docked inside the MDI application window.

TopLevel 

The view becomes a top level window and can be moved outsinde the application window.

FullScreen 

The view goes to full screen viewing.

Definition at line 85 of file MDIView.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

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]
void MDIView::closeEvent ( QCloseEvent *  e  )  [protected]
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]
void MDIView::deleteSelf (  )  [virtual]

delete itself

Reimplemented from Gui::BaseView.

Definition at line 72 of file MDIView.cpp.

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]
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]
bool MDIView::onMsg ( const char *  pMsg,
const char **  ppReturn 
) [virtual]
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.


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

Generated on Wed Nov 23 19:02:00 2011 for FreeCAD by  doxygen 1.6.1