MIRA
Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
ViewPart Class Referenceabstract

A view is typically used to display information or properties. More...

#include <rcp/ViewPart.h>

Inheritance diagram for ViewPart:
Inheritance graph
[legend]

Signals

void viewClosed (ViewPart *view)
 
void viewDestroyed (ViewPart *view)
 
void viewActivated (ViewPart *view)
 
void minimizedRequested (ViewPart *view)
 
void currentDockLocationChanged (Qt::DockWidgetArea area)
 

Public Member Functions

 ViewPart ()
 
virtual ~ViewPart ()
 
virtual void init (IWorkbenchPartSite *site)
 Is called by the workbench. More...
 
IWorkbenchPartSitegetSite ()
 
virtual void activate ()
 Is called by the Workbench to inform the Part that is being activated by the user. More...
 
virtual void deactivate ()
 Is called by the Workbench to inform the Part that is being deactivated since another Part got the focus. More...
 
virtual Qt::DockWidgetArea getDefaultDockArea () const
 Can be implemented by view implementations to provide a preferred default dock area that is assigned by default when the view is created. More...
 
bool isVisible () const
 
Qt::DockWidgetArea getDockArea () const
 Returns the dock area, this view belongs to. More...
 
template<typename Reflector >
void reflect (Reflector &r)
 
bool isActivated () const
 Returns true if this ViewPart currently has the focus and hence the users attention. More...
 
virtual ObjectgetAdapter (const Class &adapter)
 Returns an object which is an instance of the given class associated with this object. More...
 
Class const & getClass () const
 call the virtual internalGetClass(). More...
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Protected Slots

virtual void onVisibilityChanged (bool visible)
 
void onMinimizeRequested ()
 
void onDockLocationChanged (Qt::DockWidgetArea area)
 
void onTopLevelChanged (bool topLevel)
 

Protected Member Functions

virtual QWidget * createPartControl ()=0
 Must be overloaded in subclasses to create the actual widget for this ViewPart. More...
 
virtual void focusInEvent (QFocusEvent *)
 
virtual void closeEvent (QCloseEvent *)
 
QMenu * getViewMenu ()
 Returns the optional view menu that is shown when the user clicks the view menu tool button. More...
 
ViewPartTitleBargetTitleBar ()
 Returns the title bar of this view part. More...
 
void paintEvent (QPaintEvent *event)
 
virtual Class const & internalGetClass () const =0
 

Protected Attributes

ViewPartTitleBarmTitleBar
 

Detailed Description

A view is typically used to display information or properties.

Views are shown as dock windows. Only one instance of a particular view type may exist within the workbench. This policy is designed to simplify the view management for the user.

Constructor & Destructor Documentation

◆ ViewPart()

ViewPart ( )

◆ ~ViewPart()

virtual ~ViewPart ( )
virtual

Member Function Documentation

◆ init()

virtual void init ( IWorkbenchPartSite site)
virtual

Is called by the workbench.

The WorkbenchPart should initialize itself and my store the pointer tothe IWorkbenchPartSite interface for later use.

Implements WorkbenchPart.

◆ getSite()

IWorkbenchPartSite* getSite ( )

◆ activate()

virtual void activate ( )
virtual

Is called by the Workbench to inform the Part that is being activated by the user.

Reimplemented from WorkbenchPart.

◆ deactivate()

virtual void deactivate ( )
virtual

Is called by the Workbench to inform the Part that is being deactivated since another Part got the focus.

Reimplemented from WorkbenchPart.

◆ getDefaultDockArea()

virtual Qt::DockWidgetArea getDefaultDockArea ( ) const
virtual

Can be implemented by view implementations to provide a preferred default dock area that is assigned by default when the view is created.

The user can move the view freely to other dock areas afterwards. The default implementation will return Qt::LeftDockWidgetArea.

Reimplemented in PropertyView.

◆ isVisible()

bool isVisible ( ) const

◆ getDockArea()

Qt::DockWidgetArea getDockArea ( ) const

Returns the dock area, this view belongs to.

◆ createPartControl()

virtual QWidget* createPartControl ( )
protectedpure virtual

Must be overloaded in subclasses to create the actual widget for this ViewPart.

This ViewPart should be set as parent for the created widget.

Implemented in PageViewPart, and VisualizationControl.

◆ focusInEvent()

virtual void focusInEvent ( QFocusEvent *  )
protectedvirtual

◆ closeEvent()

virtual void closeEvent ( QCloseEvent *  )
protectedvirtual

◆ getViewMenu()

QMenu* getViewMenu ( )
protected

Returns the optional view menu that is shown when the user clicks the view menu tool button.

A ViewPart can add items to this menu within it's createPartControl() method, by calling this method and populating items to the menu.

◆ getTitleBar()

ViewPartTitleBar* getTitleBar ( )
protected

Returns the title bar of this view part.

◆ paintEvent()

void paintEvent ( QPaintEvent *  event)
protected

◆ viewClosed

void viewClosed ( ViewPart view)
signal

◆ viewDestroyed

void viewDestroyed ( ViewPart view)
signal

◆ viewActivated

void viewActivated ( ViewPart view)
signal

◆ minimizedRequested

void minimizedRequested ( ViewPart view)
signal

◆ currentDockLocationChanged

void currentDockLocationChanged ( Qt::DockWidgetArea  area)
signal

◆ onVisibilityChanged

virtual void onVisibilityChanged ( bool  visible)
protectedvirtualslot

◆ onMinimizeRequested

void onMinimizeRequested ( )
protectedslot

◆ onDockLocationChanged

void onDockLocationChanged ( Qt::DockWidgetArea  area)
protectedslot

◆ onTopLevelChanged

void onTopLevelChanged ( bool  topLevel)
protectedslot

◆ reflect()

void reflect ( Reflector &  r)
inlineinherited

◆ isActivated()

bool isActivated ( ) const
inlineinherited

Returns true if this ViewPart currently has the focus and hence the users attention.

◆ getAdapter()

virtual Object* getAdapter ( const Class adapter)
inlinevirtualinherited

Returns an object which is an instance of the given class associated with this object.

Returns nullptr if no such object can be found. The implementation if IAdaptable is responsible for destroying the instance of the created object.

Implements IAdaptable.

Reimplemented in VisualizationView.

◆ getClass()

Class const& getClass ( ) const
inlineinherited

call the virtual internalGetClass().

◆ CLASS()

static PseudoClass const& CLASS ( )
inlinestaticinherited

◆ internalGetClass()

virtual Class const& internalGetClass ( ) const
protectedpure virtualinherited

Member Data Documentation

◆ mTitleBar

ViewPartTitleBar* mTitleBar
protected

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