RobWorkProject  23.9.11-
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
TransformSliderWidget Class Reference

Widget for a setting a 6D pose. More...

#include <SliderTab.hpp>

Inherits QWidget, and QWidget.

Public Types

enum  AngleType { RPYtype = 0 , EAAtype = 1 , QUAtype = 2 }
 The type of angle to use. More...
 
typedef enum TransformSliderWidget::AngleType AngleType
 The type of angle to use.
 

Public Slots

void angleTypeChanged (int index)
 updates the sliders to represent the new angle type
 
void paste ()
 Opens up dialog for easy pasting of a new pose.
 
void copy ()
 Copys the pose into the clipboard.
 
void paste ()
 

Signals

void valueChanged (const rw::math::Transform3D<> &transform)
 Emitted when the transform is changed. More...
 
void valueChanged (const rw::math::Transform3D<> &transform)
 

Public Member Functions

 TransformSliderWidget (const std::pair< rw::math::Q, rw::math::Q > &bounds, const rw::math::Transform3D<> &transform, AngleType angleType=RPYtype, bool enablers=false)
 Construct new widget. More...
 
void setNoneDeviceType (bool isNotADevice=true)
 the widget is not moving a device, but a movable frame More...
 
void setUnits (const std::vector< double > &converters, const std::vector< std::string > &descriptions)
 Set the units. More...
 
void updateValues (const rw::math::Transform3D<> &transform)
 Change the transform. More...
 
void updateInactiveValues (const rw::math::Transform3D<> &transform)
 Change the transform where the enablers have been unchecked. More...
 
rw::math::Transform3D getTransform ()
 Get the currently chosen transform. More...
 
rw::math::VectorND< 6, bool > enabledState () const
 Get the enabled state for the x,y,z,R,P and Y state respectively. More...
 
 TransformSliderWidget (const std::pair< rw::math::Q, rw::math::Q > &bounds, const rw::math::Transform3D<> &transform)
 
void setUnits (const std::vector< double > &converters, const std::vector< std::string > &descriptions)
 
void updateValues (const rw::math::Transform3D<> &transform)
 
rw::math::Transform3D getTransform ()
 

Static Public Member Functions

static AngleType toAngleType (int i)
 Convert an integer to correct AngleType. More...
 

Detailed Description

Widget for a setting a 6D pose.

Member Enumeration Documentation

◆ AngleType

enum AngleType

The type of angle to use.

Enumerator
RPYtype 

Roll-Pitch-Yaw (RPY) angles.

EAAtype 

Equivalent Angle Axis (EAA) angles.

QUAtype 

Quaternions.

Constructor & Destructor Documentation

◆ TransformSliderWidget()

TransformSliderWidget ( const std::pair< rw::math::Q, rw::math::Q > &  bounds,
const rw::math::Transform3D<> &  transform,
AngleType  angleType = RPYtype,
bool  enablers = false 
)

Construct new widget.

Parameters
bounds[in] the lower and upper bounds - 6 elements of each corresponding to x,y,z,R,P and Y.
transform[in] the initial transform.
angleType[in] (optional) set the type of angle to use (default is RPY).
enablers[in] (optional) set to true to show a checkbox for each slider. It is only possible to check/uncheck checkboxes for EAA values (not RPY).

Member Function Documentation

◆ enabledState()

rw::math::VectorND<6, bool> enabledState ( ) const

Get the enabled state for the x,y,z,R,P and Y state respectively.

Returns
the enabled state.

◆ getTransform()

rw::math::Transform3D getTransform ( )

Get the currently chosen transform.

Returns
the current transform.

◆ setNoneDeviceType()

void setNoneDeviceType ( bool  isNotADevice = true)
inline

the widget is not moving a device, but a movable frame

Parameters
isNotADevicetrue if the widget is not manipulating a device

◆ setUnits()

void setUnits ( const std::vector< double > &  converters,
const std::vector< std::string > &  descriptions 
)

Set the units.

Parameters
converters[in] the factor used to convert to units.
descriptions[in] a description of the chosen units.

◆ toAngleType()

static AngleType toAngleType ( int  i)
static

Convert an integer to correct AngleType.

Parameters
i[in] the integer.
Returns
the corresponding AngleType.
Exceptions
Exceptionif there is no AngleType with this integer value.

◆ updateInactiveValues()

void updateInactiveValues ( const rw::math::Transform3D<> &  transform)

Change the transform where the enablers have been unchecked.

Parameters
transform[in] new transform.

◆ updateValues()

void updateValues ( const rw::math::Transform3D<> &  transform)

Change the transform.

Parameters
transform[in] new transform.

◆ valueChanged

void valueChanged ( const rw::math::Transform3D<> &  transform)
signal

Emitted when the transform is changed.

Parameters
transform[in] the new transform.

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