#include <IpsaDialog.h>
Public Slots | |
virtual void | commandSelected (const QString &command) |
virtual void | getSetValue () |
virtual void | modeSelected (const QString &mode) |
virtual void | nodeSelected (const QString &node) |
virtual void | reloadData () |
Public Member Functions | |
IpsaDialog (IpsaSimulator *simulator, QWidget *parent=0, const char *name=0, bool modal=FALSE, WFlags fl=0) | |
~IpsaDialog () | |
Public Attributes | |
QPushButton * | action |
QComboBox * | commandList |
QComboBox * | modeSelector |
QComboBox * | nodeList |
QLineEdit * | value1 |
QLabel * | value1label |
QLineEdit * | value2 |
QLabel * | value2lable |
QLineEdit * | value3 |
QLabel * | value3label |
Protected Slots | |
virtual void | languageChange () |
Protected Member Functions | |
void | evaluateAnswer (const std::ostringstream &answer, unsigned int numberOfReturnValues) |
Protected Attributes | |
QVBoxLayout * | Layout5 |
QSpacerItem * | Spacer1 |
Private Member Functions | |
void | buildGui () |
Private Attributes | |
const QString | bodySelectionName |
std::map< std::string, Instruction * > | commandMap |
QString | currentCommand |
QString | currentNode |
IpsaSimulator * | ipsaSimulator |
const QString | jointSelectionName |
Definition at line 53 of file IpsaDialog.h.
IpsaDialog::IpsaDialog | ( | IpsaSimulator * | simulator, | |
QWidget * | parent = 0 , |
|||
const char * | name = 0 , |
|||
bool | modal = FALSE , |
|||
WFlags | fl = 0 | |||
) |
Constructs an IpsaDialog as a child of 'parent', with the name 'name' and widget flags set to 'f'.
The dialog will by default be modeless, unless you set 'modal' to TRUE to construct a modal dialog.
Definition at line 63 of file IpsaDialog.cpp.
References NVInstructions::CreateInstructionMap().
IpsaDialog::~IpsaDialog | ( | ) |
Destroys the object and frees any allocated resources
Definition at line 91 of file IpsaDialog.cpp.
void IpsaDialog::buildGui | ( | ) | [private] |
Creates the widget and all necessary connections.
Definition at line 248 of file IpsaDialog.cpp.
References action, commandList, commandSelected(), getSetValue(), languageChange(), Layout5, modeSelected(), modeSelector, nodeList, nodeSelected(), value1, value1label, value2, value2lable, value3, and value3label.
void IpsaDialog::commandSelected | ( | const QString & | command | ) | [virtual, slot] |
Stores the currently selected command and enables as many value fields as necessary for the command.
Definition at line 219 of file IpsaDialog.cpp.
References commandMap, currentCommand, value1, value2, and value3.
Referenced by buildGui(), and modeSelected().
void IpsaDialog::evaluateAnswer | ( | const std::ostringstream & | answer, | |
unsigned int | numberOfReturnValues | |||
) | [protected] |
If the answer can be decoded set the values of the value fields accordingly.
Definition at line 134 of file IpsaDialog.cpp.
References convertAnswerToVector(), value1, value2, and value3.
Referenced by getSetValue().
void IpsaDialog::getSetValue | ( | ) | [virtual, slot] |
Fetches the instruction belonging to the current command, assembles its parameter vector and executes the command.
Definition at line 101 of file IpsaDialog.cpp.
References commandMap, currentCommand, currentNode, evaluateAnswer(), Instruction::findAndExecute(), Instruction::getCommandParameterCount(), value1, value2, and value3.
Referenced by buildGui().
void IpsaDialog::languageChange | ( | ) | [protected, virtual, slot] |
Sets the strings of the subwidgets using the current language.
Definition at line 311 of file IpsaDialog.cpp.
References action, commandList, value1label, value2lable, and value3label.
Referenced by buildGui().
void IpsaDialog::modeSelected | ( | const QString & | mode | ) | [virtual, slot] |
Creates the content of the node selection list and the command selection list depending on the value of IpsaDialog::modeSelector (i.e. body or joint).
Definition at line 166 of file IpsaDialog.cpp.
References bodySelectionName, commandList, commandMap, commandSelected(), ipsaSimulator, nodeList, and nodeSelected().
Referenced by buildGui(), and reloadData().
void IpsaDialog::nodeSelected | ( | const QString & | node | ) | [virtual, slot] |
Stores the name of the currently selected node.
Definition at line 209 of file IpsaDialog.cpp.
References currentNode.
Referenced by buildGui(), and modeSelected().
void IpsaDialog::reloadData | ( | ) | [virtual, slot] |
Reloads all available commands and nodes by calling IpsaDialog::modeSelected() with the current value of IpsaDialog::modeSelector.
Definition at line 239 of file IpsaDialog.cpp.
References modeSelected(), and modeSelector.
Referenced by IpsaViewerWidget::showDialog(), and IpsaViewer::showDialog().
QPushButton* IpsaDialog::action |
const QString IpsaDialog::bodySelectionName [private] |
QComboBox* IpsaDialog::commandList |
Definition at line 73 of file IpsaDialog.h.
Referenced by buildGui(), languageChange(), and modeSelected().
std::map<std::string, Instruction*> IpsaDialog::commandMap [private] |
Definition at line 98 of file IpsaDialog.h.
Referenced by commandSelected(), getSetValue(), and modeSelected().
QString IpsaDialog::currentCommand [private] |
QString IpsaDialog::currentNode [private] |
IpsaSimulator* IpsaDialog::ipsaSimulator [private] |
const QString IpsaDialog::jointSelectionName [private] |
Definition at line 101 of file IpsaDialog.h.
QVBoxLayout* IpsaDialog::Layout5 [protected] |
QComboBox* IpsaDialog::modeSelector |
QComboBox* IpsaDialog::nodeList |
QSpacerItem* IpsaDialog::Spacer1 [protected] |
Definition at line 87 of file IpsaDialog.h.
QLineEdit* IpsaDialog::value1 |
Definition at line 68 of file IpsaDialog.h.
Referenced by buildGui(), commandSelected(), evaluateAnswer(), and getSetValue().
QLabel* IpsaDialog::value1label |
QLineEdit* IpsaDialog::value2 |
Definition at line 69 of file IpsaDialog.h.
Referenced by buildGui(), commandSelected(), evaluateAnswer(), and getSetValue().
QLabel* IpsaDialog::value2lable |
QLineEdit* IpsaDialog::value3 |
Definition at line 70 of file IpsaDialog.h.
Referenced by buildGui(), commandSelected(), evaluateAnswer(), and getSetValue().
QLabel* IpsaDialog::value3label |
Generated on Sat Mar 10 20:00:19 2012 for IPSA by 1.5.8 |