Overview     Modules     Class Hierarchy     Classes     Members  
tlp::ControllerViewsManager Class Reference

Views manager for Controller. More...

#include <ControllerViewsManager.h>

Inheritance diagram for tlp::ControllerViewsManager:
Collaboration diagram for tlp::ControllerViewsManager:

List of all members.

Public Member Functions

 ControllerViewsManager ()
virtual ~ControllerViewsManager ()
void attachMainWindow (MainWindowFacade facade)
virtual Graph * getGraph ()
virtual Graph * getCurrentGraph ()
virtual void setCurrentGraph (Graph *graph)
virtual ViewgetCurrentView ()
virtual unsigned int getViewsNumber () const
virtual Graph * getGraphOfView (View *view)
virtual std::vector< View * > getViewsOfGraph (Graph *graph)
virtual void setGraphOfView (View *view, Graph *graph)
virtual void setDataOfView (tlp::View *view, tlp::Graph *graph, const tlp::DataSet &dataSet)
virtual ViewgetViewOfWidget (QWidget *widget)
virtual void setViewOfWidget (QWidget *widget, View *view)
virtual void getViews (std::vector< View * > &views)
virtual QWidget * getWidgetOfView (View *view)
virtual std::string getNameOfView (View *view) const
virtual void setNameOfView (View *view, const std::string &name)
virtual QWidget * getInteractorConfigurationWidgetOfView (View *view)
virtual void changeWindowTitle (Graph *graph)
 Change the title of views of graph : graph Through all opened views and change window title of view that visualize the graph Window title is : view name + visualized graph name.
virtual void closeAllViews ()
virtual void closeView (View *view)
virtual void closeViewsRelatedToGraph (Graph *graph)
virtual ViewcreateView (const std::string &name, Graph *graph, DataSet dataSet, bool forceWidgetSize, const QRect &rect, bool maximized)
void addView (View *view, Graph *graph, DataSet dataSet, bool forceWidgetSize, const QRect &rect, bool maximized, const std::string &viewName, QWidget *viewWidget)
virtual void installInteractors (View *view)
virtual void updateViewsOfGraph (Graph *graph)
virtual void updateViewsOfSubGraphs (Graph *graph)
virtual void changeGraphOfViews (Graph *oldGraph, Graph *newGraph)
virtual void drawViews (bool init=false)
virtual void saveViewsGraphsHierarchies ()
virtual void checkViewsGraphsHierarchy ()
- Public Member Functions inherited from tlp::Controller
virtual ~Controller ()
virtual void setData (Graph *graph=0, DataSet dataSet=DataSet())=0
virtual void getData (Graph **graph, DataSet *data)=0
MainWindowFacadegetMainWindowFacade ()

Protected Slots

virtual void createView (QAction *action)
virtual bool windowActivated (QWidget *widget)
virtual bool changeInteractor ()
virtual bool changeInteractor (QAction *action)
virtual bool changeInteractor (QAction *action, QWidget **configurationWidget)
virtual bool changeGraph (Graph *graph)
virtual void widgetWillBeClosed (QObject *object)

Protected Attributes

ViewcurrentView
std::map< View *, QAction * > lastInteractorOnView
Graph * currentGraph
std::map< View *, std::string > viewNames
std::map< QWidget *, View * > viewWidget
std::map< View *, Graph * > viewGraph
std::map< View *, QWidget * > lastInteractorConfigurationWidgetOnView
std::map< View *, std::list
< unsigned int > > 
viewsGraphsHierarchy
- Protected Attributes inherited from tlp::Controller
MainWindowFacade mainWindowFacade

Additional Inherited Members

- Signals inherited from tlp::Controller
void willBeClosed ()
- Static Public Member Functions inherited from tlp::Controller
static void currentActiveController (Controller *controller)
static ControllergetCurrentController ()
- Static Protected Attributes inherited from tlp::Controller
static ControllercurrentController

Detailed Description

Views manager for Controller.

This class manage views for Controllers


Constructor & Destructor Documentation

tlp::ControllerViewsManager::ControllerViewsManager ( )
virtual tlp::ControllerViewsManager::~ControllerViewsManager ( )
virtual

Member Function Documentation

void tlp::ControllerViewsManager::addView ( View view,
Graph *  graph,
DataSet  dataSet,
bool  forceWidgetSize,
const QRect &  rect,
bool  maximized,
const std::string &  viewName,
QWidget *  viewWidget 
)

Initialize an already created view and set it into the workspace with the specified position, size, etc See ControllerViewsManager::createView() for details.

void tlp::ControllerViewsManager::attachMainWindow ( MainWindowFacade  facade)
virtual

Attach the QMainWindow to the controller

Reimplemented from tlp::Controller.

Reimplemented in tlp::MainController.

virtual bool tlp::ControllerViewsManager::changeGraph ( Graph *  graph)
protectedvirtualslot

Change the graph on the currentView

Reimplemented in tlp::MainController.

virtual void tlp::ControllerViewsManager::changeGraphOfViews ( Graph *  oldGraph,
Graph *  newGraph 
)
virtual

Change graph of view that use oldGraph (call setGraph on these views)

virtual bool tlp::ControllerViewsManager::changeInteractor ( )
protectedvirtualslot

Load the interactor (in this function we catch the QAction who send this signal) in current View

virtual bool tlp::ControllerViewsManager::changeInteractor ( QAction *  action)
protectedvirtualslot

Load the interactor (referenced by the given QAction) in current View

Reimplemented in tlp::MainController.

virtual bool tlp::ControllerViewsManager::changeInteractor ( QAction *  action,
QWidget **  configurationWidget 
)
protectedvirtualslot

Load the interactor (referenced by the given QAction) in current View ConfigurationWidget of this interactor is store in configurationWidget;

virtual void tlp::ControllerViewsManager::changeWindowTitle ( Graph *  graph)
virtual

Change the title of views of graph : graph Through all opened views and change window title of view that visualize the graph Window title is : view name + visualized graph name.

virtual void tlp::ControllerViewsManager::checkViewsGraphsHierarchy ( )
virtual

Check hierarchy of graphs for all views

virtual void tlp::ControllerViewsManager::closeAllViews ( )
virtual

Close all the views.

virtual void tlp::ControllerViewsManager::closeView ( View view)
virtual

Close the given view.

virtual void tlp::ControllerViewsManager::closeViewsRelatedToGraph ( Graph *  graph)
virtual

Close all the views for the given graph.

virtual View* tlp::ControllerViewsManager::createView ( const std::string &  name,
Graph *  graph,
DataSet  dataSet,
bool  forceWidgetSize,
const QRect &  rect,
bool  maximized 
)
virtual

Create a view with given name/graph/dataSet, set position and size of this view at rect and maximize it if maximized is at true if forceWidgetSize is false : use rect size only if created widget have a size smaller than (10,10) Return new created view

Reimplemented in tlp::MainController.

virtual void tlp::ControllerViewsManager::createView ( QAction *  action)
protectedvirtualslot

Create an empty view with action->text() name and currentGraph

virtual void tlp::ControllerViewsManager::drawViews ( bool  init = false)
virtual

Call draw/init on views, if call init() if init==true and draw() else

Reimplemented in tlp::MainController.

virtual Graph* tlp::ControllerViewsManager::getCurrentGraph ( )
virtual

Return the Graph visualized by the current view in the controller Equivalent to getGraph()

virtual View* tlp::ControllerViewsManager::getCurrentView ( )
virtual

Return the current view in the controller

virtual Graph* tlp::ControllerViewsManager::getGraph ( )
virtual

Return the Graph visualized by the controller Equivalent to getCurrentGraph()

Implements tlp::Controller.

virtual Graph* tlp::ControllerViewsManager::getGraphOfView ( View view)
virtual

Get the graph associated with the given view

virtual QWidget* tlp::ControllerViewsManager::getInteractorConfigurationWidgetOfView ( View view)
virtual

Get the configuration widget of interactor activated for this view

virtual std::string tlp::ControllerViewsManager::getNameOfView ( View view) const
virtual

Get the name of the given view

virtual View* tlp::ControllerViewsManager::getViewOfWidget ( QWidget *  widget)
virtual

Get the view associated with the given widget

virtual void tlp::ControllerViewsManager::getViews ( std::vector< View * > &  views)
virtual

Get views

virtual unsigned int tlp::ControllerViewsManager::getViewsNumber ( ) const
virtual

Return the number of opened view

virtual std::vector<View*> tlp::ControllerViewsManager::getViewsOfGraph ( Graph *  graph)
virtual

return the views for the given graph.

virtual QWidget* tlp::ControllerViewsManager::getWidgetOfView ( View view)
virtual

Get the widget associated with the given view

virtual void tlp::ControllerViewsManager::installInteractors ( View view)
virtual

Put interactors of the given view in graphToolBar

virtual void tlp::ControllerViewsManager::saveViewsGraphsHierarchies ( )
virtual

Store hierarchy of graphs for all views

virtual void tlp::ControllerViewsManager::setCurrentGraph ( Graph *  graph)
virtual

Set the graph visualized by the current view in the controller

virtual void tlp::ControllerViewsManager::setDataOfView ( tlp::View view,
tlp::Graph *  graph,
const tlp::DataSet &  dataSet 
)
virtual

Set the data of the given view.

virtual void tlp::ControllerViewsManager::setGraphOfView ( View view,
Graph *  graph 
)
virtual

Set the graph associated with the given view

virtual void tlp::ControllerViewsManager::setNameOfView ( View view,
const std::string &  name 
)
virtual

Set the name of the given view

virtual void tlp::ControllerViewsManager::setViewOfWidget ( QWidget *  widget,
View view 
)
virtual

Set the view associated with the given widget

virtual void tlp::ControllerViewsManager::updateViewsOfGraph ( Graph *  graph)
virtual

Update view that use given graph (call setGraph on these views)

virtual void tlp::ControllerViewsManager::updateViewsOfSubGraphs ( Graph *  graph)
virtual

Update view that use sub graph of given graph (call setGraph on these views)

virtual void tlp::ControllerViewsManager::widgetWillBeClosed ( QObject *  object)
protectedvirtualslot

This slot is call went a view will be closed

Reimplemented in tlp::MainController.

virtual bool tlp::ControllerViewsManager::windowActivated ( QWidget *  widget)
protectedvirtualslot

This function is call when a view is activated Return true if view can be activated (ie this view exist)

Reimplemented in tlp::MainController.


Member Data Documentation

Graph* tlp::ControllerViewsManager::currentGraph
protected
View* tlp::ControllerViewsManager::currentView
protected
std::map<View *, QWidget *> tlp::ControllerViewsManager::lastInteractorConfigurationWidgetOnView
protected
std::map<View *, QAction *> tlp::ControllerViewsManager::lastInteractorOnView
protected
std::map<View *,Graph* > tlp::ControllerViewsManager::viewGraph
protected
std::map<View *,std::string> tlp::ControllerViewsManager::viewNames
protected
std::map<View *,std::list<unsigned int> > tlp::ControllerViewsManager::viewsGraphsHierarchy
protected
std::map<QWidget *,View*> tlp::ControllerViewsManager::viewWidget
protected


Tulip Software by LaBRI Visualization Team    2001 - 2012