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

Widget for jogging a single value, such as the joint of a device or a Cartesian translation/rotation. More...

#include <SliderTab.hpp>

Inherits QWidget, and QWidget.

Signals

void valueChanged ()
 Emitted whenever the joint value changes.
 
void valueChanged ()
 

Public Member Functions

 Slider (const std::string &title, double low, double high, QGridLayout *layout, int row, QWidget *parent)
 Construct new slider for some adjustable value. More...
 
virtual ~Slider ()
 Destructor.
 
void unitUpdated ()
 Adjust the values after a change in units.
 
double value () const
 The current value chosen. More...
 
void setValue (double val)
 Change the current value. More...
 
void setUnitConverter (double converter)
 Set the factor used to convert to a certain unit. More...
 
double getUnitConverter () const
 Get the factor currently used to convert to used units. More...
 
void setUnitDescription (const std::string &str)
 Set a description of the units used. More...
 
 Slider (const std::string &title, double low, double high, QGridLayout *layout, int row, QWidget *parent)
 
void unitUpdated ()
 
double value () const
 
void setValue (double val)
 
void setUnitConverter (double converter)
 
double getUnitConverter () const
 
void setUnitDescription (const std::string &str)
 
void showEndLabel (bool enabled)
 

Detailed Description

Widget for jogging a single value, such as the joint of a device or a Cartesian translation/rotation.

Constructor & Destructor Documentation

◆ Slider()

Slider ( const std::string &  title,
double  low,
double  high,
QGridLayout *  layout,
int  row,
QWidget *  parent 
)

Construct new slider for some adjustable value.

Parameters
title[in] title that identifies the value.
low[in] the lowest possible value.
high[in] the highest possible value.
layout[in] a grid layout - this class uses the 6 first columns in row .
row[in] the row of layout to insert elements in.
parent[in] the owner of this widget.

Member Function Documentation

◆ getUnitConverter()

double getUnitConverter ( ) const
inline

Get the factor currently used to convert to used units.

Returns
the factor.

◆ setUnitConverter()

void setUnitConverter ( double  converter)
inline

Set the factor used to convert to a certain unit.

Parameters
converter[in] the factor to convert the units used.

◆ setUnitDescription()

void setUnitDescription ( const std::string &  str)
inline

Set a description of the units used.

Parameters
str[in] description of the units.

◆ setValue()

void setValue ( double  val)

Change the current value.

Parameters
val[in] the new value.

◆ value()

double value ( ) const

The current value chosen.

Returns
the value chosen.

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