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

Special view part for multi-page workbench views. More...

#include <rcp/PageViewPart.h>

Inheritance diagram for PageViewPart:
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

 PageViewPart ()
 
virtual ~PageViewPart ()
 
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 * createDefaultPage ()=0
 Must be implemented in derived classes. More...
 
virtual QWidget * createPage (IWorkbenchPart *part)=0
 Must be implemented in derived classes. More...
 
virtual QWidget * createPartControl ()
 Creates the content widget. More...
 
void setPage (QWidget *page)
 Sets the specified widget as current "page". More...
 
virtual void editorActivated (IWorkbenchPart *part)
 Notifies this listener that the given editor part has been activated. More...
 
virtual void editorClosed (IWorkbenchPart *part)
 Notifies this listener that the given editor part has been closed. More...
 
virtual void viewActivated (IWorkbenchPart *part)
 Notifies this listener that the given view part has been activated. More...
 
virtual void viewClosed (IWorkbenchPart *part)
 Notifies this listener that the given view part has been closed. 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

Special view part for multi-page workbench views.

Within the workbench there are many views which track the active part. If a part is activated these views display some properties for the active part. To avoid loss of context when part activation changes, these views may implement a multi-page approach. A separate page is maintained within the view for each source view. If a part is activated the associated page for the part is brought to top.

(parts of docu taken from Eclipse Platform API)

Constructor & Destructor Documentation

◆ PageViewPart()

◆ ~PageViewPart()

virtual ~PageViewPart ( )
virtual

Member Function Documentation

◆ createDefaultPage()

virtual QWidget* createDefaultPage ( )
protectedpure virtual

Must be implemented in derived classes.

Is called to display a default page (e.g. when no workbench part is active)

Implemented in VisualizationControl, and PropertyView.

◆ createPage()

virtual QWidget* createPage ( IWorkbenchPart part)
protectedpure virtual

Must be implemented in derived classes.

Is called when the workbench part changes in order to display a special page for that part. If this method returns NULL, the current page remains unchanged. Note that the creator of the page is responsible for its destruction. The page will not be deleted if this PageViewPart is destructed!

Implemented in VisualizationControl, and PropertyView.

◆ createPartControl()

virtual QWidget* createPartControl ( )
protectedvirtual

Creates the content widget.

Implements ViewPart.

Reimplemented in VisualizationControl.

◆ setPage()

void setPage ( QWidget *  page)
protected

Sets the specified widget as current "page".

◆ editorActivated()

virtual void editorActivated ( IWorkbenchPart part)
protectedvirtual

Notifies this listener that the given editor part has been activated.

Implements IPartListener.

◆ editorClosed()

virtual void editorClosed ( IWorkbenchPart part)
protectedvirtual

Notifies this listener that the given editor part has been closed.

Implements IPartListener.

◆ viewActivated() [1/2]

virtual void viewActivated ( IWorkbenchPart part)
protectedvirtual

Notifies this listener that the given view part has been activated.

Implements IPartListener.

Reimplemented in PropertyView.

◆ viewClosed() [1/2]

virtual void viewClosed ( IWorkbenchPart part)
protectedvirtual

Notifies this listener that the given view part has been closed.

Implements IPartListener.

◆ init()

virtual void init ( IWorkbenchPartSite site)
virtualinherited

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

◆ activate()

virtual void activate ( )
virtualinherited

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

Reimplemented from WorkbenchPart.

◆ deactivate()

virtual void deactivate ( )
virtualinherited

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
virtualinherited

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
inherited

◆ getDockArea()

Qt::DockWidgetArea getDockArea ( ) const
inherited

Returns the dock area, this view belongs to.

◆ focusInEvent()

virtual void focusInEvent ( QFocusEvent *  )
protectedvirtualinherited

◆ closeEvent()

virtual void closeEvent ( QCloseEvent *  )
protectedvirtualinherited

◆ getViewMenu()

QMenu* getViewMenu ( )
protectedinherited

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

Returns the title bar of this view part.

◆ paintEvent()

void paintEvent ( QPaintEvent *  event)
protectedinherited

◆ viewClosed [2/2]

void viewClosed ( ViewPart view)
signalinherited

◆ viewDestroyed

void viewDestroyed ( ViewPart view)
signalinherited

◆ viewActivated [2/2]

void viewActivated ( ViewPart view)
signalinherited

◆ minimizedRequested

void minimizedRequested ( ViewPart view)
signalinherited

◆ currentDockLocationChanged

void currentDockLocationChanged ( Qt::DockWidgetArea  area)
signalinherited

◆ onVisibilityChanged

virtual void onVisibilityChanged ( bool  visible)
protectedvirtualslotinherited

◆ onMinimizeRequested

void onMinimizeRequested ( )
protectedslotinherited

◆ onDockLocationChanged

void onDockLocationChanged ( Qt::DockWidgetArea  area)
protectedslotinherited

◆ onTopLevelChanged

void onTopLevelChanged ( bool  topLevel)
protectedslotinherited

◆ 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
protectedinherited

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