SOFA plugin: image  master
Open source framework for multi-physics simuation
sofa::gui::qt::VectorVisualizationSliderWidget Class Reference

#include <VectorVisualizationWidget.h>

Inheritance diagram for sofa::gui::qt::VectorVisualizationSliderWidget:

Detailed Description

Holds a Horizontal QSlider, with a QLabel beside it to display the current value

Public Attributes

QSlider * slider
 

Protected Attributes

QLabel * numLabel
 
QHBoxLayout * layout
 

Public Member Functions

 VectorVisualizationSliderWidget (QWidget *parent, int min, int max)
 
void setValue (int value)
 

Public Slots

void updateNumLabel (int newValue)
 

Attribute details

◆ layout

QHBoxLayout* sofa::gui::qt::VectorVisualizationSliderWidget::layout
protected

◆ numLabel

QLabel* sofa::gui::qt::VectorVisualizationSliderWidget::numLabel
protected

◆ slider

QSlider* sofa::gui::qt::VectorVisualizationSliderWidget::slider

Constructor details

◆ VectorVisualizationSliderWidget()

sofa::gui::qt::VectorVisualizationSliderWidget::VectorVisualizationSliderWidget ( QWidget parent,
int  min,
int  max 
)
inline
Parameters
parentthe parent QWidget
minthe minimum value that can be selected by the slider @ param max the maximum value that can be selected by the slider

Function details

◆ setValue()

void sofa::gui::qt::VectorVisualizationSliderWidget::setValue ( int  value)
inline

Set the value and position of the slider to a specified value.

◆ updateNumLabel

void sofa::gui::qt::VectorVisualizationSliderWidget::updateNumLabel ( int  newValue)
inlineslot

Slot the keep the value displayed by the label in sync with the value selected by the slider