Privacy
An open-source, flexible 3D physical simulation framework
mars::gui::MenuAdd Class Reference

MenuAdd creates the menus and menu items in the File menu of the simulation. More...

#include <MenuAdd.h>

Public Member Functions

 MenuAdd (interfaces::ControlCenter *c, main_gui::GuiInterface *gui, std::string resPath, lib_manager::LibManager *theManager)
 The constructor adds the actions to the File menu. More...
 
 ~MenuAdd ()
 
virtual void menuAction (int action, bool checked=false)
 Called whenever a menu item is selected. More...
 
- Public Member Functions inherited from mars::main_gui::MenuInterface
virtual ~MenuInterface ()
 

Private Slots

void addObject ()
 
void selectFile ()
 

Private Member Functions

void menu_addBox (const std::string &name)
 
void menu_addSphere (const std::string &name)
 
void menu_addPlane (const std::string &name)
 
void menu_addMaterial (const std::string &name)
 
void menu_addLight (const std::string &name)
 
void menu_addMotor (const std::string &name)
 
void menu_addJoint (const std::string &name)
 
void menu_addMesh (const std::string &name)
 

Private Attributes

lib_manager::LibManagerlibManager
 
main_gui::GuiInterfacemainGui
 
interfaces::ControlCentercontrol
 
configmaps::ConfigMap material
 
configmaps::ConfigMap defaultLight
 
QWidget * widgetAdd
 
QLabel * addLabel
 
QLabel * comboLabel1
 
QLabel * comboLabel2
 
QLabel * comboLabel3
 
QLabel * label3
 
QLineEdit * addLineEdit
 
QLineEdit * addLineEdit2
 
QPushButton * openFile
 
QGridLayout * gridLayout
 
QVBoxLayout * vLayout
 
QComboBox * combo1
 
QComboBox * combo2
 
QComboBox * combo3
 
int addType
 

Detailed Description

MenuAdd creates the menus and menu items in the File menu of the simulation.

Definition at line 69 of file MenuAdd.h.

Constructor & Destructor Documentation

◆ MenuAdd()

mars::gui::MenuAdd::MenuAdd ( interfaces::ControlCenter c,
main_gui::GuiInterface gui,
std::string  resPath,
lib_manager::LibManager theManager 
)

The constructor adds the actions to the File menu.

MenuAdd creates the menus and menu items in the File menu of the simulation.

Definition at line 65 of file MenuAdd.cpp.

◆ ~MenuAdd()

mars::gui::MenuAdd::~MenuAdd ( )

Definition at line 186 of file MenuAdd.cpp.

Member Function Documentation

◆ addObject

void mars::gui::MenuAdd::addObject ( )
privateslot

Definition at line 284 of file MenuAdd.cpp.

◆ menu_addBox()

void mars::gui::MenuAdd::menu_addBox ( const std::string &  name)
private

Definition at line 375 of file MenuAdd.cpp.

◆ menu_addJoint()

void mars::gui::MenuAdd::menu_addJoint ( const std::string &  name)
private

Definition at line 317 of file MenuAdd.cpp.

◆ menu_addLight()

void mars::gui::MenuAdd::menu_addLight ( const std::string &  name)
private

Definition at line 342 of file MenuAdd.cpp.

◆ menu_addMaterial()

void mars::gui::MenuAdd::menu_addMaterial ( const std::string &  name)
private

Definition at line 352 of file MenuAdd.cpp.

◆ menu_addMesh()

void mars::gui::MenuAdd::menu_addMesh ( const std::string &  name)
private

Definition at line 409 of file MenuAdd.cpp.

◆ menu_addMotor()

void mars::gui::MenuAdd::menu_addMotor ( const std::string &  name)
private

Definition at line 301 of file MenuAdd.cpp.

◆ menu_addPlane()

void mars::gui::MenuAdd::menu_addPlane ( const std::string &  name)
private

Definition at line 359 of file MenuAdd.cpp.

◆ menu_addSphere()

void mars::gui::MenuAdd::menu_addSphere ( const std::string &  name)
private

Definition at line 392 of file MenuAdd.cpp.

◆ menuAction()

void mars::gui::MenuAdd::menuAction ( int  action,
bool  checked = false 
)
virtual

Called whenever a menu item is selected.

Parameters
actionThe action that is passed to the GuiInterface via addGenericMenuAction function.
checkedIndicates if the menu/menu item is checked or not.

Implements mars::main_gui::MenuInterface.

Definition at line 190 of file MenuAdd.cpp.

◆ selectFile

void mars::gui::MenuAdd::selectFile ( )
privateslot

Definition at line 277 of file MenuAdd.cpp.

Member Data Documentation

◆ addLabel

QLabel* mars::gui::MenuAdd::addLabel
private

Definition at line 97 of file MenuAdd.h.

◆ addLineEdit

QLineEdit* mars::gui::MenuAdd::addLineEdit
private

Definition at line 98 of file MenuAdd.h.

◆ addLineEdit2

QLineEdit * mars::gui::MenuAdd::addLineEdit2
private

Definition at line 98 of file MenuAdd.h.

◆ addType

int mars::gui::MenuAdd::addType
private

Definition at line 103 of file MenuAdd.h.

◆ combo1

QComboBox* mars::gui::MenuAdd::combo1
private

Definition at line 102 of file MenuAdd.h.

◆ combo2

QComboBox * mars::gui::MenuAdd::combo2
private

Definition at line 102 of file MenuAdd.h.

◆ combo3

QComboBox * mars::gui::MenuAdd::combo3
private

Definition at line 102 of file MenuAdd.h.

◆ comboLabel1

QLabel * mars::gui::MenuAdd::comboLabel1
private

Definition at line 97 of file MenuAdd.h.

◆ comboLabel2

QLabel * mars::gui::MenuAdd::comboLabel2
private

Definition at line 97 of file MenuAdd.h.

◆ comboLabel3

QLabel * mars::gui::MenuAdd::comboLabel3
private

Definition at line 97 of file MenuAdd.h.

◆ control

interfaces::ControlCenter* mars::gui::MenuAdd::control
private

Definition at line 94 of file MenuAdd.h.

◆ defaultLight

configmaps::ConfigMap mars::gui::MenuAdd::defaultLight
private

Definition at line 95 of file MenuAdd.h.

◆ gridLayout

QGridLayout* mars::gui::MenuAdd::gridLayout
private

Definition at line 100 of file MenuAdd.h.

◆ label3

QLabel * mars::gui::MenuAdd::label3
private

Definition at line 97 of file MenuAdd.h.

◆ libManager

lib_manager::LibManager* mars::gui::MenuAdd::libManager
private

Definition at line 92 of file MenuAdd.h.

◆ mainGui

main_gui::GuiInterface* mars::gui::MenuAdd::mainGui
private

Definition at line 93 of file MenuAdd.h.

◆ material

configmaps::ConfigMap mars::gui::MenuAdd::material
private

Definition at line 95 of file MenuAdd.h.

◆ openFile

QPushButton* mars::gui::MenuAdd::openFile
private

Definition at line 99 of file MenuAdd.h.

◆ vLayout

QVBoxLayout* mars::gui::MenuAdd::vLayout
private

Definition at line 101 of file MenuAdd.h.

◆ widgetAdd

QWidget* mars::gui::MenuAdd::widgetAdd
private

Definition at line 96 of file MenuAdd.h.


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