SYNOPSIS
#include <AbstractView.h>
Inherits tlp::View.
Inherited by tlp::GlMainView.
Public Slots
bool eventFilter (QObject *object, QEvent *event)
Public Member Functions
AbstractView ()
virtual ~AbstractView ()
virtual QWidget * construct (QWidget *parent)
QWidget * getWidget ()
virtual std::list< QAction * > * getInteractorsActionList ()
virtual tlp::Iterator< tlp::Interactor * > * getInteractors () const
tlp::Interactor::ID pushInteractor (tlp::Interactor *interactor)
void popInteractor ()
void removeInteractor (tlp::Interactor::ID id)
tlp::Interactor::ID resetInteractors (tlp::Interactor *interactor=NULL)
std::vector< tlp::Interactor::ID > resetInteractors (const std::vector< tlp::Interactor * > &interactors)
Protected Member Functions
virtual void specificEventFilter (QObject *object, QEvent *event)
virtual void buildContextMenu (QObject *object, QMouseEvent *event, QMenu *contextMenu)
virtual void computeContextMenuAction (QAction *action)
virtual void constructInteractorsMap ()
virtual void constructInteractorsActionList ()
void setCentralWidget (QWidget *widget)
Protected Attributes
tlp::Interactor::ID _id
std::vector< tlp::Interactor * > _interactors
std::map< std::string, std::vector< Interactor * > > interactorsMap
std::list< QAction * > interactorsActionList
QWidget * widget
QVBoxLayout * mainLayout
QWidget * centralWidget
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]
Member Function Documentation
virtual void tlp::AbstractView::buildContextMenu (QObject * object, QMouseEvent * event, QMenu * contextMenu) [inline, protected, virtual]empty function : implement this function if you want a context menu when you right click the mouse
Reimplemented in tlp::NodeLinkDiagramComponent.
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::GlMainView, and tlp::NodeLinkDiagramComponent.
virtual void tlp::AbstractView::constructInteractorsActionList () [inline, protected, virtual]construct the storage of interactors' action
Reimplemented in tlp::NodeLinkDiagramComponent.
virtual void tlp::AbstractView::constructInteractorsMap () [inline, protected, virtual]construct the storage of interactors
Reimplemented in 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 tlp::Iterator<tlp::Interactor *>* tlp::AbstractView::getInteractors () const [virtual]get interactors of widget
Returns:
- list of interactor installed on this widget
virtual std::list<QAction *>* tlp::AbstractView::getInteractorsActionList () [virtual]Get Interactors action (in MainController actions will be add to graphToolBar)
Warning:
- : QAction* must be the same at each call
Implements tlp::View.
QWidget* tlp::AbstractView::getWidget () [inline]
void tlp::AbstractView::popInteractor ()remove the last added interactor from the event filters list and delete it
tlp::Interactor::ID tlp::AbstractView::pushInteractor (tlp::Interactor * interactor)install a clone of the interactor as event filter and assign the returned id
void tlp::AbstractView::removeInteractor (tlp::Interactor::ID id)remove the interactor with id from the event filters list and delete it
std::vector<tlp::Interactor::ID> tlp::AbstractView::resetInteractors (const std::vector< tlp::Interactor * > & interactors)remove all iteractors and delete them, then install clones of the interactors
tlp::Interactor::ID tlp::AbstractView::resetInteractors (tlp::Interactor * interactor = NULL)remove all interactors and delete them, push a new one if any
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::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
tlp::Interactor::ID tlp::AbstractView::_id [protected]
std::vector<tlp::Interactor *> tlp::AbstractView::_interactors [protected]
QWidget* tlp::AbstractView::centralWidget [protected]
std::list<QAction *> tlp::AbstractView::interactorsActionList [protected]
std::map<std::string,std::vector<Interactor *> > tlp::AbstractView::interactorsMap [protected]
QVBoxLayout* tlp::AbstractView::mainLayout [protected]
QWidget* tlp::AbstractView::widget [protected]
Author
Generated automatically by Doxygen for Tulip QT Library from the source code.