![]() |
VR-Forces 4.0.4 Class Documentation
|
A widget for editing props. More...

Public Member Functions | |
| DtPropsWidget (DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0) | |
| CTOR. | |
| virtual | ~DtPropsWidget () |
| DTOR. | |
Field value setters. | |
Sets the values of the widget's corresponding fields. | |
| virtual void | addPropType (std::string propType) |
| Add a prop type to the gui propType must be unique. | |
| virtual void | removePropType (std::string propType) |
| Remove a prop type from the guiz propType must be unique. | |
| virtual void | addProp (const std::string &propName, const std::string &propType, DtUniqueID id) |
| Add a prop to the gui The pair (propName, propType) must be unique. | |
| virtual void | removeProp (const std::string &propName, const std::string &propType, DtUniqueID id) |
| Remove a prop from the gui The pair (propName, propType) must be unique. | |
| virtual void | setOpacity (int opacity) |
| Set the opacity in the gui. | |
| virtual void | setVisibility (int visibility) |
| Set the visibility in the gui. | |
| virtual void | setPropType (const std::string &propType) |
| Set the prop type in the gui. | |
| virtual void | setModelDefinition (const std::string &modelDef) |
| Set the model definition in the gui. | |
| virtual void | setPropSelected (DtUniqueID id, bool selected) |
| Set a prop item to be selected or unselected. | |
| virtual void | setPropsSelected (const DtPropsInterface::UniqueIdSet &ids) |
| Set several prop items to be selected. | |
| virtual void | setPropsDeselected (const DtPropsInterface::UniqueIdSet &ids) |
| Set several prop item to be unselected. | |
| virtual void | setValidSchemas (const std::vector< std::string > &schemaNames) |
| Set the names of the valid schemas for prop model defs. | |
| virtual void | setPosition (double x, double y, double z) |
| Set the position in the gui. | |
| virtual void | setPositionUnits (const DtUnicode &units) |
| Set the position units in the gui. | |
| virtual void | setPositionPrecisions (int distDecimals, int altDecimals) |
| Set the position precision in the gui. | |
| virtual void | setOrientation (const double yaw, const double pitch, const double roll) |
| Set the orientation in the gui. | |
| virtual void | setOrientationUnits (const DtUnicode &units) |
| Set the orientation units in the gui. | |
| virtual void | setOrientationPrecision (int decimals) |
| Set the orientation precision in the gui. | |
| void | clear () |
| Clears widget. | |
Protected Types | |
| typedef boost::unordered_map < DtUniqueID, QTreeWidgetItem * > | UniqueItemMap |
| typedef boost::unordered_map < std::string, QTreeWidgetItem * > | ItemMap |
Protected Slots | |
User input slots. | |
Receives notification that the user has changed a widget's value. | |
| void | onSelectionChanged () |
| Called when the prop tree selection is changed. | |
| void | onRemovePropsBtnClicked () |
| Called when the remove props button is clicked. | |
| void | onOpacityChanged (int opacity) |
| Called when the opacity slider is changed. | |
| void | onVisibilityChanged (int visibilty) |
| Called when the visibility checkbox is toggled. | |
| void | onPropTypeComboChanged (int index) |
| Called when the prop type combo box is changed. | |
| void | onModelDefComboChanged (int index) |
| Called when the model definition combo box is changed. | |
| void | onPositionChanged () |
| Called when the orientation of the prop is changed. | |
| void | onOrientationChanged () |
| Called when the orientation of the prop is changed. | |
| void | onRightClicked (QTreeWidgetItem *, QMouseEvent *, int col) |
| Determines the item that was clicked on and displays a context menu. | |
Protected Member Functions | |
| void | setupGui () |
| Sets up the widget's fields. | |
| void | connectToSignals () |
| Connects widget signals to slots. | |
| QTreeWidgetItem * | findPropTypeItem (const std::string &propType) |
| Return the QTreeWidgetItem* for propType; null otherwise. | |
| QTreeWidgetItem * | findPropItem (DtUniqueID name) |
| Return the QTreeWidgetItem* for prop; null otherwise. | |
| void | setItemName (QTreeWidgetItem *item, const std::string &name) |
| Set the name field in a tree widget item. | |
| QString | itemName (const QTreeWidgetItem *item) |
| Get the name field in a tree widget item. | |
| void | setItemPropType (QTreeWidgetItem *item, const std::string &propType) |
| Set the prop type field in a tree widget item. | |
| QString | itemPropType (const QTreeWidgetItem *item) |
| Get the prop type field in a tree widgget item. | |
| void | setItemUniqueID (QTreeWidgetItem *item, DtUniqueID id) |
| Set the unique id field of the tree item. | |
| DtUniqueID | itemUniqueID (const QTreeWidgetItem *item) |
| Get the unique id field of the tree item. | |
| bool | isItemProp (QTreeWidgetItem *item) |
| Check whether a tree item is a prop type or a prop. | |
| void | setStateStuffEnabled (bool bEnable) |
| Enabled/ disable state gui stuff. | |
Protected Attributes | |
| DtDe & | myDe |
| DtTreeWidget * | myTreeWidget |
| QPushButton * | myRemovePropsBtn |
| DtPropTypeComboBox * | myPropTypeCombo |
| DtModelDefinitionComboBox * | myModelDefCombo |
| QCheckBox * | myVisibleCheckbox |
| QLabel * | opacityLabel |
| QSlider * | myOpacitySlider |
| ItemMap | myPropTypeItems |
| UniqueItemMap | myPropItems |
| QLabel * | myXLabel |
| QLabel * | myYLabel |
| QLabel * | myZLabel |
| QDoubleSpinBox * | myXSpinbox |
| QDoubleSpinBox * | myYSpinbox |
| QDoubleSpinBox * | myZSpinbox |
| QLabel * | myYawLabel |
| QLabel * | myPitchLabel |
| QLabel * | myRollLabel |
| QDoubleSpinBox * | myYawSpinbox |
| QDoubleSpinBox * | myPitchSpinbox |
| QDoubleSpinBox * | myRollSpinbox |
A widget for editing props.
typedef boost::unordered_map<DtUniqueID,QTreeWidgetItem*> makVrv::DtPropsWidget::UniqueItemMap [protected] |
typedef boost::unordered_map<std::string,QTreeWidgetItem*> makVrv::DtPropsWidget::ItemMap [protected] |
| makVrv::DtPropsWidget::DtPropsWidget | ( | DtDe & | de, |
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | flags = 0 |
||
| ) |
CTOR.
| virtual makVrv::DtPropsWidget::~DtPropsWidget | ( | ) | [virtual] |
DTOR.
| virtual void makVrv::DtPropsWidget::addPropType | ( | std::string | propType | ) | [virtual] |
Add a prop type to the gui propType must be unique.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::removePropType | ( | std::string | propType | ) | [virtual] |
Remove a prop type from the guiz propType must be unique.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::addProp | ( | const std::string & | propName, |
| const std::string & | propType, | ||
| DtUniqueID | id | ||
| ) | [virtual] |
Add a prop to the gui The pair (propName, propType) must be unique.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::removeProp | ( | const std::string & | propName, |
| const std::string & | propType, | ||
| DtUniqueID | id | ||
| ) | [virtual] |
Remove a prop from the gui The pair (propName, propType) must be unique.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setOpacity | ( | int | opacity | ) | [virtual] |
Set the opacity in the gui.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setVisibility | ( | int | visibility | ) | [virtual] |
Set the visibility in the gui.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setPropType | ( | const std::string & | propType | ) | [virtual] |
Set the prop type in the gui.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setModelDefinition | ( | const std::string & | modelDef | ) | [virtual] |
Set the model definition in the gui.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setPropSelected | ( | DtUniqueID | id, |
| bool | selected | ||
| ) | [virtual] |
Set a prop item to be selected or unselected.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setPropsSelected | ( | const DtPropsInterface::UniqueIdSet & | ids | ) | [virtual] |
Set several prop items to be selected.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setPropsDeselected | ( | const DtPropsInterface::UniqueIdSet & | ids | ) | [virtual] |
Set several prop item to be unselected.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setValidSchemas | ( | const std::vector< std::string > & | schemaNames | ) | [virtual] |
Set the names of the valid schemas for prop model defs.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) | [virtual] |
Set the position in the gui.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setPositionUnits | ( | const DtUnicode & | units | ) | [virtual] |
Set the position units in the gui.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setPositionPrecisions | ( | int | distDecimals, |
| int | altDecimals | ||
| ) | [virtual] |
Set the position precision in the gui.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setOrientation | ( | const double | yaw, |
| const double | pitch, | ||
| const double | roll | ||
| ) | [virtual] |
Set the orientation in the gui.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setOrientationUnits | ( | const DtUnicode & | units | ) | [virtual] |
Set the orientation units in the gui.
Implements makVrv::DtPropsInterface.
| virtual void makVrv::DtPropsWidget::setOrientationPrecision | ( | int | decimals | ) | [virtual] |
Set the orientation precision in the gui.
Implements makVrv::DtPropsInterface.
| void makVrv::DtPropsWidget::clear | ( | ) |
Clears widget.
| void makVrv::DtPropsWidget::onSelectionChanged | ( | ) | [protected, slot] |
Called when the prop tree selection is changed.
| void makVrv::DtPropsWidget::onRemovePropsBtnClicked | ( | ) | [protected, slot] |
Called when the remove props button is clicked.
| void makVrv::DtPropsWidget::onOpacityChanged | ( | int | opacity | ) | [protected, slot] |
Called when the opacity slider is changed.
| void makVrv::DtPropsWidget::onVisibilityChanged | ( | int | visibilty | ) | [protected, slot] |
Called when the visibility checkbox is toggled.
| void makVrv::DtPropsWidget::onPropTypeComboChanged | ( | int | index | ) | [protected, slot] |
Called when the prop type combo box is changed.
| void makVrv::DtPropsWidget::onModelDefComboChanged | ( | int | index | ) | [protected, slot] |
Called when the model definition combo box is changed.
| void makVrv::DtPropsWidget::onPositionChanged | ( | ) | [protected, slot] |
Called when the orientation of the prop is changed.
| void makVrv::DtPropsWidget::onOrientationChanged | ( | ) | [protected, slot] |
Called when the orientation of the prop is changed.
| void makVrv::DtPropsWidget::onRightClicked | ( | QTreeWidgetItem * | , |
| QMouseEvent * | , | ||
| int | col | ||
| ) | [protected, slot] |
Determines the item that was clicked on and displays a context menu.
| void makVrv::DtPropsWidget::setupGui | ( | ) | [protected] |
Sets up the widget's fields.
Non-virtual (Called from CTOR).
| void makVrv::DtPropsWidget::connectToSignals | ( | ) | [protected] |
Connects widget signals to slots.
Non-virtual (Called from CTOR).
| QTreeWidgetItem* makVrv::DtPropsWidget::findPropTypeItem | ( | const std::string & | propType | ) | [protected] |
Return the QTreeWidgetItem* for propType; null otherwise.
| QTreeWidgetItem* makVrv::DtPropsWidget::findPropItem | ( | DtUniqueID | name | ) | [protected] |
Return the QTreeWidgetItem* for prop; null otherwise.
| void makVrv::DtPropsWidget::setItemName | ( | QTreeWidgetItem * | item, |
| const std::string & | name | ||
| ) | [protected] |
Set the name field in a tree widget item.
| QString makVrv::DtPropsWidget::itemName | ( | const QTreeWidgetItem * | item | ) | [protected] |
Get the name field in a tree widget item.
| void makVrv::DtPropsWidget::setItemPropType | ( | QTreeWidgetItem * | item, |
| const std::string & | propType | ||
| ) | [protected] |
Set the prop type field in a tree widget item.
| QString makVrv::DtPropsWidget::itemPropType | ( | const QTreeWidgetItem * | item | ) | [protected] |
Get the prop type field in a tree widgget item.
| void makVrv::DtPropsWidget::setItemUniqueID | ( | QTreeWidgetItem * | item, |
| DtUniqueID | id | ||
| ) | [protected] |
Set the unique id field of the tree item.
| DtUniqueID makVrv::DtPropsWidget::itemUniqueID | ( | const QTreeWidgetItem * | item | ) | [protected] |
Get the unique id field of the tree item.
| bool makVrv::DtPropsWidget::isItemProp | ( | QTreeWidgetItem * | item | ) | [protected] |
Check whether a tree item is a prop type or a prop.
| void makVrv::DtPropsWidget::setStateStuffEnabled | ( | bool | bEnable | ) | [protected] |
Enabled/ disable state gui stuff.
DtDe& makVrv::DtPropsWidget::myDe [protected] |
DtTreeWidget* makVrv::DtPropsWidget::myTreeWidget [protected] |
QPushButton* makVrv::DtPropsWidget::myRemovePropsBtn [protected] |
DtPropTypeComboBox* makVrv::DtPropsWidget::myPropTypeCombo [protected] |
QCheckBox* makVrv::DtPropsWidget::myVisibleCheckbox [protected] |
QLabel* makVrv::DtPropsWidget::opacityLabel [protected] |
QSlider* makVrv::DtPropsWidget::myOpacitySlider [protected] |
ItemMap makVrv::DtPropsWidget::myPropTypeItems [protected] |
UniqueItemMap makVrv::DtPropsWidget::myPropItems [protected] |
QLabel* makVrv::DtPropsWidget::myXLabel [protected] |
QLabel* makVrv::DtPropsWidget::myYLabel [protected] |
QLabel* makVrv::DtPropsWidget::myZLabel [protected] |
QDoubleSpinBox* makVrv::DtPropsWidget::myXSpinbox [protected] |
QDoubleSpinBox* makVrv::DtPropsWidget::myYSpinbox [protected] |
QDoubleSpinBox* makVrv::DtPropsWidget::myZSpinbox [protected] |
QLabel* makVrv::DtPropsWidget::myYawLabel [protected] |
QLabel* makVrv::DtPropsWidget::myPitchLabel [protected] |
QLabel* makVrv::DtPropsWidget::myRollLabel [protected] |
QDoubleSpinBox* makVrv::DtPropsWidget::myYawSpinbox [protected] |
QDoubleSpinBox* makVrv::DtPropsWidget::myPitchSpinbox [protected] |
QDoubleSpinBox* makVrv::DtPropsWidget::myRollSpinbox [protected] |