RobWorkProject  23.9.11-
Public Slots | Signals | Public Member Functions | List of all members
JointSliderWidget Class Reference

Widget for a set of joint sliders. More...

#include <SliderTab.hpp>

Inherits QWidget, and QWidget.

Public Slots

void paste ()
 Opens up input dialog for pasting a new set of values.
 
void copy ()
 Puts the Q into the clipboard.
 
void paste ()
 

Signals

void valueChanged (const rw::math::Q &q)
 Emitted when the joint values are changed. More...
 
void valueChanged (const rw::math::Q &q)
 

Public Member Functions

 JointSliderWidget ()
 Constructor.
 
void setup (const std::vector< std::string > &titles, const std::pair< rw::math::Q, rw::math::Q > &bounds, const rw::math::Q &q, bool enablers=false, bool enableAngularCombined=false)
 Setup the 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::Q &q)
 Set the values of the joints. More...
 
void updateInactiveValues (const rw::math::Q &q)
 Set the values of the joints where the enablers are unchecked. More...
 
void updateSpecificValue (std::size_t i, double q)
 Set the value of a specific joint. More...
 
rw::math::Q getQ ()
 Get the current values of joints. More...
 
std::vector< bool > enabledState () const
 Get the enabled state of each slider. More...
 
void setup (const std::vector< std::string > &titles, const std::pair< rw::math::Q, rw::math::Q > &bounds, const rw::math::Q &q)
 
void setUnits (const std::vector< double > &converters, const std::vector< std::string > &descriptions)
 
void updateValues (const rw::math::Q &q)
 
rw::math::Q getQ ()
 

Detailed Description

Widget for a set of joint sliders.

Member Function Documentation

◆ enabledState()

std::vector<bool> enabledState ( ) const

Get the enabled state of each slider.

Returns
a vector of the enabled states (empty vector if enablers are not used).

◆ getQ()

rw::math::Q getQ ( )

Get the current values of joints.

Returns
the current values.

◆ 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.

◆ setup()

void setup ( const std::vector< std::string > &  titles,
const std::pair< rw::math::Q, rw::math::Q > &  bounds,
const rw::math::Q q,
bool  enablers = false,
bool  enableAngularCombined = false 
)

Setup the widget.

Parameters
titles[in] titles of the joints.
bounds[in] lower and upper bounds for the joints.
q[in] initial values for the joints.
enablers[in] (optional) set to true to show a checkbox for each slider.
enableAngularCombined[in] (optional) if enablers are used, control the angular directions as one group (default is false).

◆ updateInactiveValues()

void updateInactiveValues ( const rw::math::Q q)

Set the values of the joints where the enablers are unchecked.

Parameters
q[in] new joint values.

◆ updateSpecificValue()

void updateSpecificValue ( std::size_t  i,
double  q 
)

Set the value of a specific joint.

Parameters
i[in] value to update.
q[in] new joint value.

◆ updateValues()

void updateValues ( const rw::math::Q q)

Set the values of the joints.

Parameters
q[in] new joint values.

◆ valueChanged

void valueChanged ( const rw::math::Q q)
signal

Emitted when the joint values are changed.

Parameters
q[in] the new values.

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