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

An editor is typically used to edit or browse data or objects. More...

#include <rcp/EditorPart.h>

Inheritance diagram for EditorPart:
Inheritance graph
[legend]

Signals

void editorClosed (EditorPart *editor)
 
void editorDestroyed (EditorPart *editor)
 
void windowTitleChanged (EditorPartWindow *editor)
 

Public Member Functions

 EditorPart ()
 
virtual ~EditorPart ()
 
virtual void init (IWorkbenchPartSite *site)
 Is called by the workbench. More...
 
IWorkbenchPartSitegetSite ()
 
virtual QImage captureContent ()
 Returns the content of the editor part as QImage. More...
 
void setWidget (QWidget *widget)
 
QWidget * widget () const
 
EditorPartTitleBargetTitleBar ()
 
void undock ()
 Undocks the window from the EditorPartArea and makes it floating. More...
 
void dock ()
 Docks the window back to the EditorPartArea. More...
 
bool isDocked () const
 Returns true, if the window is docked in the EditorPartArea. More...
 
void setOnTop (bool onTop)
 Makes the window stay on top of other windows. More...
 
bool isOnTop () const
 Returns true, if the window stays on top of other windows. More...
 
void showDecorations (bool show)
 
void setAutoHideDecorations (bool on)
 
template<typename Reflector >
void reflect (Reflector &r)
 
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...
 
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

void onMinimized ()
 
void onMaximized ()
 
void onRestored ()
 
void onUndock ()
 
void onDock ()
 
void onOnTop (bool onTop)
 

Protected Member Functions

virtual QWidget * createPartControl ()=0
 Must be overloaded in subclasses to create the actual widget for this EditorPart. More...
 
QMenu * getViewMenu ()
 Returns the optional editor menu that is shown when the user clicks the editor menu tool button. More...
 
virtual void closeEvent (QCloseEvent *)
 
virtual void paintEvent (QPaintEvent *paintEvent)
 
virtual void changeEvent (QEvent *event)
 
void setActive (bool activate)
 
virtual void windowStateChanged (Qt::WindowStates oldState, Qt::WindowStates newState)
 
void updateDecorations ()
 
void updateStateButtons ()
 
virtual Class const & internalGetClass () const =0
 

Detailed Description

An editor is typically used to edit or browse data or objects.

Editors are shown as tabbed MDI windows. In contrast to views there may exist multiple instances of a certain editor type.

Constructor & Destructor Documentation

◆ EditorPart()

◆ ~EditorPart()

virtual ~EditorPart ( )
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 ( )

◆ captureContent()

virtual QImage captureContent ( )
virtual

Returns the content of the editor part as QImage.

Can be reimplemented by subclasses to provide special capturing techniques that are e.g. required by OpenQL widgets.

Reimplemented in Visualization3DView.

◆ createPartControl()

virtual QWidget* createPartControl ( )
protectedpure virtual

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

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

Implemented in VisualizationView.

◆ getViewMenu()

QMenu* getViewMenu ( )
protected

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

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

◆ closeEvent()

virtual void closeEvent ( QCloseEvent *  )
protectedvirtual

◆ editorClosed

void editorClosed ( EditorPart editor)
signal

◆ editorDestroyed

void editorDestroyed ( EditorPart editor)
signal

◆ setWidget()

void setWidget ( QWidget *  widget)
inherited

◆ widget()

QWidget* widget ( ) const
inherited

◆ getTitleBar()

EditorPartTitleBar* getTitleBar ( )
inherited

◆ undock()

void undock ( )
inlineinherited

Undocks the window from the EditorPartArea and makes it floating.

◆ dock()

void dock ( )
inlineinherited

Docks the window back to the EditorPartArea.

◆ isDocked()

bool isDocked ( ) const
inlineinherited

Returns true, if the window is docked in the EditorPartArea.

◆ setOnTop()

void setOnTop ( bool  onTop)
inlineinherited

Makes the window stay on top of other windows.

◆ isOnTop()

bool isOnTop ( ) const
inlineinherited

Returns true, if the window stays on top of other windows.

◆ showDecorations()

void showDecorations ( bool  show)
inherited

◆ setAutoHideDecorations()

void setAutoHideDecorations ( bool  on)
inherited

◆ paintEvent()

virtual void paintEvent ( QPaintEvent *  paintEvent)
protectedvirtualinherited

◆ changeEvent()

virtual void changeEvent ( QEvent *  event)
protectedvirtualinherited

◆ setActive()

void setActive ( bool  activate)
protectedinherited

◆ windowStateChanged()

virtual void windowStateChanged ( Qt::WindowStates  oldState,
Qt::WindowStates  newState 
)
protectedvirtualinherited

◆ updateDecorations()

void updateDecorations ( )
protectedinherited

◆ updateStateButtons()

void updateStateButtons ( )
protectedinherited

◆ onMinimized

void onMinimized ( )
protectedslotinherited

◆ onMaximized

void onMaximized ( )
protectedslotinherited

◆ onRestored

void onRestored ( )
protectedslotinherited

◆ onUndock

void onUndock ( )
protectedslotinherited

◆ onDock

void onDock ( )
protectedslotinherited

◆ onOnTop

void onOnTop ( bool  onTop)
protectedslotinherited

◆ windowTitleChanged

void windowTitleChanged ( EditorPartWindow editor)
signalinherited

◆ reflect()

void reflect ( Reflector &  r)
inlineinherited

◆ activate()

virtual void activate ( )
virtualinherited

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

Implements IWorkbenchPart.

Reimplemented in ViewPart.

◆ deactivate()

virtual void deactivate ( )
virtualinherited

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

Implements IWorkbenchPart.

Reimplemented in ViewPart.

◆ 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

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