#include <SofaModeler.h>


Public Slots | |
| void | releaseButton () |
| void | changeComponent (ClassInfo *currentComponent) |
| void | changeInformation (QListViewItem *) |
| void | newGNode () |
| Dropping a Node in the Graph. | |
| void | newComponent () |
| void | fileNew () |
| Creation of a new scene (new tab will be created). | |
| void | fileNew (GNode *root) |
| void | fileOpen () |
| Open an existing simulation (new tab will be created). | |
| void | fileOpen (std::string filename) |
| void | fileOpen (const QString &filename) |
| void | fileSave () |
| Save the current simulation. | |
| void | fileSave (std::string filename) |
| void | fileSaveAs () |
| void | clearTab () |
| Remove all components of the current simulation. | |
| void | closeTab () |
| Close the current simulation. | |
| void | newTab () |
| Create a new tab containing an empty simulation (by default the collision pipeline is added). | |
| void | fileExit () |
| Quit the Modeler. | |
| void | runInSofa () |
| Launch the current simulation into Sofa. | |
| void | changeCurrentScene (QWidget *) |
| Change of simulation by changing the current opened tabulation. | |
| void | changeCurrentScene (int n) |
| Change of simulation by changing the current opened tabulation. | |
| void | changeNameWindow (std::string filename) |
| Change the name of the main window. | |
| void | editUndo () |
| not implemented yet: would undo the last operation done in the current simulation | |
| void | editRedo () |
| not implemented yet: would redo the last operation done in the current simulation | |
| void | loadPreset (int) |
| Load a preset stored in the menu preset: add a node to the current simulation. | |
| ClassInfo * | getInfoFromName (std::string name) |
| From the name of the type of a component, gives serveral information. | |
| void | dragEnterEvent (QDragEnterEvent *event) |
| void | dragMoveEvent (QDragMoveEvent *event) |
| void | dropEvent (QDropEvent *event) |
| void | keyPressEvent (QKeyEvent *e) |
| void | fileRecentlyOpened (int id) |
| Open a recently Opened files from the menu Recently Opened Files... | |
| void | updateRecentlyOpened (std::string fileLoaded) |
| Update the menu Recently Opened Files... | |
Signals | |
| void | loadPresetGraph (std::string) |
Public Member Functions | |
| SofaModeler () | |
| ~SofaModeler () | |
| void | createTab () |
| Create a new empty Tab. | |
Protected Attributes | |
| QTabWidget * | sceneTab |
| Widget containing all the graphs. | |
| GraphModeler * | graph |
| Current in-use graph. | |
| QWidget * | tabGraph |
| Current opened Tab. | |
| Q3PopupMenu * | preset |
| Menu recently opened. | |
| Q3PopupMenu * | windowMenu |
| std::map< std::string, std::string > | mapPreset |
| Correspondance between a name clicked in the menu and a path to the preset. | |
| std::map< const QObject *, std::pair< ClassInfo *, QObject * > > | mapComponents |
| std::map< const QWidget *, GraphModeler * > | mapGraph |
| std::map< const QWidget *, sofa::gui::qt::RealGUI * > | mapSofa |
| std::map< int, QWidget * > | mapWindow |
Private Attributes | |
| std::string | presetPath |
| std::string | examplePath |
| char | count |
Definition at line 82 of file SofaModeler.h.
| sofa::gui::qt::SofaModeler::SofaModeler | ( | ) |
Definition at line 75 of file SofaModeler.cpp.
References Ui_Modeler::Action, projects::baseClasses, changeCurrentScene(), count, sofa::helper::system::DataRepository, examplePath, Ui_Modeler::fileMenu, fileOpen(), fileRecentlyOpened(), sofa::core::ObjectFactory::getAllEntries(), sofa::core::ObjectFactory::getInstance(), sofa::helper::system::SetDirectory::GetParentDir(), Ui_Modeler::GNodeButton, Ui_Modeler::gridLayout, Ui_Modeler::infoItem, loadPreset(), mapComponents, mapPreset, Ui_Modeler::menubar, newComponent(), preset, presetPath, Ui_Modeler::recentlyOpened, releaseButton(), sceneTab, Ui_Modeler::SofaComponents, Ui_Modeler::splitter2, updateRecentlyOpened(), and windowMenu.
| sofa::gui::qt::SofaModeler::~SofaModeler | ( | ) | [inline] |
Definition at line 89 of file SofaModeler.h.
| void sofa::gui::qt::SofaModeler::changeComponent | ( | ClassInfo * | currentComponent | ) | [slot] |
Definition at line 579 of file SofaModeler.cpp.
References sofa::helper::system::DataRepository, and Ui_Modeler::infoItem.
Referenced by changeInformation(), and newComponent().
| void sofa::gui::qt::SofaModeler::changeCurrentScene | ( | int | n | ) | [slot] |
Change of simulation by changing the current opened tabulation.
Definition at line 649 of file SofaModeler.cpp.
| void sofa::gui::qt::SofaModeler::changeCurrentScene | ( | QWidget * | currentGraph | ) | [slot] |
Change of simulation by changing the current opened tabulation.
Definition at line 640 of file SofaModeler.cpp.
References changeNameWindow(), sofa::gui::qt::GraphModeler::getFilename(), graph, mapGraph, and tabGraph.
Referenced by SofaModeler().
| void sofa::gui::qt::SofaModeler::changeInformation | ( | QListViewItem * | item | ) | [slot] |
Definition at line 544 of file SofaModeler.cpp.
References changeComponent(), and getInfoFromName().
Referenced by createTab().
| void sofa::gui::qt::SofaModeler::changeNameWindow | ( | std::string | filename | ) | [slot] |
Change the name of the main window.
Definition at line 655 of file SofaModeler.cpp.
References updateRecentlyOpened().
Referenced by changeCurrentScene(), fileNew(), fileOpen(), and fileSave().
| void sofa::gui::qt::SofaModeler::clearTab | ( | ) | [virtual, slot] |
Remove all components of the current simulation.
Reimplemented from Modeler.
Definition at line 343 of file SofaModeler.cpp.
References fileNew().
| void sofa::gui::qt::SofaModeler::closeTab | ( | ) | [virtual, slot] |
Close the current simulation.
Reimplemented from Modeler.
Definition at line 390 of file SofaModeler.cpp.
References sofa::gui::qt::GraphModeler::closeDialogs(), graph, mapGraph, mapSofa, mapWindow, sceneTab, tabGraph, and windowMenu.
| void sofa::gui::qt::SofaModeler::createTab | ( | ) |
Create a new empty Tab.
Definition at line 364 of file SofaModeler.cpp.
References changeInformation(), fileNew(), fileOpen(), graph, mapComponents, mapGraph, preset, sceneTab, sofa::gui::qt::GraphModeler::setLibrary(), sofa::gui::qt::GraphModeler::setPreset(), and tabGraph.
Referenced by fileOpen(), and newTab().
| void sofa::gui::qt::SofaModeler::dragEnterEvent | ( | QDragEnterEvent * | event | ) | [inline, slot] |
Definition at line 160 of file SofaModeler.h.
| void sofa::gui::qt::SofaModeler::dragMoveEvent | ( | QDragMoveEvent * | event | ) | [inline, slot] |
Definition at line 170 of file SofaModeler.h.
| void sofa::gui::qt::SofaModeler::dropEvent | ( | QDropEvent * | event | ) | [slot] |
| void sofa::gui::qt::SofaModeler::editRedo | ( | ) | [inline, virtual, slot] |
not implemented yet: would redo the last operation done in the current simulation
Reimplemented from Modeler.
Definition at line 151 of file SofaModeler.h.
References sofa::gui::qt::GraphModeler::editRedo(), and graph.
| void sofa::gui::qt::SofaModeler::editUndo | ( | ) | [inline, virtual, slot] |
not implemented yet: would undo the last operation done in the current simulation
Reimplemented from Modeler.
Definition at line 149 of file SofaModeler.h.
References sofa::gui::qt::GraphModeler::editUndo(), and graph.
| void sofa::gui::qt::SofaModeler::fileExit | ( | ) | [inline, virtual, slot] |
| void sofa::gui::qt::SofaModeler::fileNew | ( | GNode * | root | ) | [slot] |
Definition at line 320 of file SofaModeler.cpp.
References sofa::gui::qt::GraphModeler::addGNode(), changeNameWindow(), sofa::gui::qt::GraphModeler::clearGraph(), sofa::gui::qt::GraphModeler::getRoot(), graph, sceneTab, and sofa::gui::qt::GraphModeler::setFilename().
| void sofa::gui::qt::SofaModeler::fileNew | ( | ) | [inline, slot] |
Creation of a new scene (new tab will be created).
Definition at line 115 of file SofaModeler.h.
References fileNew().
Referenced by clearTab(), createTab(), fileNew(), and fileOpen().
| void sofa::gui::qt::SofaModeler::fileOpen | ( | const QString & | filename | ) | [inline, slot] |
| void sofa::gui::qt::SofaModeler::fileOpen | ( | std::string | filename | ) | [slot] |
Definition at line 428 of file SofaModeler.cpp.
References changeNameWindow(), createTab(), fileNew(), sofa::gui::qt::GraphModeler::getFilename(), sofa::helper::system::SetDirectory::GetFileName(), sofa::core::objectmodel::BaseObjectDescription::getObject(), graph, sofa::simulation::tree::xml::BaseElement::init(), sofa::simulation::tree::xml::loadFromFile(), mapWindow, sceneTab, sofa::gui::qt::GraphModeler::setFilename(), tabGraph, and windowMenu.
| void sofa::gui::qt::SofaModeler::fileOpen | ( | ) | [virtual, slot] |
Open an existing simulation (new tab will be created).
Reimplemented from Modeler.
Definition at line 333 of file SofaModeler.cpp.
References examplePath, sofa::gui::qt::getOpenFileName(), and sofa::helper::system::SetDirectory::GetParentDir().
Referenced by createTab(), dropEvent(), fileRecentlyOpened(), newTab(), and SofaModeler().
| void sofa::gui::qt::SofaModeler::fileRecentlyOpened | ( | int | id | ) | [slot] |
Open a recently Opened files from the menu Recently Opened Files...
Definition at line 453 of file SofaModeler.cpp.
References fileOpen(), and Ui_Modeler::recentlyOpened.
Referenced by SofaModeler().
| void sofa::gui::qt::SofaModeler::fileSave | ( | std::string | filename | ) | [slot] |
Definition at line 509 of file SofaModeler.cpp.
References changeNameWindow(), sofa::gui::qt::GraphModeler::getRoot(), sofa::simulation::tree::getSimulation(), graph, and sofa::simulation::tree::Simulation::printXML().
| void sofa::gui::qt::SofaModeler::fileSave | ( | ) | [virtual, slot] |
Save the current simulation.
Reimplemented from Modeler.
Definition at line 503 of file SofaModeler.cpp.
References fileSaveAs(), sofa::gui::qt::GraphModeler::getFilename(), and graph.
Referenced by fileSaveAs().
| void sofa::gui::qt::SofaModeler::fileSaveAs | ( | ) | [virtual, slot] |
Reimplemented from Modeler.
Definition at line 516 of file SofaModeler.cpp.
References examplePath, fileSave(), sofa::helper::system::SetDirectory::GetFileName(), sofa::helper::system::SetDirectory::GetParentDir(), sofa::gui::qt::getSaveFileName(), sceneTab, and tabGraph.
Referenced by fileSave().
| ClassInfo * sofa::gui::qt::SofaModeler::getInfoFromName | ( | std::string | name | ) | [slot] |
From the name of the type of a component, gives serveral information.
Definition at line 668 of file SofaModeler.cpp.
References mapComponents.
Referenced by changeInformation().
| void sofa::gui::qt::SofaModeler::keyPressEvent | ( | QKeyEvent * | e | ) | [slot] |
Definition at line 678 of file SofaModeler.cpp.
| void sofa::gui::qt::SofaModeler::loadPreset | ( | int | id | ) | [slot] |
Load a preset stored in the menu preset: add a node to the current simulation.
Definition at line 530 of file SofaModeler.cpp.
References sofa::helper::system::DataRepository, graph, sofa::gui::qt::GraphModeler::loadPreset(), mapPreset, and presetPath.
Referenced by SofaModeler().
| void sofa::gui::qt::SofaModeler::loadPresetGraph | ( | std::string | _t1 | ) | [signal] |
Definition at line 162 of file moc_SofaModeler.cpp.
| void sofa::gui::qt::SofaModeler::newComponent | ( | ) | [slot] |
Definition at line 557 of file SofaModeler.cpp.
References changeComponent(), and mapComponents.
Referenced by SofaModeler().
| void sofa::gui::qt::SofaModeler::newGNode | ( | ) | [virtual, slot] |
Dropping a Node in the Graph.
Reimplemented from Modeler.
Definition at line 632 of file SofaModeler.cpp.
| void sofa::gui::qt::SofaModeler::newTab | ( | ) | [virtual, slot] |
Create a new tab containing an empty simulation (by default the collision pipeline is added).
Reimplemented from Modeler.
Definition at line 349 of file SofaModeler.cpp.
References createTab(), sofa::helper::system::DataRepository, fileOpen(), graph, and sofa::gui::qt::GraphModeler::setFilename().
| void sofa::gui::qt::SofaModeler::releaseButton | ( | ) | [slot] |
| void sofa::gui::qt::SofaModeler::runInSofa | ( | ) | [virtual, slot] |
Launch the current simulation into Sofa.
Reimplemented from Modeler.
Definition at line 727 of file SofaModeler.cpp.
References count, sofa::gui::qt::RealGUI::fileOpen(), sofa::gui::SofaGUI::GetGUIName(), sofa::gui::qt::GraphModeler::getRoot(), sofa::simulation::tree::getSimulation(), graph, sofa::gui::qt::gui, sofa::gui::SofaGUI::Init(), mapSofa, presetPath, sofa::simulation::tree::Simulation::printXML(), sceneTab, and tabGraph.
| void sofa::gui::qt::SofaModeler::updateRecentlyOpened | ( | std::string | fileLoaded | ) | [slot] |
Update the menu Recently Opened Files...
Definition at line 458 of file SofaModeler.cpp.
References sofa::helper::system::DataRepository, and Ui_Modeler::recentlyOpened.
Referenced by changeNameWindow(), and SofaModeler().
char sofa::gui::qt::SofaModeler::count [private] |
std::string sofa::gui::qt::SofaModeler::examplePath [private] |
Definition at line 212 of file SofaModeler.h.
Referenced by fileOpen(), fileSaveAs(), and SofaModeler().
GraphModeler* sofa::gui::qt::SofaModeler::graph [protected] |
Current in-use graph.
Definition at line 193 of file SofaModeler.h.
Referenced by changeCurrentScene(), closeTab(), createTab(), editRedo(), editUndo(), fileNew(), fileOpen(), fileSave(), loadPreset(), newTab(), and runInSofa().
std::map< const QObject* , std::pair<ClassInfo*, QObject*> > sofa::gui::qt::SofaModeler::mapComponents [protected] |
Definition at line 205 of file SofaModeler.h.
Referenced by createTab(), getInfoFromName(), newComponent(), and SofaModeler().
std::map< const QWidget*, GraphModeler*> sofa::gui::qt::SofaModeler::mapGraph [protected] |
Definition at line 206 of file SofaModeler.h.
Referenced by changeCurrentScene(), closeTab(), and createTab().
std::map< std::string, std::string > sofa::gui::qt::SofaModeler::mapPreset [protected] |
Correspondance between a name clicked in the menu and a path to the preset.
Definition at line 202 of file SofaModeler.h.
Referenced by loadPreset(), and SofaModeler().
std::map< const QWidget*, sofa::gui::qt::RealGUI*> sofa::gui::qt::SofaModeler::mapSofa [protected] |
std::map< int, QWidget*> sofa::gui::qt::SofaModeler::mapWindow [protected] |
Definition at line 208 of file SofaModeler.h.
Referenced by changeCurrentScene(), closeTab(), and fileOpen().
Q3PopupMenu* sofa::gui::qt::SofaModeler::preset [protected] |
Menu recently opened.
Menu preset
Definition at line 199 of file SofaModeler.h.
Referenced by createTab(), and SofaModeler().
std::string sofa::gui::qt::SofaModeler::presetPath [private] |
Definition at line 211 of file SofaModeler.h.
Referenced by loadPreset(), runInSofa(), and SofaModeler().
QTabWidget* sofa::gui::qt::SofaModeler::sceneTab [protected] |
Widget containing all the graphs.
Definition at line 191 of file SofaModeler.h.
Referenced by changeCurrentScene(), closeTab(), createTab(), fileNew(), fileOpen(), fileSaveAs(), runInSofa(), and SofaModeler().
QWidget* sofa::gui::qt::SofaModeler::tabGraph [protected] |
Current opened Tab.
Definition at line 195 of file SofaModeler.h.
Referenced by changeCurrentScene(), closeTab(), createTab(), fileOpen(), fileSaveAs(), and runInSofa().
Q3PopupMenu* sofa::gui::qt::SofaModeler::windowMenu [protected] |
Definition at line 200 of file SofaModeler.h.
Referenced by closeTab(), fileOpen(), and SofaModeler().
1.5.7.1