Overview     Modules     Class Hierarchy     Classes     Members  

Abstract view provide interactors' functions. More...

#include <AbstractView.h>

Inheritance diagram for tlp::AbstractView:
Collaboration diagram for tlp::AbstractView:

List of all members.

Public Slots

Public Member Functions

Protected Member Functions

Protected Attributes


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


Constructor & Destructor Documentation

tlp::AbstractView::AbstractView ( )

Basic constructor

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

Basic destructor


Member Function Documentation

virtual void tlp::AbstractView::buildContextMenu ( QObject *  ,
QContextMenuEvent *  ,
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::computeContextMenuAction ( QAction *  ) [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 the abstract view

Warning:
If you want to inherit from it, you must call AbstractView::construct(QWidget *) in your new construct function

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, virtual]

return current interactor

Implements tlp::View.

QWidget* tlp::AbstractView::getCentralWidget ( ) const [inline]
Returns:
the central widget of the abstract view
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]

get the widget who will be add to workspace by the controller

Returns:
the widget of the abstract view

Implements tlp::View.

bool tlp::AbstractView::savePicture ( const std::string &  pictureName,
int  width,
int  height,
bool  center,
int  zoom = 1,
int  xOffset = 0,
int  yOffset = 0 
) [virtual]

Default implementation of the savePicture function. Use the image objects returned by the createPicture function and save it to a picture file on disk.

Parameters:
pictureName: filename to use for the picture, with extension (extension is used to infer image type).
width: width of the picture
height: height of the picture
center: whether we should center the view before creating the picture, or use the current zoom and pan.
zoom: creates a picture of a sub part of the view. With zoom=1 creates only one picture with entire view; with zoom=N : the view is cut into 2^(N-1) part in width and height. Defaults to 1.
xOffset: which part of the view to render if zoom!=1. xOffset must be 0 <= xOffset < 2^(zoom-1). Defaults to 0.
yOffset: which part of the view to render if zoom!=1. yOffset must be 0 <= yOffset < 2^(zoom-1). Defaults to 0.
Returns:
bool : Whether the picture can be created or not.

Reimplemented from tlp::View.

Reimplemented in tlp::BaseGraphicsViewComponent.

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 *  ,
QEvent *   
) [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

QWidget* tlp::AbstractView::centralWidget [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 - 2012