sofa::gui::qt::SofaModeler Class Reference

#include <SofaModeler.h>

Inheritance diagram for sofa::gui::qt::SofaModeler:

Inheritance graph
[legend]
Collaboration diagram for sofa::gui::qt::SofaModeler:

Collaboration graph
[legend]

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

Detailed Description

Definition at line 82 of file SofaModeler.h.


Constructor & Destructor Documentation

sofa::gui::qt::SofaModeler::SofaModeler (  ) 

sofa::gui::qt::SofaModeler::~SofaModeler (  )  [inline]

Definition at line 89 of file SofaModeler.h.


Member Function Documentation

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.

References mapWindow, and sceneTab.

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

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]

Definition at line 700 of file SofaModeler.cpp.

References fileOpen().

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]

Quit the Modeler.

Reimplemented from Modeler.

Definition at line 136 of file SofaModeler.h.

void sofa::gui::qt::SofaModeler::fileNew ( GNode *  root  )  [slot]

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]

Definition at line 121 of file SofaModeler.h.

References fileOpen().

Referenced by fileOpen().

void sofa::gui::qt::SofaModeler::fileOpen ( std::string  filename  )  [slot]

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]

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]

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]

Definition at line 754 of file SofaModeler.cpp.

Referenced by SofaModeler().

void sofa::gui::qt::SofaModeler::runInSofa (  )  [virtual, slot]

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().


Field Documentation

Definition at line 213 of file SofaModeler.h.

Referenced by runInSofa(), and SofaModeler().

Definition at line 212 of file SofaModeler.h.

Referenced by fileOpen(), fileSaveAs(), and SofaModeler().

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().

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().

Definition at line 207 of file SofaModeler.h.

Referenced by closeTab(), and runInSofa().

Definition at line 208 of file SofaModeler.h.

Referenced by changeCurrentScene(), closeTab(), and fileOpen().

Menu recently opened.

Menu preset

Definition at line 199 of file SofaModeler.h.

Referenced by createTab(), and SofaModeler().

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().

Current opened Tab.

Definition at line 195 of file SofaModeler.h.

Referenced by changeCurrentScene(), closeTab(), createTab(), fileOpen(), fileSaveAs(), and runInSofa().

Definition at line 200 of file SofaModeler.h.

Referenced by closeTab(), fileOpen(), and SofaModeler().


The documentation for this class was generated from the following files:

Generated on Sun Nov 23 04:24:10 2008 for Sofa by  doxygen 1.5.7.1