Overview | Modules | Class Hierarchy | Classes | Members

# tlp::ControllerViewsManager Class Reference

`#include <ControllerViewsManager.h>`

Inherits tlp::Controller.

Inherited by tlp::MainController.

Inheritance diagram for tlp::ControllerViewsManager:

[legend]
Collaboration diagram for tlp::ControllerViewsManager:

[legend]
List of all members.

## Detailed Description

Views manager for Controller.

This class manage views for Controllers

## Public Member Functions

- ControllerViewsManager ()
- virtual ~ControllerViewsManager ()
- void attachMainWindow (MainWindowFacade facade)
- virtual Graph * getGraph ()
- virtual Graph * getCurrentGraph ()
- virtual void setCurrentGraph (Graph *graph)
- virtual View * getCurrentView ()
- virtual unsigned int getViewsNumber ()
- virtual Graph * getGraphOfView (View *view)
- virtual std::vector< View * > getViewsOfGraph (Graph *graph)
- virtual void setGraphOfView (View *view, Graph *graph)
- virtual View * getViewOfWidget (QWidget *widget)
- virtual void setViewOfWidget (QWidget *widget, View *view)
- virtual QWidget * getWidgetOfView (View *view)
- virtual std::string getNameOfView (View *view)
- virtual void setNameOfView (View *view, const std::string &name)
- virtual void closeAllViews ()
- virtual void closeView (View *view)
- virtual void closeViewsRelatedToGraph (Graph *graph)
- virtual View * createView (const std::string &name, Graph *graph, DataSet dataSet, bool forceWidgetSize, const QRect &rect, bool maximized)
- 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 ()

## 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)

## Constructor & Destructor Documentation

tlp::ControllerViewsManager::ControllerViewsManager | ( |  | ) |

virtual tlp::ControllerViewsManager::~ControllerViewsManager | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

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 | ) | `[protected, virtual, slot]`

| 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 | ( | QAction * | action,
|  | QWidget ** | configurationWidget
| ) | `[protected, virtual, slot]`

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

virtual bool tlp::ControllerViewsManager::changeInteractor | ( | QAction * | action | ) | `[protected, virtual, slot]`

| Load the interactor (referenced by the given QAction) in current View Reimplemented in tlp::MainController.

virtual bool tlp::ControllerViewsManager::changeInteractor | ( |  | ) | `[protected, virtual, slot]`

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

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 void tlp::ControllerViewsManager::createView | ( | QAction * | action | ) | `[protected, virtual, slot]`

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

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::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 std::string tlp::ControllerViewsManager::getNameOfView | ( | View * | view | ) | `[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 unsigned int tlp::ControllerViewsManager::getViewsNumber | ( |  | ) | `[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::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 | ) | `[protected, virtual, slot]`

| This slot is call went a view will be closed

virtual bool tlp::ControllerViewsManager::windowActivated | ( | QWidget * | widget | ) | `[protected, virtual, slot]`

| This function is call when a view is activated Return true if view can be activated (ie this view exist) Reimplemented in tlp::MainController.

Tulip Software by LaBRI Visualization Team 2001 - 2010