MIRA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

virtual ~EditorPart ( )
virtual

Member Function Documentation

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.

IWorkbenchPartSite* getSite ( )
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.

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.

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.

virtual void closeEvent ( QCloseEvent *  )
protectedvirtual
void editorClosed ( EditorPart editor)
signal
void editorDestroyed ( EditorPart editor)
signal
void setWidget ( QWidget *  widget)
inherited
QWidget* widget ( ) const
inherited
EditorPartTitleBar* getTitleBar ( )
inherited
void undock ( )
inlineinherited

Undocks the window from the EditorPartArea and makes it floating.

void dock ( )
inlineinherited

Docks the window back to the EditorPartArea.

bool isDocked ( ) const
inlineinherited

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

void setOnTop ( bool  onTop)
inlineinherited

Makes the window stay on top of other windows.

bool isOnTop ( ) const
inlineinherited

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

void showDecorations ( bool  show)
inherited
void setAutoHideDecorations ( bool  on)
inherited
virtual void paintEvent ( QPaintEvent *  paintEvent)
protectedvirtualinherited
virtual void changeEvent ( QEvent *  event)
protectedvirtualinherited
void setActive ( bool  activate)
protectedinherited
virtual void windowStateChanged ( Qt::WindowStates  oldState,
Qt::WindowStates  newState 
)
protectedvirtualinherited
void updateDecorations ( )
protectedinherited
void updateStateButtons ( )
protectedinherited
void onMinimized ( )
protectedslotinherited
void onMaximized ( )
protectedslotinherited
void onRestored ( )
protectedslotinherited
void onUndock ( )
protectedslotinherited
void onDock ( )
protectedslotinherited
void onOnTop ( bool  onTop)
protectedslotinherited
void windowTitleChanged ( EditorPartWindow editor)
signalinherited
void reflect ( Reflector &  r)
inlineinherited
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.

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.

bool isActivated ( ) const
inlineinherited

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

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.

Class const& getClass ( ) const
inlineinherited

call the virtual internalGetClass().

static PseudoClass const& CLASS ( )
inlinestaticinherited
virtual Class const& internalGetClass ( ) const
protectedpure virtualinherited

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