Views manager for Controller.
More...
#include <ControllerViewsManager.h>
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 View * | getCurrentView () |
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 View * | getViewOfWidget (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 View * | createView (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 () |
virtual | ~Controller () |
virtual void | setData (Graph *graph=0, DataSet dataSet=DataSet())=0 |
virtual void | getData (Graph **graph, DataSet *data)=0 |
MainWindowFacade * | getMainWindowFacade () |
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 |
|
) |
| |
virtual bool tlp::ControllerViewsManager::changeGraph |
( |
Graph * |
graph | ) |
|
|
protectedvirtualslot |
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 |
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 |
virtual void tlp::ControllerViewsManager::closeView |
( |
View * |
view | ) |
|
|
virtual |
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 |
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 |
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 |
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 |
|