Default controller of Tulip.
More...
#include <MainController.h>
Public Member Functions |
| | MainController () |
| virtual | ~MainController () |
| void | attachMainWindow (MainWindowFacade facade) |
| void | setData (Graph *graph=0, DataSet dataSet=DataSet()) |
| void | getData (Graph **graph, DataSet *dataSet) |
| void | buildMenu () |
| | ControllerViewsManager () |
| virtual | ~ControllerViewsManager () |
| 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) |
| 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 | saveViewsGraphsHierarchies () |
| virtual void | checkViewsGraphsHierarchy () |
| virtual | ~Controller () |
| MainWindowFacade * | getMainWindowFacade () |
Protected Types |
typedef std::set
< tlp::Observable * >
::iterator | ObserverIterator |
Protected Member Functions |
| void | initializeGraph (Graph *graph) |
| void | loadGUI () |
| View * | initMainView (DataSet dataSet) |
| virtual View * | createView (const std::string &name, Graph *graph, DataSet dataSet, bool forceWidgetSize=true, const QRect &rect=QRect(0, 0, 0, 0), bool maximized=false) |
| virtual void | drawViews (bool init=false) |
| void | observableDestroyed (Observable *) |
| void | update (ObserverIterator begin, ObserverIterator end) |
| void | initObservers () |
| void | clearObservers () |
| void | addSubGraph (Graph *, Graph *) |
| void | delSubGraph (Graph *, Graph *) |
| void | addLocalProperty (Graph *, const std::string &) |
| void | delLocalProperty (Graph *, const std::string &) |
| void | afterSetAttribute (Graph *, const std::string &) |
| void | updateCurrentGraphInfos () |
| void | afterChangeProperty () |
| GraphState * | constructGraphState () |
| void | applyMorphing (GraphState *graphState) |
Detailed Description
Default controller of Tulip.
This Controller create a GUI like the old Tulip On left : Property, and hierarchical view In view menu you have access to all view plugins
Member Typedef Documentation
Constructor & Destructor Documentation
| tlp::MainController::MainController |
( |
| ) |
|
| virtual tlp::MainController::~MainController |
( |
| ) |
|
|
virtual |
Member Function Documentation
| void tlp::MainController::addLocalProperty |
( |
Graph * |
, |
|
|
const std::string & |
|
|
) |
| |
|
protected |
Called when a local property is added
| void tlp::MainController::addSubGraph |
( |
Graph * |
, |
|
|
Graph * |
|
|
) |
| |
|
protected |
Called when a subgraph is added.
| void tlp::MainController::afterChangeProperty |
( |
| ) |
|
|
protected |
Activate undo/redo button, reload propertyWidget and redrawViews after we have change a property
| void tlp::MainController::afterSetAttribute |
( |
Graph * |
, |
|
|
const std::string & |
|
|
) |
| |
|
protected |
Called when an attribute is set on a graph
| void tlp::MainController::applyAlgorithm |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::applyMorphing |
( |
GraphState * |
graphState | ) |
|
|
protected |
Do a morphing between current state and the given GraphState
| void tlp::MainController::buildMenu |
( |
| ) |
|
| void tlp::MainController::changeColors |
( |
| ) |
|
|
protectedslot |
| virtual bool tlp::MainController::changeGraph |
( |
Graph * |
graph | ) |
|
|
protectedvirtualslot |
Change the graph and load it in left part of the GUI
| void tlp::MainController::changeInt |
( |
| ) |
|
|
protectedslot |
| virtual bool tlp::MainController::changeInteractor |
( |
QAction * |
action | ) |
|
|
protectedvirtualslot |
Load the interactor (referenced by the given QAction) in current View
| void tlp::MainController::changeLayout |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::changeMetric |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::changeSelection |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::changeSizes |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::changeString |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::clearObservers |
( |
| ) |
|
|
protected |
| GraphState* tlp::MainController::constructGraphState |
( |
| ) |
|
|
protected |
Store current view in a GraphState to use it with applyMorphing function
| virtual View* tlp::MainController::createView |
( |
const std::string & |
name, |
|
|
Graph * |
graph, |
|
|
DataSet |
dataSet, |
|
|
bool |
forceWidgetSize = true, |
|
|
const QRect & |
rect = QRect(0, 0, 0, 0), |
|
|
bool |
maximized = false |
|
) |
| |
|
protectedvirtual |
| void tlp::MainController::delLocalProperty |
( |
Graph * |
, |
|
|
const std::string & |
|
|
) |
| |
|
protected |
Called when a local property is deleted
| void tlp::MainController::delSubGraph |
( |
Graph * |
, |
|
|
Graph * |
|
|
) |
| |
|
protected |
Called when a subgraph is removed.
| virtual void tlp::MainController::drawViews |
( |
bool |
init = false | ) |
|
|
protectedvirtual |
| void tlp::MainController::editCopy |
( |
| ) |
|
|
slot |
| void tlp::MainController::editCreateGroup |
( |
| ) |
|
|
slot |
| void tlp::MainController::editCreateSubgraph |
( |
| ) |
|
|
slot |
| void tlp::MainController::editCut |
( |
| ) |
|
|
slot |
| void tlp::MainController::editDelSelection |
( |
| ) |
|
|
slot |
| void tlp::MainController::editDeselectAll |
( |
| ) |
|
|
slot |
| void tlp::MainController::editFind |
( |
| ) |
|
|
slot |
| void tlp::MainController::editPaste |
( |
| ) |
|
|
slot |
| void tlp::MainController::editReverseSelection |
( |
| ) |
|
|
slot |
| void tlp::MainController::editSelectAll |
( |
| ) |
|
|
slot |
| void tlp::MainController::filePrint |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::getData |
( |
Graph ** |
graph, |
|
|
DataSet * |
dataSet |
|
) |
| |
|
virtual |
Return the graph and the dataSet of the controller
Implements tlp::Controller.
| void tlp::MainController::graphAboutToBeRemove |
( |
Graph * |
graph | ) |
|
|
protectedslot |
Clear observers when a graph is about to be remove
| void tlp::MainController::initializeGraph |
( |
Graph * |
graph | ) |
|
|
protected |
Set the default initialization of the graph
| View* tlp::MainController::initMainView |
( |
DataSet |
dataSet | ) |
|
|
protected |
| void tlp::MainController::initObservers |
( |
| ) |
|
|
protected |
Init all observers (graph and properties)
| void tlp::MainController::isAcyclic |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::isBiconnected |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::isConnected |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::isFreeTree |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::isOuterPlanar |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::isPlanar |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::isSimple |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::isTree |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::isTriconnected |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::loadGUI |
( |
| ) |
|
|
protected |
| void tlp::MainController::makeAcyclic |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::makeBiconnected |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::makeConnected |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::makeDirected |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::makeSimple |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::observableDestroyed |
( |
Observable * |
| ) |
|
|
protected |
This function is call when an observable is destroyed
| void tlp::MainController::redo |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::reverseSelectedEdgeDirection |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::setData |
( |
Graph * |
graph = 0, |
|
|
DataSet |
dataSet = DataSet() |
|
) |
| |
|
virtual |
| void tlp::MainController::showElementProperties |
( |
unsigned int |
eltId, |
|
|
bool |
isNode |
|
) |
| |
|
protectedslot |
This slot is call when a view emit elementSelected Show the element in left part of the GUI
| void tlp::MainController::showGraphEditor |
( |
| ) |
|
|
protectedslot |
This slot is call to ensure the Graph Editor is visible
| void tlp::MainController::showViewEditor |
( |
| ) |
|
|
protectedslot |
This slot is call to ensure the View Editor is visible
| void tlp::MainController::snapshot |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::undo |
( |
| ) |
|
|
protectedslot |
This function is call when an observable is update
| void tlp::MainController::updateCurrentGraphInfos |
( |
| ) |
|
|
protected |
Update number of nodes/edges in the status bar and the cluster tree widget.
| void tlp::MainController::updateUndoRedoInfos |
( |
| ) |
|
|
protectedslot |
| void tlp::MainController::viewRequestChangeGraph |
( |
tlp::View * |
view, |
|
|
tlp::Graph * |
graph |
|
) |
| |
|
protectedslot |
This slot is call when a view want to change its graph
| virtual void tlp::MainController::widgetWillBeClosed |
( |
QObject * |
object | ) |
|
|
protectedvirtualslot |
This slot is call went a view will be closed
| virtual bool tlp::MainController::windowActivated |
( |
QWidget * |
w | ) |
|
|
protectedvirtualslot |
This function is call when a view is activated Return true if view can be activated (ie this view exist)
Member Data Documentation
| QMenu* tlp::MainController::algorithmMenu |
|
protected |
| bool tlp::MainController::blockUpdate |
|
protected |
| QMenu* tlp::MainController::colorsMenu |
|
protected |
| QDockWidget* tlp::MainController::configWidgetDock |
|
protected |
| QTabWidget* tlp::MainController::configWidgetTab |
|
protected |
| unsigned int tlp::MainController::currentGraphNbEdges |
|
protected |
| unsigned int tlp::MainController::currentGraphNbNodes |
|
protected |
| QMenu* tlp::MainController::editMenu |
|
protected |
| QAction* tlp::MainController::editRedoAction |
|
protected |
| QAction* tlp::MainController::editUndoAction |
|
protected |
| QAction* tlp::MainController::forceRatioAction |
|
protected |
| QMenu* tlp::MainController::generalMenu |
|
protected |
| QMenu* tlp::MainController::graphMenu |
|
protected |
| Graph* tlp::MainController::graphToReload |
|
protected |
| bool tlp::MainController::inAlgorithm |
|
protected |
| QMenu* tlp::MainController::intMenu |
|
protected |
| std::map<View *, int> tlp::MainController::lastConfigTabIndexOnView |
|
protected |
| QMenu* tlp::MainController::layoutMenu |
|
protected |
| QAction* tlp::MainController::mapMetricAction |
|
protected |
| QMenu* tlp::MainController::metricMenu |
|
protected |
| Morphing* tlp::MainController::morph |
|
protected |
| QAction* tlp::MainController::morphingAction |
|
protected |
| QMenu* tlp::MainController::optionsMenu |
|
protected |
| QAction* tlp::MainController::printAction |
|
protected |
| bool tlp::MainController::propertiesListUpdated |
|
protected |
| QAction* tlp::MainController::redoAction |
|
protected |
| QMenu* tlp::MainController::selectMenu |
|
protected |
| QMenu* tlp::MainController::sizesMenu |
|
protected |
| QAction* tlp::MainController::snapshotAction |
|
protected |
| QMenu* tlp::MainController::stringMenu |
|
protected |
| QDockWidget* tlp::MainController::tabWidgetDock |
|
protected |
| QAction* tlp::MainController::undoAction |
|
protected |
| QMenu* tlp::MainController::viewMenu |
|
protected |
|