Overview | Modules | Class Hierarchy | Classes | Members

# tlp::AbstractView Class Reference

`#include <AbstractView.h>`

Inherits tlp::View.

Inherited by tlp::BaseGraphicsViewComponent, and tlp::GlMainView.

Inheritance diagram for tlp::AbstractView:

[legend]
Collaboration diagram for tlp::AbstractView:

[legend]
List of all members.

## Detailed Description

Abstract view provide interactors' functions.

Abstract view provide a View with interactors' basic functions like getInteractors, pushInteractor and popInteractor You can inherit from it if you want this functions In tulip-qt GlMainView inherit from it

## Public Slots

- bool eventFilter (QObject *object, QEvent *event)
- virtual void exportImage (QAction *action)

## Public Member Functions

- AbstractView ()
- virtual ~AbstractView ()
- virtual QWidget * construct (QWidget *parent)
- QWidget * getWidget ()
- virtual void setInteractors (const std::list< Interactor * > &interactorsList)
- virtual std::list< Interactor * > getInteractors ()
- virtual void setActiveInteractor (Interactor *interactor)
- Interactor * getActiveInteractor ()

## Protected Member Functions

- virtual void specificEventFilter (QObject *object, QEvent *event)
- virtual void buildContextMenu (QObject *object, QMouseEvent *event, QMenu *contextMenu)
- virtual void buildOutputImagesFormatsList (std::set< std::string > &outputFormats)
- virtual void computeContextMenuAction (QAction *action)
- void setCentralWidget (QWidget *widget)

## Protected Attributes

- QWidget * widget
- QVBoxLayout * mainLayout
- QWidget * centralWidget
- std::list< Interactor * > interactors
- Interactor * activeInteractor
- QMenu * exportImageMenu

## Constructor & Destructor Documentation

tlp::AbstractView::AbstractView | ( |  | ) |

| Basic constructor

virtual tlp::AbstractView::~AbstractView | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual void tlp::AbstractView::buildContextMenu | ( | QObject * | object,
|  | QMouseEvent * | event,
|  | QMenu * | contextMenu
| ) | `[protected, virtual]`

| empty function : implement this function if you want a context menu when you right click the mouse Reimplemented in tlp::GlMainView, and tlp::NodeLinkDiagramComponent.

virtual void tlp::AbstractView::buildOutputImagesFormatsList | ( | std::set< std::string > & | outputFormats | ) | `[protected, virtual]`

virtual void tlp::AbstractView::computeContextMenuAction | ( | QAction * | action | ) | `[inline, protected, virtual]`

| empty function : implement this function if you have implement buildContextMenu() Reimplemented in tlp::NodeLinkDiagramComponent.

virtual QWidget* tlp::AbstractView::construct | ( | QWidget * | parent | ) | `[virtual]`

Construct GUI of the view

Returns:
  QWidget is the main widget of the view (in MainController this widget will be add to workspace)

Implements tlp::View.

Reimplemented in tlp::BaseGraphicsViewComponent, tlp::GlMainView, and tlp::NodeLinkDiagramComponent.

bool tlp::AbstractView::eventFilter | ( | QObject * | object,
|  | QEvent * | event
| ) | `[slot]`

| this function is call by Qt this function call specificEventFilter, buildContextMenu and computeContextMenu

virtual void tlp::AbstractView::exportImage | ( | QAction * | action | ) | `[virtual, slot]`

Interactor* tlp::AbstractView::getActiveInteractor | ( |  | ) | `[inline]`

| return current interactor

virtual std::list<Interactor *> tlp::AbstractView::getInteractors | ( |  | ) | `[virtual]`

| Return interactors of this view Implements tlp::View. Reimplemented in tlp::BaseGraphicsViewComponent.

QWidget* tlp::AbstractView::getWidget | ( |  | ) | `[inline, virtual]`

| Return the widget of this view Implements tlp::View.

virtual void tlp::AbstractView::setActiveInteractor | ( | Interactor * | interactor | ) | `[virtual]`

| Set active interactor on this view Implements tlp::View. Reimplemented in tlp::BaseGraphicsViewComponent.

void tlp::AbstractView::setCentralWidget | ( | QWidget * | widget | ) | `[protected]`

| set the central widget of the view call this function to set view's centralWidget

virtual void tlp::AbstractView::setInteractors | ( | const std::list< Interactor * > & | interactorsList | ) | `[virtual]`

| Set all interactors available forthis view Interactors are create (allocate) but now view have responsibility of her destruction Implements tlp::View. Reimplemented in tlp::BaseGraphicsViewComponent.

virtual void tlp::AbstractView::specificEventFilter | ( | QObject * | object,
|  | QEvent * | event
| ) | `[inline, protected, virtual]`

| empty function : implement this function if you want a specific event filter in your view Reimplemented in tlp::NodeLinkDiagramComponent.

## Member Data Documentation

Interactor* tlp::AbstractView::activeInteractor`[protected]`

QWidget* tlp::AbstractView::centralWidget`[protected]`

QMenu* tlp::AbstractView::exportImageMenu`[protected]`

std::list<Interactor *> tlp::AbstractView::interactors`[protected]`

QVBoxLayout* tlp::AbstractView::mainLayout`[protected]`

QWidget* tlp::AbstractView::widget`[protected]`

Tulip Software by LaBRI Visualization Team 2001 - 2010